|
From: <be...@us...> - 2014-09-21 05:42:04
|
Revision: 12795
http://sourceforge.net/p/xoops/svn/12795
Author: beckmi
Date: 2014-09-21 05:41:46 +0000 (Sun, 21 Sep 2014)
Log Message:
-----------
converting $i++ to ++$i for improved performance
Modified Paths:
--------------
XoopsCore/branches/2.5.x/2.5.8/docs/changelog.250.txt
XoopsCore/branches/2.5.x/2.5.8/htdocs/Frameworks/moduleclasses/moduleadmin/moduleadmin.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/xcache.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/class.tar.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/database/sqlutility.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/class/mail/phpmailer/class.phpmailer.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/class/model/write.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/class/module.textsanitizer.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/class/pagenav.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/class/preload.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/Config_File.class.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/Smarty_Compiler.class.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/internals/core.process_cached_inserts.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/internals/core.write_cache_file.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/internals/core.write_compiled_include.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/plugins/block.textformat.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/plugins/function.config_load.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/plugins/function.html_select_date.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/plugins/function.html_table.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/plugins/function.mailto.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/plugins/modifier.escape.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/plugins/outputfilter.trimwhitespace.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/snoopy.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/class/tardownloader.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/class/template.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xml/rpc/bloggerapi.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xml/rpc/metaweblogapi.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/xoopseditor/tinymce/tinymce.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopseditor/xoopseditor.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopsfilterinput.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopsform/form.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopsform/formcheckbox.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/formelementtray.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopsform/formradio.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopsform/grouppermform.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/imagemanager.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/include/comment_view.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/include/findusers.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/include/functions.encoding.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/include/functions.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/include/notification_select.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/include/old_functions.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/include/xoopscodes.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/makedata.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/install/include/modulesadmin.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/install/page_moduleinstaller.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/kernel/config.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/kernel/configitem.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/kernel/object.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/misc.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/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/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/tplsets/main.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/block.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/modules/system/class/gui.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/modules/system/class/maintenance.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/modules/system/class/menu.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/class/thumbs/phpthumb.ico.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/modules/system/class/thumbs/phpthumb.unsharp.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/modules/system/help.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/modules/system/xoops_version.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/category.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/prefix_manager.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/modules/protector/class/ProtectorMysqlDatabase.class.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/library/HTMLPurifier/Arborize.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/AttrCollections.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/AttrDef/CSS/Background.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/AttrDef/CSS/BackgroundPosition.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/AttrDef/CSS/Font.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/AttrDef/CSS/FontFamily.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/AttrDef/CSS/Ident.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/AttrDef/CSS/ListStyle.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/AttrDef/CSS/Multiple.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/AttrDef/Clone.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/AttrDef/Lang.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/AttrDef/URI/Host.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/AttrDef.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/AttrTransform/Nofollow.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/AttrTransform/TargetBlank.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/ChildDef/List.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/Config.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/Encoder.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/Filter/ExtractStyleBlocks.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/Generator.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/HTMLModule/Iframe.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/HTMLModule/Legacy.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/HTMLModule/Nofollow.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/HTMLModule/TargetBlank.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/HTMLModule/Tidy.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/Injector/AutoParagraph.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/Injector/Linkify.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/Injector/PurifierLinkify.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/Injector/RemoveEmpty.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/Injector/RemoveSpansWithoutAttributes.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/Injector.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/Language.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/LanguageFactory.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/Lexer/DOMLex.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/Lexer/DirectLex.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/Lexer/PH5P.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/PercentEncoder.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/Strategy/FixNesting.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/Strategy/MakeWellFormed.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/Token.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/URIFilter/DisableResources.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/URIFilter/MakeAbsolute.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/URIFilter/SafeIframe.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/URIScheme/data.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/URIScheme/file.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/UnitConverter.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/Zipper.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/modules/protector/library/HTMLPurifier.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/modules/protector/onuninstall.php
XoopsCore/branches/2.5.x/2.5.8/upgrade/cnt-2.2.x-to-2.3.0/index.php
XoopsCore/branches/2.5.x/2.5.8/upgrade/language.php
XoopsCore/branches/2.5.x/2.5.8/upgrade/upd-2.0.18-to-2.3.0/index.php
XoopsCore/branches/2.5.x/2.5.8/upgrade/upd-2.3.3-to-2.4.0/index.php
XoopsCore/branches/2.5.x/2.5.8/upgrade/upd-2.4.0-to-2.4.1/index.php
Modified: XoopsCore/branches/2.5.x/2.5.8/docs/changelog.250.txt
===================================================================
--- XoopsCore/branches/2.5.x/2.5.8/docs/changelog.250.txt 2014-09-18 21:56:17 UTC (rev 12794)
+++ XoopsCore/branches/2.5.x/2.5.8/docs/changelog.250.txt 2014-09-21 05:41:46 UTC (rev 12795)
@@ -9,6 +9,7 @@
- fix for Update setting Template import date to 0 (timgno/mamba)
- adding Adding language constants for Protector's Prefix Manager (slider84/mamba)
- allowing for "https" URL in YouTube links in Textsanitizer (mamba)
+- converting $i++ to ++$i for improved performance (mamba)
===============================
2014-06-20: Version 2.5.7 Final (Patch)
Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/Frameworks/moduleclasses/moduleadmin/moduleadmin.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.8/htdocs/Frameworks/moduleclasses/moduleadmin/moduleadmin.php 2014-09-18 21:56:17 UTC (rev 12794)
+++ XoopsCore/branches/2.5.x/2.5.8/htdocs/Frameworks/moduleclasses/moduleadmin/moduleadmin.php 2014-09-21 05:41:46 UTC (rev 12795)
@@ -332,7 +332,7 @@
$iReqVerParts = array_map('intval', $reqVerParts);
$icount = $j = count($iReqVerParts);
$reqVer = $curVer = 0;
- for ($i=0; $i<$icount; $i++) {
+ for ($i=0; $i<$icount; ++$i) {
$j--;
$reqVer += $iReqVerParts[$i] * pow(10, $j);
if (isset($iCurrentVerParts[$i])) {
Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/admin.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.8/htdocs/admin.php 2014-09-18 21:56:17 UTC (rev 12794)
+++ XoopsCore/branches/2.5.x/2.5.8/htdocs/admin.php 2014-09-21 05:41:46 UTC (rev 12795)
@@ -97,7 +97,7 @@
if (false != $rss2parser->parse()) {
$_items = $rss2parser->getItems();
$count = count($_items);
- for ($i = 0; $i < $count; $i ++) {
+ 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];
Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/banners.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.8/htdocs/banners.php 2014-09-18 21:56:17 UTC (rev 12794)
+++ XoopsCore/branches/2.5.x/2.5.8/htdocs/banners.php 2014-09-21 05:41:46 UTC (rev 12795)
@@ -149,7 +149,7 @@
<td>{$clicks}</td>
<td>{$percent}%</td>
<td><a href='banners.php?op=EmailStats&cid={$cid}&bid={$bid}' title='" . _BANNERS_STATS . "'>" . _BANNERS_STATS . "</a></td></tr></tbody>";
- $i++;
+ ++$i;
}
echo "</table>
<br /><br />
Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/class/cache/xcache.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.8/htdocs/class/cache/xcache.php 2014-09-18 21:56:17 UTC (rev 12794)
+++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/cache/xcache.php 2014-09-21 05:41:46 UTC (rev 12795)
@@ -134,7 +134,7 @@
{
$result = true;
$this->__auth();
- for ($i = 0, $max = xcache_count(XC_TYPE_VAR); $i < $max; $i++) {
+ for ($i = 0, $max = xcache_count(XC_TYPE_VAR); $i < $max; ++$i) {
if (!xcache_clear_cache(XC_TYPE_VAR, $i)) {
$result = false;
break;
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 2014-09-18 21:56:17 UTC (rev 12794)
+++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/captcha/image/scripts/image.php 2014-09-21 05:41:46 UTC (rev 12795)
@@ -213,8 +213,8 @@
$oImage = imagecreatetruecolor(100, 100);
$text_color = imagecolorallocate($oImage, mt_rand(0, 100), mt_rand(0, 100), mt_rand(0, 100));
$FontSize = $this->config["fontsize_max"];
- for ($Angle = -30; $Angle <= 30; $Angle++) {
- for ($i = 65; $i <= 90; $i++) {
+ for ($Angle = -30; $Angle <= 30; ++$Angle) {
+ for ($i = 65; $i <= 90; ++$i) {
$CharDetails = imageftbbox($FontSize, $Angle, $this->font, chr($i), array());
$_MaxCharWidth = abs($CharDetails[0] + $CharDetails[2]);
if ($_MaxCharWidth > $MaxCharWidth) {
@@ -282,7 +282,7 @@
*/
function drawCode()
{
- for ($i = 0; $i < $this->config["num_chars"] ; $i++) {
+ for ($i = 0; $i < $this->config["num_chars"] ; ++$i) {
// select random greyscale colour
$text_color = imagecolorallocate($this->oImage, mt_rand(0, 100), mt_rand(0, 100), mt_rand(0, 100));
@@ -321,7 +321,7 @@
*/
function drawCircles()
{
- for ($i = 1; $i <= $this->config["background_num"]; $i++) {
+ for ($i = 1; $i <= $this->config["background_num"]; ++$i) {
$randomcolor = imagecolorallocate ($this->oImage, mt_rand(190, 255), mt_rand(190, 255), mt_rand(190, 255));
imagefilledellipse($this->oImage, mt_rand(0, $this->width - 10), mt_rand(0, $this->height - 3), mt_rand(10, 20), mt_rand(20, 30), $randomcolor);
}
@@ -332,7 +332,7 @@
*/
function drawLines()
{
- for ($i = 0; $i < $this->config["background_num"]; $i++) {
+ for ($i = 0; $i < $this->config["background_num"]; ++$i) {
$randomcolor = imagecolorallocate($this->oImage, mt_rand(190, 255), mt_rand(190, 255), mt_rand(190, 255));
imageline($this->oImage, mt_rand(0, $this->width), mt_rand(0, $this->height), mt_rand(0, $this->width), mt_rand(0, $this->height), $randomcolor);
}
@@ -343,7 +343,7 @@
*/
function drawRectangles()
{
- for ($i = 1; $i <= $this->config["background_num"]; $i++) {
+ for ($i = 1; $i <= $this->config["background_num"]; ++$i) {
$randomcolor = imagecolorallocate ($this->oImage , mt_rand(190, 255), mt_rand(190, 255), mt_rand(190, 255));
imagefilledrectangle($this->oImage, mt_rand(0, $this->width), mt_rand(0, $this->height), mt_rand(0, $this->width), mt_rand(0, $this->height), $randomcolor);
}
@@ -371,7 +371,7 @@
*/
function drawEllipses()
{
- for ($i = 1; $i <= $this->config["background_num"]; $i++) {
+ for ($i = 1; $i <= $this->config["background_num"]; ++$i) {
$randomcolor = imagecolorallocate ($this->oImage, mt_rand(190, 255), mt_rand(190, 255), mt_rand(190, 255));
imageellipse($this->oImage, mt_rand(0, $this->width), mt_rand(0, $this->height), mt_rand(0, $this->width), mt_rand(0, $this->height), $randomcolor);
}
@@ -382,10 +382,10 @@
*/
function drawPolygons()
{
- for ($i = 1; $i <= $this->config["background_num"]; $i++) {
+ for ($i = 1; $i <= $this->config["background_num"]; ++$i) {
$randomcolor = imagecolorallocate ($this->oImage, mt_rand(190, 255), mt_rand(190, 255), mt_rand(190, 255));
$coords = array();
- for ($j = 1; $j <= $this->config["polygon_point"]; $j++) {
+ for ($j = 1; $j <= $this->config["polygon_point"]; ++$j) {
$coords[] = mt_rand(0, $this->width);
$coords[] = mt_rand(0, $this->height);
}
Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/class/class.tar.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.8/htdocs/class/class.tar.php 2014-09-18 21:56:17 UTC (rev 12794)
+++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/class.tar.php 2014-09-21 05:41:46 UTC (rev 12795)
@@ -135,10 +135,10 @@
function __computeUnsignedChecksum($bytestring)
{
$unsigned_chksum = '';
- for ($i = 0; $i < 512; $i++) {
+ for ($i = 0; $i < 512; ++$i) {
$unsigned_chksum += ord($bytestring[$i]);
}
- for ($i = 0; $i < 8; $i++) {
+ for ($i = 0; $i < 8; ++$i) {
$unsigned_chksum -= ord($bytestring[148 + $i]);
$unsigned_chksum += ord(' ') * 8;
}
@@ -316,7 +316,7 @@
$header .= str_repeat(chr(0), 12);
// Compute header checksum
$checksum = str_pad(decoct($this->__computeUnsignedChecksum($header)), 6, "0", STR_PAD_LEFT);
- for ($i = 0; $i < 6; $i ++) {
+ for ($i = 0; $i < 6; ++$i) {
$header[(148 + $i)] = substr($checksum, $i, 1);
}
$header[154] = chr(0);
@@ -351,7 +351,7 @@
$header .= str_repeat(chr(0), 12);
// Compute header checksum
$checksum = str_pad(decoct($this->__computeUnsignedChecksum($header)), 6, "0", STR_PAD_LEFT);
- for ($i = 0; $i < 6; $i++) {
+ for ($i = 0; $i < 6; ++$i) {
$header[(148 + $i)] = substr($checksum, $i, 1);
}
$header[154] = chr(0);
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 2014-09-18 21:56:17 UTC (rev 12794)
+++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/commentrenderer.php 2014-09-21 05:41:46 UTC (rev 12795)
@@ -99,7 +99,7 @@
function renderFlatView($admin_view = false)
{
$count = count($this->_comments);
- for ($i = 0; $i < $count; $i++) {
+ for ($i = 0; $i < $count; ++$i) {
if (false != $this->_useIcons) {
$title = $this->_getTitleIcon($this->_comments[$i]->getVar('com_icon')) . ' ' . $this->_comments[$i]->getVar('com_title');
} else {
@@ -219,7 +219,7 @@
$current_prefix .= $prefix;
}
if (isset($thread[$key]['child']) && ! empty($thread[$key]['child'])) {
- $depth++;
+ ++$depth;
foreach ($thread[$key]['child'] as $childkey) {
if (!$admin_view && $thread[$childkey]['obj']->getVar('com_status') != XOOPS_COMMENT_ACTIVE) {
// skip this comment if it is not active and continue on processing its child comments instead
@@ -311,7 +311,7 @@
$prefix = $prefix + 25;
}
if (isset($thread[$key]['child']) && ! empty($thread[$key]['child'])) {
- $depth++;
+ ++$depth;
foreach ($thread[$key]['child'] as $childkey) {
if (!$admin_view && $thread[$childkey]['obj']->getVar('com_status') != XOOPS_COMMENT_ACTIVE) {
// skip this comment if it is not active and continue on processing its child comments instead
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 2014-09-18 21:56:17 UTC (rev 12794)
+++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/criteria.php 2014-09-21 05:41:46 UTC (rev 12795)
@@ -235,7 +235,7 @@
$count = count($this->criteriaElements);
if ($count > 0) {
$render_string = $this->criteriaElements[0]->render();
- for ($i = 1; $i < $count; $i++) {
+ for ($i = 1; $i < $count; ++$i) {
if (!$render = $this->criteriaElements[$i]->render())
continue;
$render_string .= (empty($render_string) ? "" : ' ' . $this->conditions[$i] . ' ') . $render;
@@ -271,7 +271,7 @@
$count = count($this->criteriaElements);
if ($count > 0) {
$retval = $this->criteriaElements[0]->renderLdap();
- for ($i = 1; $i < $count; $i++) {
+ for ($i = 1; $i < $count; ++$i) {
$cond = strtoupper($this->conditions[$i]);
$op = ($cond == "OR") ? "|" : "&";
$retval = "({$op}{$retval}" . $this->criteriaElements[$i]->renderLdap() . ")";
Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/class/database/sqlutility.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.8/htdocs/class/database/sqlutility.php 2014-09-18 21:56:17 UTC (rev 12794)
+++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/database/sqlutility.php 2014-09-21 05:41:46 UTC (rev 12795)
@@ -78,7 +78,7 @@
$escaped_backslash = false;
while ($i - $j > 0 && $sql[$i - $j] == '\\') {
$escaped_backslash = !$escaped_backslash;
- $j++;
+ ++$j;
}
// ... if escaped backslashes: it's really the
// end of the string -> exit the loop
@@ -89,7 +89,7 @@
}
// ... else loop
else {
- $i++;
+ ++$i;
}
} // end if...elseif...else
} // end for
Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/class/mail/phpmailer/class.phpmailer.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.8/htdocs/class/mail/phpmailer/class.phpmailer.php 2014-09-18 21:56:17 UTC (rev 12794)
+++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/mail/phpmailer/class.phpmailer.php 2014-09-21 05:41:46 UTC (rev 12795)
@@ -969,7 +969,7 @@
}
}
}
- $index++;
+ ++$index;
if (!$connection) {
throw new phpmailerException($this->Lang('connect_host'));
}
@@ -1112,10 +1112,10 @@
$line = explode($this->LE, $message);
$message = '';
- for ($i = 0 ;$i < count($line); $i++) {
+ for ($i = 0 ;$i < count($line); ++$i) {
$line_part = explode(' ', $line[$i]);
$buf = '';
- for ($e = 0; $e<count($line_part); $e++) {
+ for ($e = 0; $e<count($line_part); ++$e) {
$word = $line_part[$e];
if ($qp_mode and (strlen($word) > $length)) {
$space_left = $length - strlen($buf) - 1;
@@ -1318,7 +1318,7 @@
}
// Add custom headers
- for ($index = 0; $index < count($this->CustomHeader); $index++) {
+ for ($index = 0; $index < count($this->CustomHeader); ++$index) {
$result .= $this->HeaderLine(trim($this->CustomHeader[$index][0]), $this->EncodeHeader(trim($this->CustomHeader[$index][1])));
}
if (!$this->sign_key_file) {
@@ -1918,7 +1918,7 @@
$offset = $avgLength - $lookBack;
$chunk = mb_substr($str, $i, $offset, $this->CharSet);
$chunk = base64_encode($chunk);
- $lookBack++;
+ ++$lookBack;
} while (strlen($chunk) > $length);
$encoded .= $chunk . $this->LE;
@@ -1950,7 +1950,7 @@
while ( list(, $line) = each($lines) ) {
$linlen = strlen($line);
$newline = '';
- for ($i = 0; $i < $linlen; $i++) {
+ for ($i = 0; $i < $linlen; ++$i) {
$c = substr( $line, $i, 1 );
$dec = ord( $c );
if ( ( $i == 0 ) && ( $dec == 46 ) ) { // convert first point in the line into =2E
@@ -2593,7 +2593,7 @@
{
$tmp = '';
$line = '';
- for ($i = 0; $i < strlen($txt); $i++) {
+ for ($i = 0; $i < strlen($txt); ++$i) {
$ord = ord($txt[$i]);
if ( ((0x21 <= $ord) && ($ord <= 0x3A)) || $ord == 0x3C || ((0x3E <= $ord) && ($ord <= 0x7E)) ) {
$line .= $txt[$i];
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 2014-09-18 21:56:17 UTC (rev 12794)
+++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/model/write.php 2014-09-21 05:41:46 UTC (rev 12795)
@@ -331,7 +331,7 @@
{
if (is_array($this->handler->keyName)) {
$clause = array();
- for ($i = 0; $i < count($this->handler->keyName); $i++) {
+ for ($i = 0; $i < count($this->handler->keyName); ++$i) {
$clause[] = "`" . $this->handler->keyName[$i] . "` = " . $this->handler->db->quote($object->getVar($this->handler->keyName[$i]));
}
$whereclause = implode(" AND ", $clause);
Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/class/module.textsanitizer.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.8/htdocs/class/module.textsanitizer.php 2014-09-18 21:56:17 UTC (rev 12794)
+++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/module.textsanitizer.php 2014-09-21 05:41:46 UTC (rev 12795)
@@ -445,7 +445,7 @@
//-------------------------------------------------------------------------------
$count = sizeof($this->callbackPatterns);
- for ($i = 0; $i < $count; $i++) {
+ for ($i = 0; $i < $count; ++$i) {
$text = preg_replace_callback($this->callbackPatterns[$i], $this->callbacks[$i] , $text);
}
//------------------------------------------------------------------------------
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 2014-09-18 21:56:17 UTC (rev 12794)
+++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/pagenav.php 2014-09-21 05:41:46 UTC (rev 12795)
@@ -92,7 +92,7 @@
$ret .= '... ';
}
}
- $counter ++;
+ ++$counter;
}
$next = $this->current + $this->perpage;
if ($this->total > $next) {
@@ -129,7 +129,7 @@
} else {
$ret .= '<option value="' . $this->url . (($counter - 1) * $this->perpage) . $this->extra . '">' . $counter . '</option>';
}
- $counter ++;
+ ++$counter;
}
$ret .= '</select>';
if ($showbutton) {
@@ -176,7 +176,7 @@
$ret .= '<td class="paginact">...</td>';
}
}
- $counter ++;
+ ++$counter;
}
$next = $this->current + $this->perpage;
if ($this->total > $next) {
Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/class/preload.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.8/htdocs/class/preload.php 2014-09-18 21:56:17 UTC (rev 12794)
+++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/preload.php 2014-09-21 05:41:46 UTC (rev 12795)
@@ -92,7 +92,7 @@
$file = substr($file, 0, -4);
$this->_preloads[$i]['module'] = $module;
$this->_preloads[$i]['file'] = $file;
- $i++;
+ ++$i;
}
}
}
Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/Config_File.class.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/Config_File.class.php 2014-09-18 21:56:17 UTC (rev 12794)
+++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/Config_File.class.php 2014-09-21 05:41:46 UTC (rev 12795)
@@ -290,7 +290,7 @@
/* parse file line by line */
preg_match_all('!^.*\r?\n?!m', $contents, $match);
$lines = $match[0];
- for ($i=0, $count=count($lines); $i<$count; $i++) {
+ for ($i=0, $count=count($lines); $i<$count; ++$i) {
$line = $lines[$i];
if (empty($line)) continue;
@@ -324,7 +324,7 @@
$var_value = '';
while ($i<$count) {
if (($pos = strpos($lines[$i], '"""')) === false) {
- $var_value .= $lines[$i++];
+ $var_value .= $lines[++$i];
} else {
/* end of multiline-value */
$var_value .= substr($lines[$i], 0, $pos);
Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/Smarty_Compiler.class.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/Smarty_Compiler.class.php 2014-09-18 21:56:17 UTC (rev 12794)
+++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/Smarty_Compiler.class.php 2014-09-21 05:41:46 UTC (rev 12795)
@@ -276,17 +276,17 @@
$text_blocks = preg_split("~{$ldq}.*?{$rdq}~s", $source_content);
/* loop through text blocks */
- for ($curr_tb = 0, $for_max = count($text_blocks); $curr_tb < $for_max; $curr_tb++) {
+ for ($curr_tb = 0, $for_max = count($text_blocks); $curr_tb < $for_max; ++$curr_tb) {
/* match anything resembling php tags */
if (preg_match_all('~(<\?(?:\w+|=)?|\?>|language\s*=\s*[\"\']?\s*php\s*[\"\']?)~is', $text_blocks[$curr_tb], $sp_match)) {
/* replace tags with placeholders to prevent recursive replacements */
$sp_match[1] = array_unique($sp_match[1]);
usort($sp_match[1], '_smarty_sort_length');
- for ($curr_sp = 0, $for_max2 = count($sp_match[1]); $curr_sp < $for_max2; $curr_sp++) {
+ for ($curr_sp = 0, $for_max2 = count($sp_match[1]); $curr_sp < $for_max2; ++$curr_sp) {
$text_blocks[$curr_tb] = str_replace($sp_match[1][$curr_sp],'%%%SMARTYSP'.$curr_sp.'%%%',$text_blocks[$curr_tb]);
}
/* process each one */
- for ($curr_sp = 0, $for_max2 = count($sp_match[1]); $curr_sp < $for_max2; $curr_sp++) {
+ for ($curr_sp = 0, $for_max2 = count($sp_match[1]); $curr_sp < $for_max2; ++$curr_sp) {
if ($this->php_handling == SMARTY_PHP_PASSTHRU) {
/* echo php contents */
$text_blocks[$curr_tb] = str_replace('%%%SMARTYSP'.$curr_sp.'%%%', '<?php echo \''.str_replace("'", "\'", $sp_match[1][$curr_sp]).'\'; ?>'."\n", $text_blocks[$curr_tb]);
@@ -307,7 +307,7 @@
/* Compile the template tags into PHP code. */
$compiled_tags = array();
- for ($i = 0, $for_max = count($template_tags); $i < $for_max; $i++) {
+ for ($i = 0, $for_max = count($template_tags); $i < $for_max; ++$i) {
$this->_current_line_no += substr_count($text_blocks[$i], "\n");
$compiled_tags[] = $this->_compile_tag($template_tags[$i]);
$this->_current_line_no += substr_count($template_tags[$i], "\n");
@@ -321,7 +321,7 @@
/* Reformat $text_blocks between 'strip' and '/strip' tags,
removing spaces, tabs and newlines. */
$strip = false;
- for ($i = 0, $for_max = count($compiled_tags); $i < $for_max; $i++) {
+ for ($i = 0, $for_max = count($compiled_tags); $i < $for_max; ++$i) {
if ($compiled_tags[$i] == '{strip}') {
$compiled_tags[$i] = '';
$strip = true;
@@ -330,7 +330,7 @@
}
if ($strip) {
/* strip all $text_blocks before the next '/strip' */
- for ($j = $i + 1; $j < $for_max; $j++) {
+ for ($j = $i + 1; $j < $for_max; ++$j) {
/* remove leading and trailing whitespaces of each line */
$text_blocks[$j] = preg_replace('![\t ]*[\r\n]+[\t ]*!', '', $text_blocks[$j]);
if ($compiled_tags[$j] == '{/strip}') {
@@ -353,7 +353,7 @@
$tag_guard = '%%%SMARTYOTG' . md5(uniqid(rand(), true)) . '%%%';
/* Interleave the compiled contents and text blocks to get the final result. */
- for ($i = 0, $for_max = count($compiled_tags); $i < $for_max; $i++) {
+ for ($i = 0, $for_max = count($compiled_tags); $i < $for_max; ++$i) {
if ($compiled_tags[$i] == '') {
// tag result empty, remove first newline from following text block
$text_blocks[$i+1] = preg_replace('~^(\r\n|\r|\n)~', '', $text_blocks[$i+1]);
@@ -1279,7 +1279,7 @@
$is_arg_stack = array();
- for ($i = 0; $i < count($tokens); $i++) {
+ for ($i = 0; $i < count($tokens); ++$i) {
$token = &$tokens[$i];
@@ -1474,8 +1474,8 @@
switch ($expr_type) {
case 'even':
if (isset($tokens[$expr_end]) && $tokens[$expr_end] == 'by') {
- $expr_end++;
- $expr_arg = $tokens[$expr_end++];
+ ++$expr_end;
+ $expr_arg = $tokens[++$expr_end];
$expr = "!(1 & ($is_arg / " . $this->_parse_var_props($expr_arg) . "))";
} else
$expr = "!(1 & $is_arg)";
@@ -1483,8 +1483,8 @@
case 'odd':
if (isset($tokens[$expr_end]) && $tokens[$expr_end] == 'by') {
- $expr_end++;
- $expr_arg = $tokens[$expr_end++];
+ ++$expr_end;
+ $expr_arg = $tokens[++$expr_end];
$expr = "(1 & ($is_arg / " . $this->_parse_var_props($expr_arg) . "))";
} else
$expr = "(1 & $is_arg)";
@@ -1492,8 +1492,8 @@
case 'div':
if (@$tokens[$expr_end] == 'by') {
- $expr_end++;
- $expr_arg = $tokens[$expr_end++];
+ ++$expr_end;
+ $expr_arg = $tokens[++$expr_end];
$expr = "!($is_arg % " . $this->_parse_var_props($expr_arg) . ")";
} else {
$this->_syntax_error("expecting 'by' after 'div'", E_USER_ERROR, __FILE__, __LINE__);
@@ -1847,7 +1847,7 @@
$orig_vals = $match = $match[0];
$this->_parse_vars_props($match);
$replace = array();
- for ($i = 0, $count = count($match); $i < $count; $i++) {
+ for ($i = 0, $count = count($match); $i < $count; ++$i) {
$replace[$orig_vals[$i]] = $match[$i];
}
return strtr($parenth_args, $replace);
@@ -1909,7 +1909,7 @@
preg_match_all('~\|(@?\w+)((?>:(?:'. $this->_qstr_regexp . '|[^|]+))*)~', '|' . $modifier_string, $_match);
list(, $_modifiers, $modifier_arg_strings) = $_match;
- for ($_i = 0, $_for_max = count($_modifiers); $_i < $_for_max; $_i++) {
+ for ($_i = 0, $_for_max = count($_modifiers); $_i < $_for_max; ++$_i) {
$_modifier_name = $_modifiers[$_i];
if($_modifier_name == 'smarty') {
Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/internals/core.process_cached_inserts.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/internals/core.process_cached_inserts.php 2014-09-18 21:56:17 UTC (rev 12794)
+++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/internals/core.process_cached_inserts.php 2014-09-21 05:41:46 UTC (rev 12795)
@@ -17,7 +17,7 @@
$params['results'], $match);
list($cached_inserts, $insert_args) = $match;
- for ($i = 0, $for_max = count($cached_inserts); $i < $for_max; $i++) {
+ for ($i = 0, $for_max = count($cached_inserts); $i < $for_max; ++$i) {
if ($smarty->debugging) {
$_params = array();
require_once(SMARTY_CORE_DIR . 'core.get_microtime.php');
Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/internals/core.write_cache_file.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/internals/core.write_cache_file.php 2014-09-18 21:56:17 UTC (rev 12794)
+++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/internals/core.write_cache_file.php 2014-09-21 05:41:46 UTC (rev 12795)
@@ -43,16 +43,16 @@
$level = 0;
$j = 0;
- for ($i=0, $results_count = count($results); $i < $results_count && $j < $match_count; $i++) {
+ for ($i=0, $results_count = count($results); $i < $results_count && $j < $match_count; ++$i) {
if ($results[$i] == $match[0][$j]) {
// nocache tag
if ($match[1][$j]) { // closing tag
$level--;
unset($results[$i]);
} else { // opening tag
- if ($level++ > 0) unset($results[$i]);
+ if (++$level > 0) unset($results[$i]);
}
- $j++;
+ ++$j;
} elseif ($level > 0) {
unset($results[$i]);
}
Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/internals/core.write_compiled_include.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/internals/core.write_compiled_include.php 2014-09-18 21:56:17 UTC (rev 12794)
+++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/internals/core.write_compiled_include.php 2014-09-21 05:41:46 UTC (rev 12795)
@@ -37,7 +37,7 @@
$_include_compiled .= "<?php";
$this_varname = ((double)phpversion() >= 5.0) ? '_smarty' : 'this';
- for ($_i = 0, $_for_max = count($_match_source); $_i < $_for_max; $_i++) {
+ for ($_i = 0, $_for_max = count($_match_source); $_i < $_for_max; ++$_i) {
$_match =& $_match_source[$_i];
$source = $_match[4];
if ($this_varname == '_smarty') {
@@ -56,7 +56,7 @@
if ($open_tag == '<?php ') break;
}
- for ($i=0, $count = count($tokens); $i < $count; $i++) {
+ for ($i=0, $count = count($tokens); $i < $count; ++$i) {
if (is_array($tokens[$i])) {
if ($tokens[$i][0] == T_VARIABLE && $tokens[$i][1] == '$this') {
$tokens[$i] = '$' . $this_varname;
Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/plugins/block.textformat.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/plugins/block.textformat.php 2014-09-18 21:56:17 UTC (rev 12794)
+++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/plugins/block.textformat.php 2014-09-21 05:41:46 UTC (rev 12795)
@@ -75,7 +75,7 @@
$_paragraphs = preg_split('![\r\n][\r\n]!',$content);
$_output = '';
- for($_x = 0, $_y = count($_paragraphs); $_x < $_y; $_x++) {
+ for($_x = 0, $_y = count($_paragraphs); $_x < $_y; ++$_x) {
if ($_paragraphs[$_x] == '') {
continue;
}
Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/plugins/function.config_load.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/plugins/function.config_load.php 2014-09-18 21:56:17 UTC (rev 12794)
+++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/plugins/function.config_load.php 2014-09-21 05:41:46 UTC (rev 12795)
@@ -120,7 +120,7 @@
$smarty->_config[1]['vars'] = @array_merge($smarty->_config[1]['vars'], $_config_vars);
$smarty->_config[1]['files'][$_file] = true;
} else if ($_scope == 'global') {
- for ($i = 1, $for_max = count($smarty->_config); $i < $for_max; $i++) {
+ for ($i = 1, $for_max = count($smarty->_config); $i < $for_max; ++$i) {
$smarty->_config[$i]['vars'] = @array_merge($smarty->_config[$i]['vars'], $_config_vars);
$smarty->_config[$i]['files'][$_file] = true;
}
Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/plugins/function.html_select_date.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/plugins/function.html_select_date.php 2014-09-18 21:56:17 UTC (rev 12794)
+++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/plugins/function.html_select_date.php 2014-09-21 05:41:46 UTC (rev 12795)
@@ -180,14 +180,14 @@
$field_separator_count = -1;
if ($display_months) {
- $field_separator_count++;
+ ++$field_separator_count;
$month_names = array();
$month_values = array();
if(isset($month_empty)) {
$month_names[''] = $month_empty;
$month_values[''] = '';
}
- for ($i = 1; $i <= 12; $i++) {
+ for ($i = 1; $i <= 12; ++$i) {
$month_names[$i] = strftime($month_format, mktime(0, 0, 0, $i, 1, 2000));
$month_values[$i] = strftime($month_value_format, mktime(0, 0, 0, $i, 1, 2000));
}
@@ -218,13 +218,13 @@
}
if ($display_days) {
- $field_separator_count++;
+ ++$field_separator_count;
$days = array();
if (isset($day_empty)) {
$days[''] = $day_empty;
$day_values[''] = '';
}
- for ($i = 1; $i <= 31; $i++) {
+ for ($i = 1; $i <= 31; ++$i) {
$days[] = sprintf($day_format, $i);
$day_values[] = sprintf($day_value_format, $i);
}
@@ -254,7 +254,7 @@
}
if ($display_years) {
- $field_separator_count++;
+ ++$field_separator_count;
if (null !== $field_array){
$year_name = $field_array . '[' . $prefix . 'Year]';
} else {
@@ -302,7 +302,7 @@
}
// Loop through the field_order field
- for ($i = 0; $i <= 2; $i++){
+ for ($i = 0; $i <= 2; ++$i){
$c = substr($field_order, $i, 1);
switch ($c){
case 'D':
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 2014-09-18 21:56:17 UTC (rev 12794)
+++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/plugins/function.html_select_time.php 2014-09-21 05:41:46 UTC (rev 12795)
@@ -84,7 +84,7 @@
if ($display_hours) {
$hours = $use_24_hours ? range(0, 23) : range(1, 12);
$hour_fmt = $use_24_hours ? '%H' : '%I';
- for ($i = 0, $for_max = count($hours); $i < $for_max; $i++)
+ for ($i = 0, $for_max = count($hours); $i < $for_max; ++$i)
$hours[$i] = sprintf('%02d', $hours[$i]);
$html_result .= '<select name=';
if (null !== $field_array) {
Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/plugins/function.html_table.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/plugins/function.html_table.php 2014-09-18 21:56:17 UTC (rev 12794)
+++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/plugins/function.html_table.php 2014-09-21 05:41:46 UTC (rev 12795)
@@ -127,7 +127,7 @@
$cols = ($hdir == 'right') ? $cols : array_reverse($cols);
$output .= "<thead><tr>\n";
- for ($r=0; $r<$cols_count; $r++) {
+ for ($r=0; $r<$cols_count; ++$r) {
$output .= '<th' . smarty_function_html_table_cycle('th', $th_attr, $r) . '>';
$output .= $cols[$r];
$output .= "</th>\n";
@@ -136,11 +136,11 @@
}
$output .= "<tbody>\n";
- for ($r=0; $r<$rows; $r++) {
+ for ($r=0; $r<$rows; ++$r) {
$output .= "<tr" . smarty_function_html_table_cycle('tr', $tr_attr, $r) . ">\n";
$rx = ($vdir == 'down') ? $r*$cols_count : ($rows-1-$r)*$cols_count;
- for ($c=0; $c<$cols_count; $c++) {
+ for ($c=0; $c<$cols_count; ++$c) {
$x = ($hdir == 'right') ? $rx+$c : $rx+$cols_count-1-$c;
if ($inner!='cols') {
/* shuffle x to loop over rows*/
Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/plugins/function.mailto.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/plugins/function.mailto.php 2014-09-18 21:56:17 UTC (rev 12794)
+++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/plugins/function.mailto.php 2014-09-21 05:41:46 UTC (rev 12795)
@@ -88,7 +88,7 @@
}
$mail_parm_vals = '';
- for ($i=0; $i<count($mail_parms); $i++) {
+ for ($i=0; $i<count($mail_parms); ++$i) {
$mail_parm_vals .= (0==$i) ? '?' : '&';
$mail_parm_vals .= $mail_parms[$i];
}
@@ -104,7 +104,7 @@
$string = 'document.write(\'<a href="mailto:'.$address.'" '.$extra.'>'.$text.'</a>\');';
$js_encode = '';
- for ($x=0; $x < strlen($string); $x++) {
+ for ($x=0; $x < strlen($string); ++$x) {
$js_encode .= '%' . bin2hex($string[$x]);
}
@@ -113,7 +113,7 @@
} elseif ($encode == 'javascript_charcode' ) {
$string = '<a href="mailto:'.$address.'" '.$extra.'>'.$text.'</a>';
- for($x = 0, $y = strlen($string); $x < $y; $x++ ) {
+ for($x = 0, $y = strlen($string); $x < $y; ++$x ) {
$ord[] = ord($string[$x]);
}
@@ -137,7 +137,7 @@
return;
}
$address_encode = '';
- for ($x=0; $x < strlen($address); $x++) {
+ for ($x=0; $x < strlen($address); ++$x) {
if(preg_match('!\w!',$address[$x])) {
$address_encode .= '%' . bin2hex($address[$x]);
} else {
@@ -145,7 +145,7 @@
}
}
$text_encode = '';
- for ($x=0; $x < strlen($text); $x++) {
+ for ($x=0; $x < strlen($text); ++$x) {
$text_encode .= '&#x' . bin2hex($text[$x]).';';
}
Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/plugins/modifier.escape.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/plugins/modifier.escape.php 2014-09-18 21:56:17 UTC (rev 12794)
+++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/plugins/modifier.escape.php 2014-09-21 05:41:46 UTC (rev 12795)
@@ -40,7 +40,7 @@
case 'hex':
// escape every character into hex
$return = '';
- for ($x=0; $x < strlen($string); $x++) {
+ for ($x=0; $x < strlen($string); ++$x) {
$return .= '%' . bin2hex($string[$x]);
}
@@ -48,7 +48,7 @@
case 'hexentity':
$return = '';
- for ($x=0; $x < strlen($string); $x++) {
+ for ($x=0; $x < strlen($string); ++$x) {
$return .= '&#x' . bin2hex($string[$x]) . ';';
}
@@ -56,7 +56,7 @@
case 'decentity':
$return = '';
- for ($x=0; $x < strlen($string); $x++) {
+ for ($x=0; $x < strlen($string); ++$x) {
$return .= '&#' . ord($string[$x]) . ';';
}
@@ -73,7 +73,7 @@
case 'nonstd':
// escape non-standard chars, such as ms document quotes
$_res = '';
- for ($_i = 0, $_len = strlen($string); $_i < $_len; $_i++) {
+ for ($_i = 0, $_len = strlen($string); $_i < $_len; ++$_i) {
$_ord = ord(substr($string, $_i, 1));
// non-standard char, escape it
if ($_ord >= 126) {
Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/plugins/outputfilter.trimwhitespace.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/plugins/outputfilter.trimwhitespace.php 2014-09-18 21:56:17 UTC (rev 12794)
+++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/plugins/outputfilter.trimwhitespace.php 2014-09-21 05:41:46 UTC (rev 12795)
@@ -65,7 +65,7 @@
{
$_len = strlen($search_str);
$_pos = 0;
- for ($_i=0, $_count=count($replace); $_i<$_count; $_i++)
+ for ($_i=0, $_count=count($replace); $_i<$_count; ++$_i)
if (($_pos=strpos($subject, $search_str, $_pos))!==false)
$subject = substr_replace($subject, $replace[$_i], $_pos, $_len);
else
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 2014-09-18 21:56:17 UTC (rev 12794)
+++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/smarty/xoops_plugins/function.xoPageNav.php 2014-09-21 05:41:46 UTC (rev 12795)
@@ -38,7 +38,7 @@
if ($currentPage > 1) {
$str .= '<a href="' . $xoops->url(str_replace( '%s', $offset - $pageSize, $url)) . '">Previous</a>';
}
- for ($i = $minPage; $i <= $maxPage; $i++) {
+ for ($i = $minPage; $i <= $maxPage; ++$i) {
$tgt = htmlspecialchars($xoops->url(str_replace('%s', ($i - 1) * $pageSize, $url)), ENT_QUOTES);
$str .= "<a href='$tgt'>$i</a>";
}
Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/class/snoopy.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.8/htdocs/class/snoopy.php 2014-09-18 21:56:17 UTC (rev 12794)
+++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/snoopy.php 2014-09-21 05:41:46 UTC (rev 12795)
@@ -423,7 +423,7 @@
if($this->lastredirectaddr)
$URI = $this->lastredirectaddr;
if (is_array($this->results)) {
- for($x=0;$x<count($this->results);$x++)
+ for($x=0;$x<count($this->results);++$x)
$this->results[$x] = $this->_striplinks($this->results[$x]);
} else
$this->results = $this->_striplinks($this->results);
@@ -455,7 +455,7 @@
if ($this->fetch($URI)) {
if (is_array($this->results)) {
- for($x=0;$x<count($this->results);$x++)
+ for($x=0;$x<count($this->results);++$x)
$this->results[$x] = $this->_stripform($this->results[$x]);
} else
$this->results = $this->_stripform($this->results);
@@ -482,7 +482,7 @@
{
if ($this->fetch($URI)) {
if (is_array($this->results)) {
- for($x=0;$x<count($this->results);$x++)
+ for($x=0;$x<count($this->results);++$x)
$this->results[$x] = $this->_striptext($this->results[$x]);
} else
$this->results = $this->_striptext($this->results);
@@ -513,7 +513,7 @@
if($this->lastredirectaddr)
$URI = $this->lastredirectaddr;
if (is_array($this->results)) {
- for ($x=0;$x<count($this->results);$x++) {
+ for ($x=0;$x<count($this->results);++$x) {
$this->results[$x] = $this->_striplinks($this->results[$x]);
if($this->expandlinks)
$this->results[$x] = $this->_expandlinks($this->results[$x],$URI);
@@ -550,7 +550,7 @@
if($this->lastredirectaddr)
$URI = $this->lastredirectaddr;
if (is_array($this->results)) {
- for ($x=0;$x<count($this->results);$x++) {
+ for ($x=0;$x<count($this->results);++$x) {
$this->results[$x] = $this->_striptext($this->results[$x]);
if($this->expandlinks)
$this->results[$x] = $this->_expandlinks($this->results[$x],$URI);
@@ -931,7 +931,7 @@
// have we hit our frame depth and is there frame src to fetch?
if (($this->_framedepth < $this->maxframes) && preg_match_all("'<frame\s+.*src[\s]*=[\'\"]?([^\'\"\>]+)'i",$results,$match)) {
$this->results[] = $results;
- for($x=0; $x<count($match[1]); $x++)
+ for($x=0; $x<count($match[1]); ++$x)
$this->_frameurls[] = $this->_expandlinks($match[1][$x],$URI_PARTS["scheme"]."://".$this->host);
}
// have we already fetched framed content?
@@ -1015,7 +1015,7 @@
if(!empty($this->user) || !empty($this->pass))
$headers[] = "Authorization: BASIC ".base64_encode($this->user.":".$this->pass);
- for ($curr_header = 0; $curr_header < count($headers); $curr_header++) {
+ for ($curr_header = 0; $curr_header < count($headers); ++$curr_header) {
$safer_header = strtr( $headers[$curr_header], "\"", " " );
$cmdline_params .= " -H \"".$safer_header."\"";
}
@@ -1043,7 +1043,7 @@
$this->_redirectaddr = false;
unset($this->headers);
- for ($currentHeader = 0; $currentHeader < count($result_headers); $currentHeader++) {
+ for ($currentHeader = 0; $currentHeader < count($result_headers); ++$currentHeader) {
// if a header begins with Location: or URI:, set the redirect
if (preg_match("/^(Location: |URI: )/i",$result_headers[$currentHeader])) {
@@ -1077,7 +1077,7 @@
// have we hit our frame depth and is there frame src to fetch?
if (($this->_framedepth < $this->maxframes) && preg_match_all("'<frame\s+.*src[\s]*=[\'\"]?([^\'\"\>]+)'i",$results,$match)) {
$this->results[] = $results;
- for($x=0; $x<count($match[1]); $x++)
+ for($x=0; $x<count($match[1]); ++$x)
$this->_frameurls[] = $this->_expandlinks($match[1][$x],$URI_PARTS["scheme"]."://".$this->host);
}
// have we already fetched framed content?
@@ -1099,7 +1099,7 @@
function setcookies()
{
- for ($x=0; $x<count($this->headers); $x++) {
+ for ($x=0; $x<count($this->headers); ++$x) {
if(preg_match('/^set-cookie:[\s]+([^=]+)=([^;]+)/i', $this->headers[$x],$match))
$this->cookies[$match[1]] = urldecode($match[2]);
}
Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/class/tardownloader.php
=================================...
[truncated message content] |