From: <be...@us...> - 2015-06-16 20:44:33
|
Revision: 13090 http://sourceforge.net/p/xoops/svn/13090 Author: beckmi Date: 2015-06-16 20:44:29 +0000 (Tue, 16 Jun 2015) Log Message: ----------- Replacing intval() with (int) Modified Paths: -------------- XoopsCore/branches/2.5.x/2.5.8/htdocs/Frameworks/art/functions.cache.php XoopsCore/branches/2.5.x/2.5.8/htdocs/admin.php XoopsCore/branches/2.5.x/2.5.8/htdocs/banners.php XoopsCore/branches/2.5.x/2.5.8/htdocs/class/cache/file.php XoopsCore/branches/2.5.x/2.5.8/htdocs/class/cache/xoopscache.php XoopsCore/branches/2.5.x/2.5.8/htdocs/class/captcha/image/scripts/image.php XoopsCore/branches/2.5.x/2.5.8/htdocs/class/captcha/xoopscaptcha.php XoopsCore/branches/2.5.x/2.5.8/htdocs/class/commentrenderer.php XoopsCore/branches/2.5.x/2.5.8/htdocs/class/criteria.php XoopsCore/branches/2.5.x/2.5.8/htdocs/class/logger/render.php XoopsCore/branches/2.5.x/2.5.8/htdocs/class/model/joint.php XoopsCore/branches/2.5.x/2.5.8/htdocs/class/model/write.php XoopsCore/branches/2.5.x/2.5.8/htdocs/class/pagenav.php XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/plugins/function.html_select_time.php XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/xoops_plugins/function.block.php XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/xoops_plugins/function.xoInboxCount.php XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/xoops_plugins/function.xoPageNav.php XoopsCore/branches/2.5.x/2.5.8/htdocs/class/theme_blocks.php XoopsCore/branches/2.5.x/2.5.8/htdocs/class/uploader.php XoopsCore/branches/2.5.x/2.5.8/htdocs/class/userutility.php XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xml/rpc/xmlrpcparser.php XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xml/rpc/xmlrpctag.php XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xml/rpc/xoopsapi.php XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopsblock.php XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopscomments.php XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/xoopsemotions/xoopsemotions.php XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/xoopsimagemanager/xoopsimagebrowser.php XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopsform/formdatetime.php XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopsform/formdhtmltextarea.php XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopsform/formfile.php XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopsform/formpassword.php XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopsform/formselect.php XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopsform/formtext.php XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopsform/formtextarea.php XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopsform/formtextdateselect.php XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopsform/grouppermform.php XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopslocal.php XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopssecurity.php XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopsstory.php XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopstopic.php XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopstree.php XoopsCore/branches/2.5.x/2.5.8/htdocs/edituser.php XoopsCore/branches/2.5.x/2.5.8/htdocs/imagemanager.php XoopsCore/branches/2.5.x/2.5.8/htdocs/include/comment_delete.php XoopsCore/branches/2.5.x/2.5.8/htdocs/include/comment_edit.php XoopsCore/branches/2.5.x/2.5.8/htdocs/include/comment_form.php XoopsCore/branches/2.5.x/2.5.8/htdocs/include/comment_new.php XoopsCore/branches/2.5.x/2.5.8/htdocs/include/comment_post.php XoopsCore/branches/2.5.x/2.5.8/htdocs/include/comment_reply.php XoopsCore/branches/2.5.x/2.5.8/htdocs/include/comment_view.php XoopsCore/branches/2.5.x/2.5.8/htdocs/include/commentform.inc.php XoopsCore/branches/2.5.x/2.5.8/htdocs/include/common.php XoopsCore/branches/2.5.x/2.5.8/htdocs/include/findusers.php XoopsCore/branches/2.5.x/2.5.8/htdocs/include/functions.php XoopsCore/branches/2.5.x/2.5.8/htdocs/include/notification_functions.php XoopsCore/branches/2.5.x/2.5.8/htdocs/include/old_functions.php XoopsCore/branches/2.5.x/2.5.8/htdocs/install/include/createconfigform.php XoopsCore/branches/2.5.x/2.5.8/htdocs/install/include/functions.php XoopsCore/branches/2.5.x/2.5.8/htdocs/install/include/modulesadmin.php XoopsCore/branches/2.5.x/2.5.8/htdocs/kernel/avatar.php XoopsCore/branches/2.5.x/2.5.8/htdocs/kernel/block.php XoopsCore/branches/2.5.x/2.5.8/htdocs/kernel/comment.php XoopsCore/branches/2.5.x/2.5.8/htdocs/kernel/config.php XoopsCore/branches/2.5.x/2.5.8/htdocs/kernel/configcategory.php XoopsCore/branches/2.5.x/2.5.8/htdocs/kernel/configitem.php XoopsCore/branches/2.5.x/2.5.8/htdocs/kernel/configoption.php XoopsCore/branches/2.5.x/2.5.8/htdocs/kernel/group.php XoopsCore/branches/2.5.x/2.5.8/htdocs/kernel/groupperm.php XoopsCore/branches/2.5.x/2.5.8/htdocs/kernel/image.php XoopsCore/branches/2.5.x/2.5.8/htdocs/kernel/imagecategory.php XoopsCore/branches/2.5.x/2.5.8/htdocs/kernel/imageset.php XoopsCore/branches/2.5.x/2.5.8/htdocs/kernel/imagesetimg.php XoopsCore/branches/2.5.x/2.5.8/htdocs/kernel/module.php XoopsCore/branches/2.5.x/2.5.8/htdocs/kernel/notification.php XoopsCore/branches/2.5.x/2.5.8/htdocs/kernel/object.php XoopsCore/branches/2.5.x/2.5.8/htdocs/kernel/online.php XoopsCore/branches/2.5.x/2.5.8/htdocs/kernel/privmessage.php XoopsCore/branches/2.5.x/2.5.8/htdocs/kernel/session.php XoopsCore/branches/2.5.x/2.5.8/htdocs/kernel/tplfile.php XoopsCore/branches/2.5.x/2.5.8/htdocs/kernel/tplset.php XoopsCore/branches/2.5.x/2.5.8/htdocs/kernel/user.php XoopsCore/branches/2.5.x/2.5.8/htdocs/misc.php XoopsCore/branches/2.5.x/2.5.8/htdocs/modules/pm/admin/prune.php XoopsCore/branches/2.5.x/2.5.8/htdocs/modules/pm/class/message.php XoopsCore/branches/2.5.x/2.5.8/htdocs/modules/pm/readpmsg.php XoopsCore/branches/2.5.x/2.5.8/htdocs/modules/pm/viewpmsg.php XoopsCore/branches/2.5.x/2.5.8/htdocs/modules/profile/activate.php XoopsCore/branches/2.5.x/2.5.8/htdocs/modules/profile/admin/field.php XoopsCore/branches/2.5.x/2.5.8/htdocs/modules/profile/admin/step.php XoopsCore/branches/2.5.x/2.5.8/htdocs/modules/profile/admin/user.php XoopsCore/branches/2.5.x/2.5.8/htdocs/modules/profile/admin/visibility.php XoopsCore/branches/2.5.x/2.5.8/htdocs/modules/profile/class/field.php XoopsCore/branches/2.5.x/2.5.8/htdocs/modules/profile/class/profile.php XoopsCore/branches/2.5.x/2.5.8/htdocs/modules/profile/edituser.php XoopsCore/branches/2.5.x/2.5.8/htdocs/modules/profile/index.php XoopsCore/branches/2.5.x/2.5.8/htdocs/modules/profile/register.php XoopsCore/branches/2.5.x/2.5.8/htdocs/modules/profile/search.php XoopsCore/branches/2.5.x/2.5.8/htdocs/modules/profile/user.php XoopsCore/branches/2.5.x/2.5.8/htdocs/modules/profile/userinfo.php XoopsCore/branches/2.5.x/2.5.8/htdocs/modules/system/admin/avatars/main.php XoopsCore/branches/2.5.x/2.5.8/htdocs/modules/system/admin/blocksadmin/main.php XoopsCore/branches/2.5.x/2.5.8/htdocs/modules/system/admin/comments/main.php XoopsCore/branches/2.5.x/2.5.8/htdocs/modules/system/admin/groupperm.php XoopsCore/branches/2.5.x/2.5.8/htdocs/modules/system/admin/images/main.php XoopsCore/branches/2.5.x/2.5.8/htdocs/modules/system/admin/mailusers/main.php XoopsCore/branches/2.5.x/2.5.8/htdocs/modules/system/admin/modulesadmin/modulesadmin.php XoopsCore/branches/2.5.x/2.5.8/htdocs/modules/system/admin/preferences/main.php XoopsCore/branches/2.5.x/2.5.8/htdocs/modules/system/admin/users/main.php XoopsCore/branches/2.5.x/2.5.8/htdocs/modules/system/admin.php XoopsCore/branches/2.5.x/2.5.8/htdocs/modules/system/blocks/system_blocks.php XoopsCore/branches/2.5.x/2.5.8/htdocs/modules/system/class/avatar.php XoopsCore/branches/2.5.x/2.5.8/htdocs/modules/system/class/block.php XoopsCore/branches/2.5.x/2.5.8/htdocs/modules/system/class/thumbs/phpThumb.config.php XoopsCore/branches/2.5.x/2.5.8/htdocs/modules/system/class/thumbs/phpThumb.php XoopsCore/branches/2.5.x/2.5.8/htdocs/modules/system/class/thumbs/phpthumb.bmp.php XoopsCore/branches/2.5.x/2.5.8/htdocs/modules/system/class/thumbs/phpthumb.class.php XoopsCore/branches/2.5.x/2.5.8/htdocs/modules/system/class/thumbs/phpthumb.filters.php XoopsCore/branches/2.5.x/2.5.8/htdocs/modules/system/class/thumbs/phpthumb.functions.php XoopsCore/branches/2.5.x/2.5.8/htdocs/modules/system/class/thumbs/phpthumb.gif.php XoopsCore/branches/2.5.x/2.5.8/htdocs/modules/system/menu.php XoopsCore/branches/2.5.x/2.5.8/htdocs/modules/system/themes/default/menu.php XoopsCore/branches/2.5.x/2.5.8/htdocs/modules/system/themes/zetadigme/menu.php XoopsCore/branches/2.5.x/2.5.8/htdocs/readpmsg.php XoopsCore/branches/2.5.x/2.5.8/htdocs/search.php XoopsCore/branches/2.5.x/2.5.8/htdocs/themes/xbootstrap/modules/publisher/xoops_and_module_changes/class/pagenav.php XoopsCore/branches/2.5.x/2.5.8/htdocs/themes/xbootstrap/modules/publisher/xoops_and_module_changes/modules/publisher/class/item.php XoopsCore/branches/2.5.x/2.5.8/htdocs/userinfo.php XoopsCore/branches/2.5.x/2.5.8/htdocs/viewpmsg.php XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/modules/protector/admin/center.php XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/modules/protector/class/protector.php XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/modules/protector/filters_disabled/postcommon_post_register_moratorium.php XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/modules/protector/include/postcheck_functions.php XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/modules/protector/module_icon.php XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/modules/protector/oninstall.php XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/modules/protector/onupdate.php Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/Frameworks/art/functions.cache.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.8/htdocs/Frameworks/art/functions.cache.php 2015-06-13 22:09:36 UTC (rev 13089) +++ XoopsCore/branches/2.5.x/2.5.8/htdocs/Frameworks/art/functions.cache.php 2015-06-16 20:44:29 UTC (rev 13090) @@ -59,7 +59,7 @@ { global $xoopsModule; - $name = ($name) ? $name : strval(time()); + $name = ($name) ? $name : (string)(time()); $dirname = ($dirname) ? $dirname : (is_object($xoopsModule) ? $xoopsModule->getVar("dirname", "n") : "system"); xoops_load('XoopsCache'); Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/admin.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.8/htdocs/admin.php 2015-06-13 22:09:36 UTC (rev 13089) +++ XoopsCore/branches/2.5.x/2.5.8/htdocs/admin.php 2015-06-16 20:44:29 UTC (rev 13090) @@ -100,7 +100,7 @@ for ($i = 0; $i < $count; ++$i) { $_items[$i]['title'] = XoopsLocal::convert_encoding($_items[$i]['title'], _CHARSET, 'UTF-8'); $_items[$i]['description'] = XoopsLocal::convert_encoding($_items[$i]['description'], _CHARSET, 'UTF-8'); - $items[strval(strtotime($_items[$i]['pubdate'])) . "-" . strval($cnt++)] = $_items[$i]; + $items[(string)(strtotime($_items[$i]['pubdate'])) . "-" . (string)($cnt++)] = $_items[$i]; } } else { echo $rss2parser->getErrors(); Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/banners.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.8/htdocs/banners.php 2015-06-13 22:09:36 UTC (rev 13089) +++ XoopsCore/branches/2.5.x/2.5.8/htdocs/banners.php 2015-06-16 20:44:29 UTC (rev 13090) @@ -237,8 +237,8 @@ { global $xoopsDB, $xoopsConfig; if ($_SESSION['banner_login'] != "" && $_SESSION['banner_pass'] != "") { - $cid = intval($cid); - $bid = intval($bid); + $cid = (int)($cid); + $bid = (int)($bid); if ($result2 = $xoopsDB->query(sprintf("SELECT name, email, passwd FROM %s WHERE cid=%u AND login=%s", $xoopsDB->prefix("bannerclient"), $cid, $xoopsDB->quoteString($_SESSION['banner_login'])))) { list ($name, $email, $passwd) = $xoopsDB->fetchRow($result2); if ($_SESSION['banner_pass'] == $passwd) { @@ -294,8 +294,8 @@ { global $xoopsDB; if ($_SESSION['banner_login'] != "" && $_SESSION['banner_pass'] != "" && $url != "") { - $cid = intval($cid); - $bid = intval($bid); + $cid = (int)($cid); + $bid = (int)($bid); $sql = sprintf("SELECT passwd FROM %s WHERE cid=%u AND login=%s", $xoopsDB->prefix("bannerclient"), $cid, $xoopsDB->quoteString($_SESSION['banner_login'])); if ($result = $xoopsDB->query($sql)) { list ($passwd) = $xoopsDB->fetchRow($result); @@ -318,7 +318,7 @@ function clickbanner($bid) { global $xoopsDB; - $bid = intval($bid); + $bid = (int)($bid); if ($bid > 0) { $bresult = $xoopsDB->query("SELECT clickurl FROM " . $xoopsDB->prefix("banner") . " WHERE bid={$bid}"); list ($clickurl) = $xoopsDB->fetchRow($bresult); Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/class/cache/file.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.8/htdocs/class/cache/file.php 2015-06-13 22:09:36 UTC (rev 13089) +++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/cache/file.php 2015-06-16 20:44:29 UTC (rev 13090) @@ -196,7 +196,7 @@ } $cachetime = $this->file->read(11); - if ($cachetime !== false && intval($cachetime) < time()) { + if ($cachetime !== false && (int)($cachetime) < time()) { $this->file->close(); $this->file->delete(); Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/class/cache/xoopscache.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.8/htdocs/class/cache/xoopscache.php 2015-06-13 22:09:36 UTC (rev 13089) +++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/cache/xoopscache.php 2015-06-16 20:44:29 UTC (rev 13090) @@ -247,7 +247,7 @@ if (!$duration) { $duration = $settings['duration']; } - $duration = is_numeric($duration) ? intval($duration) : strtotime($duration) - time(); + $duration = is_numeric($duration) ? (int)($duration) : strtotime($duration) - time(); if ($duration < 1) { return false; @@ -394,7 +394,7 @@ if (empty($key)) { return false; } - $key = str_replace(array('/', '.'), '_', strval($key)); + $key = str_replace(array('/', '.'), '_', (string)($key)); return $key; } Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/class/captcha/image/scripts/image.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.8/htdocs/class/captcha/image/scripts/image.php 2015-06-13 22:09:36 UTC (rev 13089) +++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/captcha/image/scripts/image.php 2015-06-16 20:44:29 UTC (rev 13090) @@ -78,7 +78,7 @@ if ($this->mode == "bmp") { $this->config["num_chars"] = 4; - $this->code = rand( pow(10, $this->config["num_chars"] - 1), intval( str_pad("9", $this->config["num_chars"], "9") ) ); + $this->code = rand( pow(10, $this->config["num_chars"] - 1), (int)( str_pad("9", $this->config["num_chars"], "9") ) ); } else { $raw_code = md5(uniqid(mt_rand(), 1)); if (!empty($this->config["skip_characters"])) { @@ -229,7 +229,7 @@ imagedestroy($oImage); $this->height = $MaxCharHeight + 2; - $this->spacing = intval( ($this->config["num_chars"] * $MaxCharWidth) / $this->config["num_chars"] ); + $this->spacing = (int)( ($this->config["num_chars"] * $MaxCharWidth) / $this->config["num_chars"] ); $this->width = ($this->config["num_chars"] * $MaxCharWidth) + ($this->spacing/2); } Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/class/captcha/xoopscaptcha.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.8/htdocs/class/captcha/xoopscaptcha.php 2015-06-13 22:09:36 UTC (rev 13089) +++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/captcha/xoopscaptcha.php 2015-06-16 20:44:29 UTC (rev 13090) @@ -420,7 +420,7 @@ */ function getCode() { - return strval($this->code); + return (string)($this->code); } /** Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/class/commentrenderer.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.8/htdocs/class/commentrenderer.php 2015-06-13 22:09:36 UTC (rev 13089) +++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/commentrenderer.php 2015-06-16 20:44:29 UTC (rev 13090) @@ -339,7 +339,7 @@ // Start edit by voltan function _getPosterName($poster_id, $poster_user, $poster_website) { - $poster['id'] = intval($poster_id); + $poster['id'] = (int)($poster_id); if ($poster['id'] > 0) { $com_poster =& $this->_memberHandler->getUser($poster_id); if (is_object($com_poster)) { @@ -374,7 +374,7 @@ // Start edit by voltan function _getPosterArray($poster_id, $poster_user, $poster_website) { - $poster['id'] = intval($poster_id); + $poster['id'] = (int)($poster_id); if ($poster['id'] > 0) { $com_poster =& $this->_memberHandler->getUser($poster['id']); if (is_object($com_poster)) { Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/class/criteria.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.8/htdocs/class/criteria.php 2015-06-13 22:09:36 UTC (rev 13089) +++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/criteria.php 2015-06-16 20:44:29 UTC (rev 13090) @@ -121,7 +121,7 @@ */ function setLimit($limit = 0) { - $this->limit = intval($limit); + $this->limit = (int)($limit); } /** @@ -139,7 +139,7 @@ */ function setStart($start = 0) { - $this->start = intval($start); + $this->start = (int)($start); } /** Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/class/logger/render.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.8/htdocs/class/logger/render.php 2015-06-13 22:09:36 UTC (rev 13089) +++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/logger/render.php 2015-06-16 20:44:29 UTC (rev 13090) @@ -146,7 +146,7 @@ $ret .= '<table id="xo-logger-blocks" class="outer"><tr><th colspan="2">' . _LOGGER_BLOCKS . '</th></tr>'; foreach ($this->blocks as $b) { if ($b['cached']) { - $ret .= '<tr><td class="' . $class . '"><strong>' . $b['name'] . ':</strong> ' . sprintf(_LOGGER_CACHED, intval($b['cachetime'])) . '</td></tr>'; + $ret .= '<tr><td class="' . $class . '"><strong>' . $b['name'] . ':</strong> ' . sprintf(_LOGGER_CACHED, (int)($b['cachetime'])) . '</td></tr>'; } else { $ret .= '<tr><td class="' . $class . '"><strong>' . $b['name'] . ':</strong> ' . _LOGGER_NOT_CACHED . '</td></tr>'; } Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/class/model/joint.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.8/htdocs/class/model/joint.php 2015-06-13 22:09:36 UTC (rev 13089) +++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/model/joint.php 2015-06-16 20:44:29 UTC (rev 13090) @@ -144,7 +144,7 @@ return false; } $myrow = $this->handler->db->fetchArray($result); - return intval($myrow["count"]); + return (int)($myrow["count"]); } /** Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/class/model/write.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.8/htdocs/class/model/write.php 2015-06-13 22:09:36 UTC (rev 13089) +++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/model/write.php 2015-06-16 20:44:29 UTC (rev 13090) @@ -73,8 +73,8 @@ continue; } $cleanv = xoops_convert_encode($cleanv); - if (isset($v['maxlength']) && strlen($cleanv) > intval($v['maxlength'])) { - $errors[] = sprintf(_XOBJ_ERR_SHORTERTHAN, $k, intval($v['maxlength'])); + if (isset($v['maxlength']) && strlen($cleanv) > (int)($v['maxlength'])) { + $errors[] = sprintf(_XOBJ_ERR_SHORTERTHAN, $k, (int)($v['maxlength'])); continue; } if (!$v['not_gpc']) { @@ -107,8 +107,8 @@ $errors[] = sprintf(_XOBJ_ERR_REQUIRED, $k); continue; } - if (isset($v['maxlength']) && strlen($cleanv) > intval($v['maxlength'])) { - $errors[] = sprintf(_XOBJ_ERR_SHORTERTHAN, $k, intval($v['maxlength'])); + if (isset($v['maxlength']) && strlen($cleanv) > (int)($v['maxlength'])) { + $errors[] = sprintf(_XOBJ_ERR_SHORTERTHAN, $k, (int)($v['maxlength'])); continue; } if (!$v['not_gpc']) { @@ -213,7 +213,7 @@ break; case XOBJ_DTYPE_INT: - $cleanv = intval($cleanv); + $cleanv = (int)($cleanv); break; case XOBJ_DTYPE_FLOAT: @@ -251,7 +251,7 @@ case XOBJ_DTYPE_STIME: case XOBJ_DTYPE_MTIME: case XOBJ_DTYPE_LTIME: - $cleanv = !is_string($cleanv) ? intval($cleanv) : strtotime($cleanv); + $cleanv = !is_string($cleanv) ? (int)($cleanv) : strtotime($cleanv); break; default: Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/class/pagenav.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.8/htdocs/class/pagenav.php 2015-06-13 22:09:36 UTC (rev 13089) +++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/pagenav.php 2015-06-16 20:44:29 UTC (rev 13090) @@ -48,9 +48,9 @@ */ function XoopsPageNav($total_items, $items_perpage, $current_start, $start_name = "start", $extra_arg = "") { - $this->total = intval($total_items); - $this->perpage = intval($items_perpage); - $this->current = intval($current_start); + $this->total = (int)($total_items); + $this->perpage = (int)($items_perpage); + $this->current = (int)($current_start); $this->extra = $extra_arg; if ($extra_arg != '' && (substr($extra_arg, - 5) != '&' || substr($extra_arg, - 1) != '&')) { $this->extra = '&' . $extra_arg; @@ -79,7 +79,7 @@ $ret .= '<a class="xo-pagarrow" href="' . $this->url . $prev . $this->extra . '"><u>«</u></a> '; } $counter = 1; - $current_page = intval(floor(($this->current + $this->perpage) / $this->perpage)); + $current_page = (int)(floor(($this->current + $this->perpage) / $this->perpage)); while ($counter <= $total_pages) { if ($counter == $current_page) { $ret .= '<strong class="xo-pagact" >(' . $counter . ')</strong> '; @@ -122,7 +122,7 @@ $ret = '<form name="pagenavform">'; $ret .= '<select name="pagenavselect" onchange="location=this.options[this.options.selectedIndex].value;">'; $counter = 1; - $current_page = intval(floor(($this->current + $this->perpage) / $this->perpage)); + $current_page = (int)(floor(($this->current + $this->perpage) / $this->perpage)); while ($counter <= $total_pages) { if ($counter == $current_page) { $ret .= '<option value="' . $this->url . (($counter - 1) * $this->perpage) . $this->extra . '" selected="selected">' . $counter . '</option>'; @@ -163,7 +163,7 @@ $ret .= '<td class="pagno"></a></td><td><img src="' . XOOPS_URL . '/images/blank.gif" width="6" alt="" /></td>'; } $counter = 1; - $current_page = intval(floor(($this->current + $this->perpage) / $this->perpage)); + $current_page = (int)(floor(($this->current + $this->perpage) / $this->perpage)); while ($counter <= $total_pages) { if ($counter == $current_page) { $ret .= '<td class="pagact"><strong>' . $counter . '</strong></td>'; Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/plugins/function.html_select_time.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/plugins/function.html_select_time.php 2015-06-13 22:09:36 UTC (rev 13089) +++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/plugins/function.html_select_time.php 2015-06-16 20:44:29 UTC (rev 13090) @@ -111,7 +111,7 @@ $all_minutes = range(0, 59); for ($i = 0, $for_max = count($all_minutes); $i < $for_max; $i+= $minute_interval) $minutes[] = sprintf('%02d', $all_minutes[$i]); - $selected = intval(floor(strftime('%M', $time) / $minute_interval) * $minute_interval); + $selected = (int)(floor(strftime('%M', $time) / $minute_interval) * $minute_interval); $html_result .= '<select name='; if (null !== $field_array) { $html_result .= '"' . $field_array . '[' . $prefix . 'Minute]"'; @@ -138,7 +138,7 @@ $all_seconds = range(0, 59); for ($i = 0, $for_max = count($all_seconds); $i < $for_max; $i+= $second_interval) $seconds[] = sprintf('%02d', $all_seconds[$i]); - $selected = intval(floor(strftime('%S', $time) / $second_interval) * $second_interval); + $selected = (int)(floor(strftime('%S', $time) / $second_interval) * $second_interval); $html_result .= '<select name='; if (null !== $field_array) { $html_result .= '"' . $field_array . '[' . $prefix . 'Second]"'; Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/xoops_plugins/function.block.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/xoops_plugins/function.block.php 2015-06-13 22:09:36 UTC (rev 13089) +++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/xoops_plugins/function.block.php 2015-06-16 20:44:29 UTC (rev 13090) @@ -35,9 +35,9 @@ $display_none = (isset($params['display']) && $params['display'] == 'none') ? true : false; $options = (isset($params['options'])) ? $params['options'] : false; $groups = (isset($params['groups'])) ? explode('|', $params['groups']) : false; - $cache = (isset($params['cache'])) ? intval($params['cache']) : false; + $cache = (isset($params['cache'])) ? (int)($params['cache']) : false; - $block_id = intval($params['id']); + $block_id = (int)($params['id']); static $block_objs; if (!isset($block_objs[$block_id])) { @@ -79,7 +79,7 @@ $xoopsLogger =& XoopsLogger::getInstance(); $template =& $GLOBALS['xoopsTpl']; - $bcachetime = intval($blockObj->getVar('bcachetime')); + $bcachetime = (int)($blockObj->getVar('bcachetime')); if (empty($bcachetime)) { $template->caching = 0; } else { Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/xoops_plugins/function.xoInboxCount.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/xoops_plugins/function.xoInboxCount.php 2015-06-13 22:09:36 UTC (rev 13089) +++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/xoops_plugins/function.xoInboxCount.php 2015-06-16 20:44:29 UTC (rev 13090) @@ -13,7 +13,7 @@ } $time = time(); if (isset($_SESSION['xoops_inbox_count']) && @$_SESSION['xoops_inbox_count_expire'] > $time) { - $count = intval($_SESSION['xoops_inbox_count']); + $count = (int)($_SESSION['xoops_inbox_count']); } else { $pm_handler =& xoops_gethandler('privmessage'); @@ -22,7 +22,7 @@ $criteria = new CriteriaCompo(new Criteria('read_msg', 0)); $criteria->add(new Criteria('to_userid', $xoopsUser->getVar('uid'))); - $count = intval($pm_handler->getCount($criteria)); + $count = (int)($pm_handler->getCount($criteria)); $_SESSION['xoops_inbox_count'] = $count; $_SESSION['xoops_inbox_count_expire'] = $time + 60; } Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/xoops_plugins/function.xoPageNav.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/xoops_plugins/function.xoPageNav.php 2015-06-13 22:09:36 UTC (rev 13089) +++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/xoops_plugins/function.xoPageNav.php 2015-06-16 20:44:29 UTC (rev 13090) @@ -23,13 +23,13 @@ if ($pageSize < 1) { $pageSize = 10; } - $pagesCount = intval($itemsCount / $pageSize); + $pagesCount = (int)($itemsCount / $pageSize); if ($itemsCount <= $pageSize || $pagesCount < 2) { return ''; } $str = ''; - $currentPage = intval($offset / $pageSize) + 1; - $lastPage = intval($itemsCount / $pageSize) + 1; + $currentPage = (int)($offset / $pageSize) + 1; + $lastPage = (int)($itemsCount / $pageSize) + 1; $minPage = min(1, ceil($currentPage - $linksCount / 2)); $maxPage = max($lastPage, floor($currentPage + $linksCount / 2)); Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/class/theme_blocks.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.8/htdocs/class/theme_blocks.php 2015-06-13 22:09:36 UTC (rev 13089) +++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/theme_blocks.php 2015-06-16 20:44:29 UTC (rev 13090) @@ -172,7 +172,7 @@ 'weight' => $xobject->getVar('weight') , 'lastmod' => $xobject->getVar('last_modified')); - $bcachetime = intval($xobject->getVar('bcachetime')); + $bcachetime = (int)($xobject->getVar('bcachetime')); if (empty($bcachetime)) { $template->caching = 0; } else { Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/class/uploader.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.8/htdocs/class/uploader.php 2015-06-13 22:09:36 UTC (rev 13089) +++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/uploader.php 2015-06-16 20:44:29 UTC (rev 13090) @@ -130,7 +130,7 @@ $maxUploadInBytes = $this->return_bytes(ini_get('upload_max_filesize')); $maxPostInBytes = $this->return_bytes(ini_get('post_max_size')); $memoryLimitInBytes = $this->return_bytes(ini_get('memory_limit')); - if (intval($maxFileSize) > 0) { + if ((int)($maxFileSize) > 0) { $maxFileSizeInBytes = $this->return_bytes($maxFileSize); $newMaxFileSize = min($maxFileSizeInBytes, $maxUploadInBytes, $maxPostInBytes, $memoryLimitInBytes); } else { @@ -139,10 +139,10 @@ $this->maxFileSize = $newMaxFileSize; if (isset($maxWidth)) { - $this->maxWidth = intval($maxWidth); + $this->maxWidth = (int)($maxWidth); } if (isset($maxHeight)) { - $this->maxHeight = intval($maxHeight); + $this->maxHeight = (int)($maxHeight); } if (isset($randomFilename)) { $this->randomFilename = $randomFilename; @@ -210,7 +210,7 @@ return false; } else if (is_array($_FILES[$media_name]['name']) && isset($index)) { - $index = intval($index); + $index = (int)($index); $this->mediaName = (get_magic_quotes_gpc()) ? stripslashes($_FILES[$media_name]['name'][$index]) : $_FILES[$media_name]['name'][$index]; if ($this->randomFilename) { $unique = uniqid(time()); @@ -240,7 +240,7 @@ } } $this->errors = array(); - if (intval($this->mediaSize) < 0) { + if ((int)($this->mediaSize) < 0) { $this->setErrors(_ER_UP_INVALIDFILESIZE); return false; @@ -271,7 +271,7 @@ */ function setTargetFileName($value) { - $this->targetFileName = strval(trim($value)); + $this->targetFileName = (string)(trim($value)); } /** @@ -281,7 +281,7 @@ */ function setPrefix($value) { - $this->prefix = strval(trim($value)); + $this->prefix = (string)(trim($value)); } /** Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/class/userutility.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.8/htdocs/class/userutility.php 2015-06-13 22:09:36 UTC (rev 13089) +++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/userutility.php 2015-06-16 20:44:29 UTC (rev 13090) @@ -300,7 +300,7 @@ static function getUnameFromId($userid, $usereal = false, $linked = false) { $myts =& MyTextSanitizer::getInstance(); - $userid = intval($userid); + $userid = (int)($userid); $username = ''; if ($userid > 0) { $member_handler = &xoops_gethandler('member'); Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xml/rpc/xmlrpcparser.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xml/rpc/xmlrpcparser.php 2015-06-13 22:09:36 UTC (rev 13089) +++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xml/rpc/xmlrpcparser.php 2015-06-16 20:44:29 UTC (rev 13090) @@ -335,7 +335,7 @@ */ function handleCharacterData(&$parser, &$data) { - $parser->setTempValue(intval($data)); + $parser->setTempValue((int)($data)); } } @@ -409,7 +409,7 @@ */ function handleCharacterData(&$parser, &$data) { - $parser->setTempValue(strval($data)); + $parser->setTempValue((string)($data)); } } Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xml/rpc/xmlrpctag.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xml/rpc/xmlrpctag.php 2015-06-13 22:09:36 UTC (rev 13089) +++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xml/rpc/xmlrpctag.php 2015-06-16 20:44:29 UTC (rev 13090) @@ -141,7 +141,7 @@ */ function setFault($fault = true) { - $this->_fault = (intval($fault) > 0) ? true : false; + $this->_fault = ((int)($fault) > 0) ? true : false; } /** @@ -173,7 +173,7 @@ function XoopsXmlRpcFault($code, $extra = null) { $this->setFault(true); - $this->_code = intval($code); + $this->_code = (int)($code); $this->_extra = isset($extra) ? trim($extra) : ''; } @@ -239,7 +239,7 @@ */ function XoopsXmlRpcInt($value) { - $this->_value = intval($value); + $this->_value = (int)($value); } /** @@ -314,7 +314,7 @@ */ function XoopsXmlRpcString($value) { - $this->_value = strval($value); + $this->_value = (string)($value); } /** @@ -342,7 +342,7 @@ if (!is_numeric($value)) { $this->_value = strtotime($value); } else { - $this->_value = intval($value); + $this->_value = (int)($value); } } Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xml/rpc/xoopsapi.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xml/rpc/xoopsapi.php 2015-06-13 22:09:36 UTC (rev 13089) +++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xml/rpc/xoopsapi.php 2015-06-16 20:44:29 UTC (rev 13090) @@ -81,7 +81,7 @@ include_once XOOPS_ROOT_PATH.'/modules/news/class/class.newsstory.php'; $story = new NewsStory(); $error = false; - if (intval($this->params[4]) > 0) { + if ((int)($this->params[4]) > 0) { if (!$this->_checkAdmin()) { // non admin users cannot publish $error = true; @@ -100,7 +100,7 @@ } if (!$error) { if (isset($post['categories']) && !empty($post['categories'][0])) { - $story->setTopicId(intval($post['categories'][0]['categoryId'])); + $story->setTopicId((int)($post['categories'][0]['categoryId'])); } else { $story->setTopicId(1); } @@ -280,10 +280,10 @@ $this->response->add(new XoopsXmlRpcFault(104)); } else { include_once XOOPS_ROOT_PATH.'/modules/news/class/class.newsstory.php'; - if (isset($this->params[4]) && intval($this->params[4]) > 0) { - $stories =& NewsStory::getAllPublished(intval($this->params[3]), 0, $this->params[4]); + if (isset($this->params[4]) && (int)($this->params[4]) > 0) { + $stories =& NewsStory::getAllPublished((int)($this->params[3]), 0, $this->params[4]); } else { - $stories =& NewsStory::getAllPublished(intval($this->params[3])); + $stories =& NewsStory::getAllPublished((int)($this->params[3])); } $scount = count($stories); $ret = array(); Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopsblock.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopsblock.php 2015-06-13 22:09:36 UTC (rev 13089) +++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopsblock.php 2015-06-16 20:44:29 UTC (rev 13090) @@ -70,7 +70,7 @@ if (is_array($id)) { $this->assignVars($id); } else { - $this->load(intval($id)); + $this->load((int)($id)); } } } @@ -82,7 +82,7 @@ */ function load($id) { - $id = intval($id); + $id = (int)($id); $sql = 'SELECT * FROM ' . $this->db->prefix('newblocks') . ' WHERE bid = ' . $id; $arr = $this->db->fetchArray($this->db->query($sql)); $this->assignVars($arr); @@ -467,7 +467,7 @@ */ static function getByModule($moduleid, $asobject = true) { - $moduleid = intval($moduleid); + $moduleid = (int)($moduleid); $db =& XoopsDatabaseFactory::getDatabaseConnection(); if ($asobject == true) { $sql = $sql = "SELECT * FROM " . $db->prefix("newblocks") . " WHERE mid=" . $moduleid; @@ -500,7 +500,7 @@ */ function getAllByGroupModule($groupid, $module_id = 0, $toponlyblock = false, $visible = null, $orderby = 'b.weight, m.block_id', $isactive = 1) { - $isactive = intval($isactive); + $isactive = (int)($isactive); $db =& XoopsDatabaseFactory::getDatabaseConnection(); $ret = array(); if (isset($groupid)) { @@ -508,8 +508,8 @@ if (is_array($groupid)) { $sql .= ' AND gperm_groupid IN (' . implode(',', $groupid) . ')'; } else { - if (intval($groupid) > 0) { - $sql .= ' AND gperm_groupid=' . intval($groupid); + if ((int)($groupid) > 0) { + $sql .= ' AND gperm_groupid=' . (int)($groupid); } } $result = $db->query($sql); @@ -524,11 +524,11 @@ $sql = 'SELECT b.* FROM ' . $db->prefix('newblocks') . ' b, ' . $db->prefix('block_module_link') . ' m WHERE m.block_id=b.bid'; $sql .= ' AND b.isactive=' . $isactive; if (isset($visible)) { - $sql .= ' AND b.visible=' . intval($visible); + $sql .= ' AND b.visible=' . (int)($visible); } if (!isset($module_id)) { } elseif (!empty($module_id)) { - $sql .= ' AND m.module_id IN (0,' . intval($module_id); + $sql .= ' AND m.module_id IN (0,' . (int)($module_id); if ($toponlyblock) { $sql .= ',-1'; } @@ -585,13 +585,13 @@ $non_grouped = array_diff($bids, $grouped); if (!empty($non_grouped)) { $sql = 'SELECT b.* FROM ' . $db->prefix('newblocks') . ' b, ' . $db->prefix('block_module_link') . ' m WHERE m.block_id=b.bid'; - $sql .= ' AND b.isactive=' . intval($isactive); + $sql .= ' AND b.isactive=' . (int)($isactive); if (isset($visible)) { - $sql .= ' AND b.visible=' . intval($visible); + $sql .= ' AND b.visible=' . (int)($visible); } if (!isset($module_id)) { } elseif (!empty($module_id)) { - $sql .= ' AND m.module_id IN (0,' . intval($module_id); + $sql .= ' AND m.module_id IN (0,' . (int)($module_id); if ($toponlyblock) { $sql .= ',-1'; } @@ -626,8 +626,8 @@ */ function countSimilarBlocks($moduleId, $funcNum, $showFunc = null) { - $funcNum = intval($funcNum); - $moduleId = intval($moduleId); + $funcNum = (int)($funcNum); + $moduleId = (int)($moduleId); if ($funcNum < 1 || $moduleId < 1) { // invalid query return 0; Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopscomments.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopscomments.php 2015-06-13 22:09:36 UTC (rev 13089) +++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopscomments.php 2015-06-16 20:44:29 UTC (rev 13090) @@ -69,7 +69,7 @@ if (is_array($id)) { $this->assignVars($id); } else { - $this->load(intval($id)); + $this->load((int)($id)); } } } @@ -81,7 +81,7 @@ */ function load($id) { - $id = intval($id); + $id = (int)($id); $sql = "SELECT * FROM " . $this->ctable . " WHERE comment_id=" . $id; $arr = $this->db->fetchArray($this->db->query($sql)); $this->assignVars($arr); @@ -244,12 +244,12 @@ if ($order == 1) { echo " selected='selected'"; } - echo ">" . _NEWESTFIRST . "</option></select><input type='hidden' name='item_id' value='" . intval($item_id) . "' /><input type='submit' value='" . _CM_REFRESH . "' />"; + echo ">" . _NEWESTFIRST . "</option></select><input type='hidden' name='item_id' value='" . (int)($item_id) . "' /><input type='submit' value='" . _CM_REFRESH . "' />"; if ($xoopsConfig['anonpost'] == 1 || $xoopsUser) { if ($mode != "flat" || $mode != "nocomments" || $mode != "thread") { $mode = "flat"; } - echo " <input type='button' onclick='location=\"newcomment.php?item_id=" . intval($item_id) . "&order=" . intval($order) . "&mode=" . $mode . "\"' value='" . _CM_POSTCOMMENT . "' />"; + echo " <input type='button' onclick='location=\"newcomment.php?item_id=" . (int)($item_id) . "&order=" . (int)($order) . "&mode=" . $mode . "\"' value='" . _CM_POSTCOMMENT . "' />"; } echo "</td></tr></table></form>"; } @@ -297,13 +297,13 @@ $ip_image = "<img src='" . XOOPS_URL . "/images/icons/ip.gif' alt='' />"; } if ($adminview || ($xoopsUser && $this->getVar("user_id") == $xoopsUser->getVar("uid"))) { - $edit_image = "<a href='editcomment.php?comment_id=" . $this->getVar("comment_id") . "&mode=" . $mode . "&order=" . intval($order) . "'><img src='" . XOOPS_URL . "/images/icons/edit.gif' alt='" . _EDIT . "' /></a>"; + $edit_image = "<a href='editcomment.php?comment_id=" . $this->getVar("comment_id") . "&mode=" . $mode . "&order=" . (int)($order) . "'><img src='" . XOOPS_URL . "/images/icons/edit.gif' alt='" . _EDIT . "' /></a>"; } if ($xoopsConfig['anonpost'] || $xoopsUser) { - $reply_image = "<a href='replycomment.php?comment_id=" . $this->getVar("comment_id") . "&mode=" . $mode . "&order=" . intval($order) . "'><img src='" . XOOPS_URL . "/images/icons/reply.gif' alt='" . _REPLY . "' /></a>"; + $reply_image = "<a href='replycomment.php?comment_id=" . $this->getVar("comment_id") . "&mode=" . $mode . "&order=" . (int)($order) . "'><img src='" . XOOPS_URL . "/images/icons/reply.gif' alt='" . _REPLY . "' /></a>"; } if ($adminview) { - $delete_image = "<a href='deletecomment.php?comment_id=" . $this->getVar("comment_id") . "&mode=" . $mode . "&order=" . intval($order) . "'><img src='" . XOOPS_URL . "/images/icons/delete.gif' alt='" . _DELETE . "' /></a>"; + $delete_image = "<a href='deletecomment.php?comment_id=" . $this->getVar("comment_id") . "&mode=" . $mode . "&order=" . (int)($order) . "'><img src='" . XOOPS_URL . "/images/icons/delete.gif' alt='" . _DELETE . "' /></a>"; } if ($poster) { Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/xoopsemotions/xoopsemotions.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/xoopsemotions/xoopsemotions.php 2015-06-13 22:09:36 UTC (rev 13089) +++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/xoopsemotions/xoopsemotions.php 2015-06-16 20:44:29 UTC (rev 13090) @@ -63,7 +63,7 @@ $smile_url = $uploader->getSavedFileName(); $smile_code = $myts->stripSlashesGPC($_POST['smile_code']); $smile_desc = $myts->stripSlashesGPC($_POST['smile_desc']); - $smile_display = intval($_POST['smile_display']) > 0 ? 1 : 0; + $smile_display = (int)($_POST['smile_display']) > 0 ? 1 : 0; $newid = $db->genId($db->prefix('smilies')."_id_seq"); $sql = sprintf("INSERT INTO %s (id, code, smile_url, emotion, display) VALUES (%d, %s, %s, %s, %d)", $db->prefix('smiles'), $newid, $db->quoteString($smile_code), $db->quoteString($smile_url), $db->quoteString($smile_desc), $smile_display); if (!$db->query($sql)) { Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/xoopsimagemanager/xoopsimagebrowser.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/xoopsimagemanager/xoopsimagebrowser.php 2015-06-13 22:09:36 UTC (rev 13089) +++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/xoopsimagemanager/xoopsimagebrowser.php 2015-06-16 20:44:29 UTC (rev 13090) @@ -78,15 +78,15 @@ } if (isset($_GET["image_id"])) { - $image_id = intval($_GET["image_id"]); + $image_id = (int)($_GET["image_id"]); } if (isset($_GET["imgcat_id"])) { - $imgcat_id = intval($_GET["imgcat_id"]); + $imgcat_id = (int)($_GET["imgcat_id"]); } if (isset($imgcat_id)) { - $imgcat_id = intval($imgcat_id); + $imgcat_id = (int)($imgcat_id); } $target = htmlspecialchars($target); @@ -129,7 +129,7 @@ if (!$GLOBALS["xoopsSecurity"]->check()) { redirect_header($current_file . "?target=" . $target, 3, implode("<br />", $GLOBALS["xoopsSecurity"]->getErrors())); } - $imgcat =& $imgcat_handler->get(intval($imgcat_id)); + $imgcat =& $imgcat_handler->get((int)($imgcat_id)); if (!is_object($imgcat)) { redirect_header($current_file . "?target=" . $target, 3); } @@ -308,7 +308,7 @@ if (!$GLOBALS["xoopsSecurity"]->check()) { redirect_header($current_file . "?target=" . $target, 3, implode("<br />", $GLOBALS["xoopsSecurity"]->getErrors())); } - $imgcat_id = intval($imgcat_id); + $imgcat_id = (int)($imgcat_id); if ($imgcat_id <= 0) { redirect_header($current_file . "?target=" . $target, 3); } @@ -358,7 +358,7 @@ if (!$GLOBALS["xoopsSecurity"]->check()) { redirect_header($current_file . "?target=" . $target, 3, implode("<br />", $GLOBALS["xoopsSecurity"]->getErrors())); } - $image_id = intval($image_id); + $image_id = (int)($image_id); if ($image_id <= 0) { redirect_header($current_file . "?target=" . $target, 3); } @@ -448,7 +448,7 @@ //list images - start if ($op == 'listimg') { - $imgcat_id = intval($imgcat_id); + $imgcat_id = (int)($imgcat_id); if ($imgcat_id <= 0) { redirect_header($current_file . '?target=' . $target, 1); } @@ -461,7 +461,7 @@ $criteria = new Criteria('imgcat_id', $imgcat_id); $imgcount = $image_handler->getCount($criteria); - $start = isset($_GET['start']) ? intval($_GET['start']) : 0; + $start = isset($_GET['start']) ? (int)($_GET['start']) : 0; $criteria->setStart($start); $criteria->setLimit(20); $images =& $image_handler->getObjects($criteria, true, false); Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopsform/formdatetime.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopsform/formdatetime.php 2015-06-13 22:09:36 UTC (rev 13089) +++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopsform/formdatetime.php 2015-06-16 20:44:29 UTC (rev 13090) @@ -41,7 +41,7 @@ function XoopsFormDateTime($caption, $name, $size = 15, $value = 0, $showtime = true) { $this->XoopsFormElementTray($caption, ' '); - $value = intval($value); + $value = (int)($value); $value = ($value > 0) ? $value : time(); $datetime = getDate($value); $this->addElement(new XoopsFormTextDateSelect('', $name . '[date]', $size, $value, $showtime)); Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopsform/formdhtmltextarea.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopsform/formdhtmltextarea.php 2015-06-13 22:09:36 UTC (rev 13089) +++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopsform/formdhtmltextarea.php 2015-06-16 20:44:29 UTC (rev 13090) @@ -161,7 +161,7 @@ $GLOBALS['xoTheme']->addScript('/class/textsanitizer/image/image.js', array('type' => 'text/javascript')); } $button = // "<br />" . -"<input " . " id='" . $this->getName() . "_preview_button'" . " type='button' " . " value='" . _PREVIEW . "' " . " onclick=\"form_instantPreview('" . XOOPS_URL . "', '" . $this->getName() . "','" . XOOPS_URL . "/images', " . intval($this->doHtml) . ", '" . $GLOBALS['xoopsSecurity']->createToken() . "')\"" . " />"; +"<input " . " id='" . $this->getName() . "_preview_button'" . " type='button' " . " value='" . _PREVIEW . "' " . " onclick=\"form_instantPreview('" . XOOPS_URL . "', '" . $this->getName() . "','" . XOOPS_URL . "/images', " . (int)($this->doHtml) . ", '" . $GLOBALS['xoopsSecurity']->createToken() . "')\"" . " />"; $ret .= "<br />" . "<div id='" . $this->getName() . "_hidden' style='display: block;'> " . " <fieldset>" . " <legend>" . $button . "</legend>" . " <div id='" . $this->getName() . "_hidden_data'>" . _XOOPS_FORM_PREVIEW_CONTENT . "</div>" . " </fieldset>" . "</div>"; } // Load javascript Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopsform/formfile.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopsform/formfile.php 2015-06-13 22:09:36 UTC (rev 13089) +++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopsform/formfile.php 2015-06-16 20:44:29 UTC (rev 13090) @@ -44,7 +44,7 @@ { $this->setCaption($caption); $this->setName($name); - $this->_maxFileSize = intval($maxfilesize); + $this->_maxFileSize = (int)($maxfilesize); } /** Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopsform/formpassword.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopsform/formpassword.php 2015-06-13 22:09:36 UTC (rev 13089) +++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopsform/formpassword.php 2015-06-16 20:44:29 UTC (rev 13090) @@ -73,8 +73,8 @@ { $this->setCaption($caption); $this->setName($name); - $this->_size = intval($size); - $this->_maxlength = intval($maxlength); + $this->_size = (int)($size); + $this->_maxlength = (int)($maxlength); $this->setValue($value); $this->autoComplete = ! empty($autoComplete); } Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopsform/formselect.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopsform/formselect.php 2015-06-13 22:09:36 UTC (rev 13089) +++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopsform/formselect.php 2015-06-16 20:44:29 UTC (rev 13090) @@ -81,7 +81,7 @@ $this->setCaption($caption); $this->setName($name); $this->_multiple = $multiple; - $this->_size = intval($size); + $this->_size = (int)($size); if (isset($value)) { $this->setValue($value); } Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopsform/formtext.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopsform/formtext.php 2015-06-13 22:09:36 UTC (rev 13089) +++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopsform/formtext.php 2015-06-16 20:44:29 UTC (rev 13090) @@ -62,8 +62,8 @@ { $this->setCaption($caption); $this->setName($name); - $this->_size = intval($size); - $this->_maxlength = intval($maxlength); + $this->_size = (int)($size); + $this->_maxlength = (int)($maxlength); $this->setValue($value); } Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopsform/formtextarea.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopsform/formtextarea.php 2015-06-13 22:09:36 UTC (rev 13089) +++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopsform/formtextarea.php 2015-06-16 20:44:29 UTC (rev 13090) @@ -64,8 +64,8 @@ { $this->setCaption($caption); $this->setName($name); - $this->_rows = intval($rows); - $this->_cols = intval($cols); + $this->_rows = (int)($rows); + $this->_cols = (int)($cols); $this->setValue($value); } Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopsform/formtextdateselect.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopsform/formtextdateselect.php 2015-06-13 22:09:36 UTC (rev 13089) +++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopsform/formtextdateselect.php 2015-06-16 20:44:29 UTC (rev 13090) @@ -35,7 +35,7 @@ */ function XoopsFormTextDateSelect($caption, $name, $size = 15, $value = 0) { - $value = !is_numeric($value) ? time() : intval($value); + $value = !is_numeric($value) ? time() : (int)($value); $value = ($value == 0) ? time() : $value; $this->XoopsFormText($caption, $name, $size, 25, $value); } Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopsform/grouppermform.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopsform/grouppermform.php 2015-06-13 22:09:36 UTC (rev 13089) +++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopsform/grouppermform.php 2015-06-16 20:44:29 UTC (rev 13090) @@ -69,7 +69,7 @@ function XoopsGroupPermForm($title, $modid, $permname, $permdesc, $url = '', $anonymous = true) { $this->XoopsForm($title, 'groupperm_form', XOOPS_URL . '/modules/system/admin/groupperm.php', 'post'); - $this->_modid = intval($modid); + $this->_modid = (int)($modid); $this->_permName = $permname; $this->_permDesc = $permdesc; $this->addElement(new XoopsFormHidden('modid', $this->_modid)); Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopslocal.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopslocal.php 2015-06-13 22:09:36 UTC (rev 13089) +++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopslocal.php 2015-06-16 20:44:29 UTC (rev 13090) @@ -133,11 +133,11 @@ if ($format == 'rss' || $format == 'r') { $TIME_ZONE = ''; if (isset($GLOBALS['xoopsConfig']['server_TZ'])) { - $server_TZ = abs(intval($GLOBALS['xoopsConfig']['server_TZ'] * 3600.0)); + $server_TZ = abs((int)($GLOBALS['xoopsConfig']['server_TZ'] * 3600.0)); $prefix = ($GLOBALS['xoopsConfig']['server_TZ'] < 0) ? ' -' : ' +'; $TIME_ZONE = $prefix . date('Hi', $server_TZ); } - $date = gmdate('D, d M Y H:i:s', intval($time)) . $TIME_ZONE; + $date = gmdate('D, d M Y H:i:s', (int)($time)) . $TIME_ZONE; return $date; } Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopssecurity.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopssecurity.php 2015-06-13 22:09:36 UTC (rev 13089) +++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopssecurity.php 2015-06-16 20:44:29 UTC (rev 13090) @@ -69,7 +69,7 @@ } $token_data = array( 'id' => $token_id , - 'expire' => time() + intval($timeout)); + 'expire' => time() + (int)($timeout)); array_push($_SESSION[$name . '_SESSION'], $token_data); return md5($token_id . $_SERVER['HTTP_USER_AGENT'] . XOOPS_DB_PREFIX); Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopsstory.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopsstory.php 2015-06-13 22:09:36 UTC (rev 13089) +++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopsstory.php 2015-06-16 20:44:29 UTC (rev 13090) @@ -65,7 +65,7 @@ if ( is_array($storyid) ) { $this->makeStory($storyid); } elseif ($storyid != -1) { - $this->getStory(intval($storyid)); + $this->getStory((int)($storyid)); } } @@ -74,7 +74,7 @@ */ function setStoryId($value) { - $this->storyid = intval($value); + $this->storyid = (int)($value); } /** @@ -82,7 +82,7 @@ */ function setTopicId($value) { - $this->topicid = intval($value); + $this->topicid = (int)($value); } /** @@ -90,7 +90,7 @@ */ function setUid($value) { - $this->uid = intval($value); + $this->uid = (int)($value); } /** @@ -122,7 +122,7 @@ */ function setPublished($value) { - $this->published = intval($value); + $this->published = (int)($value); } /** @@ -130,7 +130,7 @@ */ function setExpired($value) { - $this->e... [truncated message content] |