From: <be...@us...> - 2015-05-26 09:35:28
|
Revision: 13070 http://sourceforge.net/p/xoops/svn/13070 Author: beckmi Date: 2015-05-26 09:35:26 +0000 (Tue, 26 May 2015) Log Message: ----------- 1.02 RC-1 for XOOPS 2.5.7.1 (see changelog.txt) Modified Paths: -------------- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/category.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/clone.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/import/ams.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/import/cjaycontent.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/import/fmcontent.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/import/news.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/import/smartsection.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/import/wfsection.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/import/xfsection.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/import/xnews.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/import.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/index.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/menu.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/mimetypes.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/preferences.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/pw_upload_file.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/archive.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/blocks/category_items_sel.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/blocks/items_columns.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/blocks/items_spot.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/blocks/latest_news.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/blocks/search.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/category.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/class/category.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/class/file.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/class/form/category.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/class/form/item.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/class/formdatetime.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/class/groupperm.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/class/highlighter.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/class/item.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/class/metagen.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/class/mimetype.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/class/permission.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/class/session.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/class/themetabform.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/class/uploader.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/class/utilities.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/docs/changelog.txt XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/include/config.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/include/functions.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/include/oninstall.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/include/onupdate.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/include/seo.inc.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/include/seo_functions.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/index.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/item.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/search.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/submit.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/templates/publisher_display_wfsection.tpl XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/templates/publisher_header.tpl XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/thumb.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/xoops_version.php Added Paths: ----------- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/class/plugins/ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/class/plugins/plugin.tag.php Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/category.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/category.php 2015-05-26 09:32:35 UTC (rev 13069) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/category.php 2015-05-26 09:35:26 UTC (rev 13070) @@ -73,7 +73,7 @@ // Uploading the image, if any // Retreive the filename to be uploaded - if (($image_file = XoopsRequest::getArray('image_file', '', 'FILES')['name'])) { + if ($image_file = XoopsRequest::getArray('image_file', '', 'FILES')['name']) { // $filename = XoopsRequest::getArray('xoops_upload_file', array(), 'POST')[0]; if ($filename = XoopsRequest::getArray('xoops_upload_file', array(), 'POST')[0]) { // TODO : implement publisher mimetype management @@ -139,7 +139,7 @@ //Added by fx2024 $parentCat = $categoryObj->categoryid(); - $sizeof = sizeof(XoopsRequest::getString('scname', '', 'POST')); + $sizeof = count(XoopsRequest::getString('scname', '', 'POST')); for ($i = 0; $i < $sizeof; ++$i) { if (XoopsRequest::getArray('scname', array(), 'POST')[$i] != '') { $categoryObj = $publisher->getHandler('category')->create(); Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/clone.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/clone.php 2015-05-26 09:32:35 UTC (rev 13069) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/clone.php 2015-05-26 09:35:26 UTC (rev 13070) @@ -156,7 +156,7 @@ unset($func); } - if (!file_exists($imageBase = $GLOBALS['xoops']->path("/modules/" . $dirname . "/assets/images/module_logo.png")) || !file_exists($font = $GLOBALS['xoops']->path("/modules/" . $dirname . "/assets/images/VeraBd.ttf"))) { + if (!file_exists($imageBase = $GLOBALS['xoops']->path("modules/" . $dirname . "/assets/images/module_logo.png")) || !file_exists($font = $GLOBALS['xoops']->path("modules/" . $dirname . "/assets/images/VeraBd.ttf"))) { return false; } @@ -175,7 +175,7 @@ $white = imagecolorallocatealpha($imageModule, 255, 255, 255, 127); imagefill($imageModule, 0, 0, $white); imagecolortransparent($imageModule, $white); - imagepng($imageModule, $GLOBALS['xoops']->path("/modules/" . $dirname . "/assets/images/module_logo.png")); + imagepng($imageModule, $GLOBALS['xoops']->path("modules/" . $dirname . "/assets/images/module_logo.png")); imagedestroy($imageModule); return true; Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/import/ams.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/import/ams.php 2015-05-26 09:32:35 UTC (rev 13069) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/import/ams.php 2015-05-26 09:35:26 UTC (rev 13070) @@ -161,8 +161,8 @@ include_once (dirname(dirname(__DIR__))) . '/include/common.php'; publisherOpenCollapsableBar('amsimportgo', 'amsimportgoicon', sprintf(_AM_PUBLISHER_IMPORT_FROM, $importFromModuleName), _AM_PUBLISHER_IMPORT_RESULT); - $module_handler = xoops_gethandler('module'); - $moduleObj = $module_handler->getByDirname('ams'); + $moduleHandler = xoops_gethandler('module'); + $moduleObj = $moduleHandler->getByDirname('ams'); $ams_module_id = $moduleObj->getVar('mid'); $gperm_handler = xoops_gethandler('groupperm'); @@ -185,7 +185,7 @@ // get the total number of subcats for this category // $criteria = new CriteriaCompo(); // $criteria->add(new Criteria('imagecategory', $catObj->getVar('cid'), '=')); -// $childCount = intval($mylinksCatHandler->getCount($criteria)); +// $childCount = (int)($mylinksCatHandler->getCount($criteria)); $criteria = new Criteria('imgcat_name', PUBLISHER_DIRNAME); $imageCategoryId = $imageCategoryHandler->getObjects($criteria); @@ -224,7 +224,7 @@ // Category image: copying to Publisher category uploads if (($arrCat['topic_imgurl'] != 'blank.gif') && ($arrCat['topic_imgurl'] != '')) { - if (copy($GLOBALS['xoops']->path("/uploads/AMS/topics/" . $arrCat['topic_imgurl']), $GLOBALS['xoops']->path("/uploads/" . PUBLISHER_DIRNAME . "/images/category/" . $arrCat['topic_imgurl']))) { + if (copy($GLOBALS['xoops']->path("uploads/AMS/topics/" . $arrCat['topic_imgurl']), $GLOBALS['xoops']->path("uploads/" . PUBLISHER_DIRNAME . "/images/category/" . $arrCat['topic_imgurl']))) { $categoryObj->setVar('image', $arrCat['topic_imgurl']); //======== there is no need to add the category images to Image Manager, because they are handled directly from /images/category/ folder @@ -259,8 +259,8 @@ //copy all images to Image Manager - $src = $GLOBALS['xoops']->path("/uploads/AMS/topics/"); - $dst = $GLOBALS['xoops']->path("/uploads"); + $src = $GLOBALS['xoops']->path("uploads/AMS/topics/"); + $dst = $GLOBALS['xoops']->path("uploads"); PublisherUtilities::recurseCopy($src, $dst); @@ -327,9 +327,9 @@ /* // HTML Wrap if ($arrArticle['htmlpage']) { - $pagewrap_filename = $GLOBALS['xoops']->path("/modules/wfsection/html/" .$arrArticle['htmlpage']); + $pagewrap_filename = $GLOBALS['xoops']->path("modules/wfsection/html/" .$arrArticle['htmlpage']); if (file_exists($pagewrap_filename)) { - if (copy($pagewrap_filename, $GLOBALS['xoops']->path("/uploads/publisher/content/" . $arrArticle['htmlpage']))) { + if (copy($pagewrap_filename, $GLOBALS['xoops']->path("uploads/publisher/content/" . $arrArticle['htmlpage']))) { $itemObj->setVar('body', "[pagewrap=" . $arrArticle['htmlpage'] . "]"); echo sprintf(" " . _AM_PUBLISHER_IMPORT_ARTICLE_WRAP, $arrArticle['htmlpage']) . "<br/>"; } @@ -347,9 +347,9 @@ $resultFiles = $GLOBALS['xoopsDB']->query($sql); $allowed_mimetypes = ''; while (($arrFile = $GLOBALS['xoopsDB']->fetchArray($resultFiles)) !== false) { - $filename = $GLOBALS['xoops']->path("/uploads/AMS/attached/" . $arrFile['downloadname']); + $filename = $GLOBALS['xoops']->path("uploads/AMS/attached/" . $arrFile['downloadname']); if (file_exists($filename)) { - if (copy($filename, $GLOBALS['xoops']->path("/uploads/publisher/" . $arrFile['filerealname']))) { + if (copy($filename, $GLOBALS['xoops']->path("uploads/publisher/" . $arrFile['filerealname']))) { $fileObj = $publisher->getHandler('file')->create(); $fileObj->setVar('name', $arrFile['filerealname']); $fileObj->setVar('description', $arrFile['filerealname']); @@ -411,15 +411,15 @@ $publisher_module_id = $publisher->getModule()->mid(); - $comment_handler = xoops_gethandler('comment'); + $commentHandler = xoops_gethandler('comment'); $criteria = new CriteriaCompo(); $criteria->add(new Criteria('com_modid', $ams_module_id)); - $comments = $comment_handler->getObjects($criteria); + $comments = $commentHandler->getObjects($criteria); foreach ($comments as $comment) { $comment->setVar('com_itemid', $newArticleArray[$comment->getVar('com_itemid')]); $comment->setVar('com_modid', $publisher_module_id); $comment->setNew(); - if (!$comment_handler->insert($comment)) { + if (!$commentHandler->insert($comment)) { echo " " . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT_ERROR, $comment->getVar('com_title')) . "<br />"; } else { echo " " . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT, $comment->getVar('com_title')) . "<br />"; Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/import/cjaycontent.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/import/cjaycontent.php 2015-05-26 09:32:35 UTC (rev 13069) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/import/cjaycontent.php 2015-05-26 09:35:26 UTC (rev 13070) @@ -107,8 +107,8 @@ _AM_PUBLISHER_IMPORT_RESULT ); - $module_handler = xoops_gethandler('module'); - $moduleObj = $module_handler->getByDirname('cjaycontent'); + $moduleHandler = xoops_gethandler('module'); + $moduleObj = $moduleHandler->getByDirname('cjaycontent'); $cjaycontent_module_id = $moduleObj->getVar('mid'); $gperm_handler = xoops_gethandler('groupperm'); @@ -151,9 +151,9 @@ /* // HTML Wrap if ($arrArticle['htmlpage']) { - $pagewrap_filename = $GLOBALS['xoops']->path("/modules/wfsection/html/" .$arrArticle['htmlpage']); + $pagewrap_filename = $GLOBALS['xoops']->path("modules/wfsection/html/" .$arrArticle['htmlpage']); if (file_exists($pagewrap_filename)) { - if (copy($pagewrap_filename, $GLOBALS['xoops']->path("/uploads/publisher/content/" . $arrArticle['htmlpage']))) { + if (copy($pagewrap_filename, $GLOBALS['xoops']->path("uploads/publisher/content/" . $arrArticle['htmlpage']))) { $itemObj->setVar('body', "[pagewrap=" . $arrArticle['htmlpage'] . "]"); echo sprintf(" " . _AM_PUBLISHER_IMPORT_ARTICLE_WRAP, $arrArticle['htmlpage']) . "<br/>"; } @@ -178,15 +178,15 @@ $publisher_module_id = $publisher->getModule()->mid(); - $comment_handler = xoops_gethandler('comment'); + $commentHandler = xoops_gethandler('comment'); $criteria = new CriteriaCompo(); $criteria->add(new Criteria('com_modid', $cjaycontent_module_id)); - $comments = $comment_handler->getObjects($criteria); + $comments = $commentHandler->getObjects($criteria); foreach ($comments as $comment) { $comment->setVar('com_itemid', $newArticleArray[$comment->getVar('com_itemid')]); $comment->setVar('com_modid', $publisher_module_id); $comment->setNew(); - if (!$comment_handler->insert($comment)) { + if (!$commentHandler->insert($comment)) { echo " " . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT_ERROR, $comment->getVar('com_title')) . "<br />"; } else { echo " " . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT, $comment->getVar('com_title')) . "<br />"; Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/import/fmcontent.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/import/fmcontent.php 2015-05-26 09:32:35 UTC (rev 13069) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/import/fmcontent.php 2015-05-26 09:35:26 UTC (rev 13070) @@ -37,8 +37,8 @@ //publisher_adminMenu(-1, _AM_PUBLISHER_IMPORT); publisherOpenCollapsableBar('fmimport', 'fmimporticon', sprintf(_AM_PUBLISHER_IMPORT_FROM, $importFromModuleName), _AM_PUBLISHER_IMPORT_INFO); - $module_handler = xoops_gethandler('module'); - $moduleObj = $module_handler->getByDirname('fmcontent'); + $moduleHandler = xoops_gethandler('module'); + $moduleObj = $moduleHandler->getByDirname('fmcontent'); $fm_module_id = $moduleObj->getVar('mid'); $fmTopicHdlr =& xoops_getmodulehandler('topic', 'fmcontent'); @@ -122,8 +122,8 @@ //publisher_adminMenu(-1, _AM_PUBLISHER_IMPORT); publisherOpenCollapsableBar('fmimportgo', 'fmimportgoicon', sprintf(_AM_PUBLISHER_IMPORT_FROM, $importFromModuleName), _AM_PUBLISHER_IMPORT_RESULT); - $module_handler = xoops_gethandler('module'); - $moduleObj = $module_handler->getByDirname('fmcontent'); + $moduleHandler = xoops_gethandler('module'); + $moduleObj = $moduleHandler->getByDirname('fmcontent'); $fm_module_id = $moduleObj->getVar('mid'); $gperm_handler = xoops_gethandler('groupperm'); @@ -319,15 +319,15 @@ $publisher_module_id = $publisher->getModule()->mid(); - $comment_handler = xoops_gethandler('comment'); + $commentHandler = xoops_gethandler('comment'); $criteria = new CriteriaCompo(); $criteria->add(new Criteria('com_modid', $fm_module_id)); - $comments = $comment_handler->getObjects($criteria); + $comments = $commentHandler->getObjects($criteria); foreach ($comments as $comment) { $comment->setVar('com_itemid', $newArticleArray[$comment->getVar('com_itemid')]); $comment->setVar('com_modid', $publisher_module_id); $comment->setNew(); - if (!$comment_handler->insert($comment)) { + if (!$commentHandler->insert($comment)) { echo " " . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT_ERROR, $comment->getVar('com_title')) . "<br />\n"; } else { echo " " . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT, $comment->getVar('com_title')) . "<br />\n"; Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/import/news.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/import/news.php 2015-05-26 09:32:35 UTC (rev 13069) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/import/news.php 2015-05-26 09:35:26 UTC (rev 13070) @@ -97,8 +97,8 @@ //publisher_adminMenu(-1, _AM_PUBLISHER_IMPORT); publisherOpenCollapsableBar('newsimportgo', 'newsimportgoicon', sprintf(_AM_PUBLISHER_IMPORT_FROM, $importFromModuleName), _AM_PUBLISHER_IMPORT_RESULT); - $module_handler = xoops_gethandler('module'); - $moduleObj = $module_handler->getByDirname('news'); + $moduleHandler = xoops_gethandler('module'); + $moduleObj = $moduleHandler->getByDirname('news'); $news_module_id = $moduleObj->getVar('mid'); $gperm_handler = xoops_gethandler('groupperm'); @@ -131,7 +131,7 @@ // Category image if (($arrCat['topic_imgurl'] != 'blank.gif') && ($arrCat['topic_imgurl'] != '')) { - if (copy($GLOBALS['xoops']->path("/modules/news/assets/images/topics/" . $arrCat['topic_imgurl']), $GLOBALS['xoops']->path("/uploads/publisher/images/category/" . $arrCat['topic_imgurl']))) { + if (copy($GLOBALS['xoops']->path("modules/news/assets/images/topics/" . $arrCat['topic_imgurl']), $GLOBALS['xoops']->path("uploads/publisher/images/category/" . $arrCat['topic_imgurl']))) { $categoryObj->setVar('image', $arrCat['topic_imgurl']); } } @@ -173,9 +173,9 @@ /* // HTML Wrap if ($arrArticle['htmlpage']) { - $pagewrap_filename = $GLOBALS['xoops']->path("/modules/wfsection/html/" .$arrArticle['htmlpage']); + $pagewrap_filename = $GLOBALS['xoops']->path("modules/wfsection/html/" .$arrArticle['htmlpage']); if (file_exists($pagewrap_filename)) { - if (copy($pagewrap_filename, $GLOBALS['xoops']->path("/uploads/publisher/content/" . $arrArticle['htmlpage']))) { + if (copy($pagewrap_filename, $GLOBALS['xoops']->path("uploads/publisher/content/" . $arrArticle['htmlpage']))) { $itemObj->setVar('body', "[pagewrap=" . $arrArticle['htmlpage'] . "]"); echo sprintf(" " . _AM_PUBLISHER_IMPORT_ARTICLE_WRAP, $arrArticle['htmlpage']) . "<br/>"; } @@ -194,9 +194,9 @@ $allowed_mimetypes = ''; while ($arrFile = $GLOBALS['xoopsDB']->fetchArray ($resultFiles)) { - $filename = $GLOBALS['xoops']->path("/modules/wfsection/cache/uploaded/" . $arrFile['filerealname']); + $filename = $GLOBALS['xoops']->path("modules/wfsection/cache/uploaded/" . $arrFile['filerealname']); if (file_exists($filename)) { - if (copy($filename, $GLOBALS['xoops']->path("/uploads/publisher/" . $arrFile['filerealname']))) { + if (copy($filename, $GLOBALS['xoops']->path("uploads/publisher/" . $arrFile['filerealname']))) { $fileObj = $publisher_file_handler->create(); $fileObj->setVar('name', $arrFile['fileshowname']); $fileObj->setVar('description', $arrFile['filedescript']); @@ -252,15 +252,15 @@ $publisher_module_id = $publisher->getModule()->mid(); - $comment_handler = xoops_gethandler('comment'); + $commentHandler = xoops_gethandler('comment'); $criteria = new CriteriaCompo(); $criteria->add(new Criteria('com_modid', $news_module_id)); - $comments = $comment_handler->getObjects($criteria); + $comments = $commentHandler->getObjects($criteria); foreach ($comments as $comment) { $comment->setVar('com_itemid', $newArticleArray[$comment->getVar('com_itemid')]); $comment->setVar('com_modid', $publisher_module_id); $comment->setNew(); - if (!$comment_handler->insert($comment)) { + if (!$commentHandler->insert($comment)) { echo " " . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT_ERROR, $comment->getVar('com_title')) . "<br />"; } else { echo " " . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT, $comment->getVar('com_title')) . "<br />"; Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/import/smartsection.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/import/smartsection.php 2015-05-26 09:32:35 UTC (rev 13069) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/import/smartsection.php 2015-05-26 09:35:26 UTC (rev 13070) @@ -97,8 +97,8 @@ //publisher_adminMenu(-1, _AM_PUBLISHER_IMPORT); publisherOpenCollapsableBar('newsimportgo', 'newsimportgoicon', sprintf(_AM_PUBLISHER_IMPORT_FROM, $importFromModuleName), _AM_PUBLISHER_IMPORT_RESULT); - $module_handler = xoops_gethandler('module'); - $moduleObj = $module_handler->getByDirname('smartsection'); + $moduleHandler = xoops_gethandler('module'); + $moduleObj = $moduleHandler->getByDirname('smartsection'); $smartsection_module_id = $moduleObj->getVar('mid'); $gperm_handler = xoops_gethandler('groupperm'); @@ -128,7 +128,7 @@ // Copy category image if (($arrCat['image'] != 'blank.gif') && ($arrCat['image'] != '')) { - copy($GLOBALS['xoops']->path("/uploads/smartsection/images/category/" . $arrCat['image']), $GLOBALS['xoops']->path("/uploads/publisher/images/category/" . $arrCat['image'])); + copy($GLOBALS['xoops']->path("uploads/smartsection/images/category/" . $arrCat['image']), $GLOBALS['xoops']->path("uploads/publisher/images/category/" . $arrCat['image'])); } if (!$publisher->getHandler('category')->insert($categoryObj)) { @@ -158,9 +158,9 @@ // TODO: copy contents folder /* if ($arrArticle['htmlpage']) { - $pagewrap_filename = $GLOBALS['xoops']->path("/modules/wfsection/html/" .$arrArticle['htmlpage']); + $pagewrap_filename = $GLOBALS['xoops']->path("modules/wfsection/html/" .$arrArticle['htmlpage']); if (file_exists($pagewrap_filename)) { - if (copy($pagewrap_filename, $GLOBALS['xoops']->path("/uploads/publisher/content/" . $arrArticle['htmlpage']))) { + if (copy($pagewrap_filename, $GLOBALS['xoops']->path("uploads/publisher/content/" . $arrArticle['htmlpage']))) { $itemObj->setVar('body', "[pagewrap=" . $arrArticle['htmlpage'] . "]"); echo sprintf(" " . _AM_PUBLISHER_IMPORT_ARTICLE_WRAP, $arrArticle['htmlpage']) . "<br/>"; } @@ -178,9 +178,9 @@ $resultFiles = $GLOBALS['xoopsDB']->query($sql); $allowed_mimetypes = null; while (($arrFile = $GLOBALS['xoopsDB']->fetchArray($resultFiles)) !== false) { - $filename = $GLOBALS['xoops']->path("/uploads/smartsection/" . $arrFile['filename']); + $filename = $GLOBALS['xoops']->path("uploads/smartsection/" . $arrFile['filename']); if (file_exists($filename)) { - if (copy($filename, $GLOBALS['xoops']->path("/uploads/publisher/" . $arrFile['filename']))) { + if (copy($filename, $GLOBALS['xoops']->path("uploads/publisher/" . $arrFile['filename']))) { $fileObj = $publisher->getHandler('file')->create(); $fileObj->setVars($arrFile); $fileObj->setVar('fileid', 0); @@ -229,15 +229,15 @@ $publisher_module_id = $publisher->getModule()->mid(); - $comment_handler = xoops_gethandler('comment'); + $commentHandler = xoops_gethandler('comment'); $criteria = new CriteriaCompo(); $criteria->add(new Criteria('com_modid', $smartsection_module_id)); - $comments = $comment_handler->getObjects($criteria); + $comments = $commentHandler->getObjects($criteria); foreach ($comments as $comment) { $comment->setVar('com_itemid', $newArticleArray[$comment->getVar('com_itemid')]); $comment->setVar('com_modid', $publisher_module_id); $comment->setNew(); - if (!$comment_handler->insert($comment)) { + if (!$commentHandler->insert($comment)) { echo " " . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT_ERROR, $comment->getVar('com_title')) . "<br />"; } else { echo " " . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT, $comment->getVar('com_title')) . "<br />"; Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/import/wfsection.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/import/wfsection.php 2015-05-26 09:32:35 UTC (rev 13069) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/import/wfsection.php 2015-05-26 09:35:26 UTC (rev 13070) @@ -42,7 +42,7 @@ if ($totalCat == 0) { echo "<span style=\"color: #567; margin: 3px 0 12px 0; font-size: small; display: block; \">" . _AM_PUBLISHER_IMPORT_NOCATSELECTED . "</span>"; } else { - include_once $GLOBALS['xoops']->path("/class/xoopstree.php"); + include_once $GLOBALS['xoops']->path("class/xoopstree.php"); $result = $GLOBALS['xoopsDB']->query("SELECT COUNT(*) FROM " . $GLOBALS['xoopsDB']->prefix("wfs_article")); list ($totalArticles) = $GLOBALS['xoopsDB']->fetchRow($result); @@ -131,7 +131,7 @@ // Category image if (($arrCat['imgurl'] != 'blank.gif') && ($arrCat['imgurl'])) { - if (copy($GLOBALS['xoops']->path("/modules/wfsection/images/category/" . $arrCat['imgurl']), PUBLISHER_UPLOAD_PATH . "/images/category/" . $arrCat['imgurl'])) { + if (copy($GLOBALS['xoops']->path("modules/wfsection/images/category/" . $arrCat['imgurl']), PUBLISHER_UPLOAD_PATH . "/images/category/" . $arrCat['imgurl'])) { $categoryObj->setVar('image', $arrCat['imgurl']); } } @@ -172,7 +172,7 @@ // HTML Wrap if ($arrArticle['htmlpage']) { - $pagewrap_filename = $GLOBALS['xoops']->path("/modules/wfsection/html/" . $arrArticle['htmlpage']); + $pagewrap_filename = $GLOBALS['xoops']->path("modules/wfsection/html/" . $arrArticle['htmlpage']); if (file_exists($pagewrap_filename)) { if (copy($pagewrap_filename, PUBLISHER_UPLOAD_PATH . "/content/" . $arrArticle['htmlpage'])) { $itemObj->setVar('body', "[pagewrap=" . $arrArticle['htmlpage'] . "]"); @@ -191,7 +191,7 @@ $resultFiles = $GLOBALS['xoopsDB']->query($sql); $allowed_mimetypes = ''; while (($arrFile = $GLOBALS['xoopsDB']->fetchArray($resultFiles)) !== false) { - $filename = $GLOBALS['xoops']->path("/modules/wfsection/cache/uploaded/" . $arrFile['filerealname']); + $filename = $GLOBALS['xoops']->path("modules/wfsection/cache/uploaded/" . $arrFile['filerealname']); if (file_exists($filename)) { if (copy($filename, PUBLISHER_UPLOAD_PATH . "/" . $arrFile['filerealname'])) { $fileObj = $publisher->getHandler('file')->create(); @@ -239,21 +239,21 @@ // Looping through the comments to link them to the new articles and module echo _AM_PUBLISHER_IMPORT_COMMENTS . "<br />"; - $module_handler = xoops_gethandler('module'); - $moduleObj = $module_handler->getByDirname('wfsection'); + $moduleHandler = xoops_gethandler('module'); + $moduleObj = $moduleHandler->getByDirname('wfsection'); $news_module_id = $moduleObj->getVar('mid'); $publisher_module_id = $publisher->getModule()->mid(); - $comment_handler = xoops_gethandler('comment'); + $commentHandler = xoops_gethandler('comment'); $criteria = new CriteriaCompo(); $criteria->add(new Criteria('com_modid', $news_module_id)); - $comments = $comment_handler->getObjects($criteria); + $comments = $commentHandler->getObjects($criteria); foreach ($comments as $comment) { $comment->setVar('com_itemid', $newArticleArray[$comment->getVar('com_itemid')]); $comment->setVar('com_modid', $publisher_module_id); $comment->setNew(); - if (!$comment_handler->insert($comment)) { + if (!$commentHandler->insert($comment)) { echo " " . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT_ERROR, $comment->getVar('com_title')) . "<br />"; } else { echo " " . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT, $comment->getVar('com_title')) . "<br />"; Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/import/xfsection.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/import/xfsection.php 2015-05-26 09:32:35 UTC (rev 13069) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/import/xfsection.php 2015-05-26 09:35:26 UTC (rev 13070) @@ -123,7 +123,7 @@ // Category image if (($arrCat['imgurl'] != 'blank.gif') && ($arrCat['imgurl'])) { - if (copy($GLOBALS['xoops']->path("/modules/xfsection/images/category/" . $arrCat['imgurl']), PUBLISHER_UPLOAD_PATH . "/images/category/" . $arrCat['imgurl'])) { + if (copy($GLOBALS['xoops']->path("modules/xfsection/images/category/" . $arrCat['imgurl']), PUBLISHER_UPLOAD_PATH . "/images/category/" . $arrCat['imgurl'])) { $categoryObj->setVar('image', $arrCat['imgurl']); } } @@ -170,7 +170,7 @@ // HTML Wrap if ($arrArticle['htmlpage']) { - $pagewrap_filename = $GLOBALS['xoops']->path("/modules/xfsection/html/" . $arrArticle['htmlpage']); + $pagewrap_filename = $GLOBALS['xoops']->path("modules/xfsection/html/" . $arrArticle['htmlpage']); if (file_exists($pagewrap_filename)) { if (copy($pagewrap_filename, PUBLISHER_UPLOAD_PATH . "/content/" . $arrArticle['htmlpage'])) { $itemObj->setVar('body', "[pagewrap=" . $arrArticle['htmlpage'] . "]"); @@ -189,7 +189,7 @@ $resultFiles = $GLOBALS['xoopsDB']->query($sql); $allowed_mimetypes = ''; while (($arrFile = $GLOBALS['xoopsDB']->fetchArray($resultFiles)) !== false) { - $filename = $GLOBALS['xoops']->path("/modules/xfsection/cache/uploaded/" . $arrFile['filerealname']); + $filename = $GLOBALS['xoops']->path("modules/xfsection/cache/uploaded/" . $arrFile['filerealname']); if (file_exists($filename)) { if (copy($filename, PUBLISHER_UPLOAD_PATH . "/" . $arrFile['filerealname'])) { $fileObj = $publisher->getHandler('file')->create(); @@ -237,21 +237,21 @@ // Looping through the comments to link them to the new articles and module echo _AM_PUBLISHER_IMPORT_COMMENTS . "<br />"; - $module_handler = xoops_gethandler('module'); - $moduleObj = $module_handler->getByDirname('xfsection'); + $moduleHandler = xoops_gethandler('module'); + $moduleObj = $moduleHandler->getByDirname('xfsection'); $news_module_id = $moduleObj->getVar('mid'); $publisher_module_id = $publisher->getModule()->mid(); - $comment_handler = xoops_gethandler('comment'); + $commentHandler = xoops_gethandler('comment'); $criteria = new CriteriaCompo(); $criteria->add(new Criteria('com_modid', $news_module_id)); - $comments = $comment_handler->getObjects($criteria); + $comments = $commentHandler->getObjects($criteria); foreach ($comments as $comment) { $comment->setVar('com_itemid', $newArticleArray[$comment->getVar('com_itemid')]); $comment->setVar('com_modid', $publisher_module_id); $comment->setNew(); - if (!$comment_handler->insert($comment)) { + if (!$commentHandler->insert($comment)) { echo " " . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT_ERROR, $comment->getVar('com_title')) . "<br />"; } else { echo " " . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT, $comment->getVar('com_title')) . "<br />"; Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/import/xnews.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/import/xnews.php 2015-05-26 09:32:35 UTC (rev 13069) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/import/xnews.php 2015-05-26 09:35:26 UTC (rev 13070) @@ -56,33 +56,31 @@ echo "<span style=\"color: #567; margin: 3px 0 12px 0; font-size: small; display: block; \">" . sprintf( _AM_PUBLISHER_IMPORT_MODULE_FOUND_NO_ITEMS, $importFromModuleName, - $totalArticles - ) . "</span>"; + $totalArticles) . "</span>"; } else { echo "<span style=\"color: #567; margin: 3px 0 12px 0; font-size: small; display: block; \">" . sprintf( _AM_PUBLISHER_IMPORT_MODULE_FOUND, $importFromModuleName, $totalArticles, - $totalCat - ) . "</span>"; + $totalCat) . "</span>"; $form = new XoopsThemeForm(_AM_PUBLISHER_IMPORT_SETTINGS, 'import_form', PUBLISHER_ADMIN_URL . "/import/$scriptname"); -//---------- mb ------------------ -// add "publisher" category to "imagecategory" table + //---------- mb ------------------ + // add "publisher" category to "imagecategory" table -// if (!$GLOBALS['xoopsSecurity']->check()) { -// redirect_header('admin.php?fct=images', 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors())); -// } + // if (!$GLOBALS['xoopsSecurity']->check()) { + // redirect_header('admin.php?fct=images', 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors())); + // } $imageCategoryHandler =& xoops_gethandler('imagecategory'); $imagecategory =& $imageCategoryHandler->create(); -// $imagecategory->setVar('imgcat_name', $imgcat_name); + // $imagecategory->setVar('imgcat_name', $imgcat_name); $imagecategory->setVar('imgcat_name', PUBLISHER_DIRNAME); //$imgcat_name); $imagecategory->setVar('imgcat_maxsize', $GLOBALS['xoopsModuleConfig']['maximum_filesize']); //$imgcat_maxsize); $imagecategory->setVar('imgcat_maxwidth', $GLOBALS['xoopsModuleConfig']['maximum_image_width']); //$imgcat_maxwidth); $imagecategory->setVar('imgcat_maxheight', $GLOBALS['xoopsModuleConfig']['maximum_image_height']); //$imgcat_maxheight); -// $imgcat_display = empty($imgcat_display) ? 0 : 1; + // $imgcat_display = empty($imgcat_display) ? 0 : 1; $imagecategory->setVar('imgcat_display', 1); //$imgcat_display); $imagecategory->setVar('imgcat_weight', 0); //$imgcat_weight); $imagecategory->setVar('imgcat_storetype', 'file'); //$imgcat_storetype); @@ -130,7 +128,7 @@ } unset($wgroup); -//---------- mb ------------------ + //---------- mb ------------------ // Categories to be imported $sql = "SELECT cat.topic_id, cat.topic_pid, cat.topic_title, COUNT(art.storyid) FROM " . $GLOBALS['xoopsDB']->prefix("nw_topics") @@ -182,8 +180,8 @@ _AM_PUBLISHER_IMPORT_RESULT ); - $module_handler = xoops_gethandler('module'); - $moduleObj = $module_handler->getByDirname('xnews'); + $moduleHandler = xoops_gethandler('module'); + $moduleObj = $moduleHandler->getByDirname('xnews'); $xnews_module_id = $moduleObj->getVar('mid'); $gperm_handler = xoops_gethandler('groupperm'); @@ -201,32 +199,32 @@ $newArticleArray = array(); $imageCategoryHandler =& xoops_gethandler('imagecategory'); -// $criteria = new criteriaCombo; + // $criteria = new criteriaCombo; -// get the total number of subcats for this category -// $criteria = new CriteriaCompo(); -// $criteria->add(new Criteria('imagecategory', $catObj->getVar('cid'), '=')); -// $childCount = intval($mylinksCatHandler->getCount($criteria)); + // get the total number of subcats for this category + // $criteria = new CriteriaCompo(); + // $criteria->add(new Criteria('imagecategory', $catObj->getVar('cid'), '=')); + // $childCount = (int)($mylinksCatHandler->getCount($criteria)); $criteria = new Criteria('imgcat_name', PUBLISHER_DIRNAME); $imageCategoryId = $imageCategoryHandler->getObjects($criteria); -// $criteria = new CriteriaCompo(); -// $criteria->add(new Criteria("imagecategory", PUBLISHER_DIRNAME, "=")); + // $criteria = new CriteriaCompo(); + // $criteria->add(new Criteria("imagecategory", PUBLISHER_DIRNAME, "=")); -// $newid = $imageCategoryId->getVar('imgcat_id'); + // $newid = $imageCategoryId->getVar('imgcat_id'); $newid = $imageCategoryId[0]->vars['imgcat_id']['value']; -// $newid = $imageCategoryId[0]->vars['imgcat_id']; + // $newid = $imageCategoryId[0]->vars['imgcat_id']; -// $select_form = new XoopsFormSelect("", $name_current, array(), 1); -// $select_form->addOption("", _SELECT); -// $select_form->addOptionArray($writer_handler->getList($criteria)); + // $select_form = new XoopsFormSelect("", $name_current, array(), 1); + // $select_form->addOption("", _SELECT); + // $select_form->addOptionArray($writer_handler->getList($criteria)); -// $sql = "SELECT * FROM " . $GLOBALS['xoopsDB']->prefix('imagecategory') . " WHERE imgcat_name=" . PUBLISHER_DIRNAME; -// $resultImageCategory = $GLOBALS['xoopsDB']->query($sql); -// -// -// $newid = $resultImageCategory->getVar('imgcat_id'); + // $sql = "SELECT * FROM " . $GLOBALS['xoopsDB']->prefix('imagecategory') . " WHERE imgcat_name=" . PUBLISHER_DIRNAME; + // $resultImageCategory = $GLOBALS['xoopsDB']->query($sql); + // + // + // $newid = $resultImageCategory->getVar('imgcat_id'); $oldToNew = array(); while (($arrCat = $GLOBALS['xoopsDB']->fetchArray($resultCat)) !== false) { @@ -246,13 +244,13 @@ // Category image: copying to Publisher category uploads if (($arrCat['topic_imgurl'] != 'blank.gif') && ($arrCat['topic_imgurl'] != '')) { if (copy( - $GLOBALS['xoops']->path("/uploads/xnews/topics/" . $arrCat['topic_imgurl']), - $GLOBALS['xoops']->path("/uploads/" . PUBLISHER_DIRNAME . "/images/category/" . $arrCat['topic_imgurl']) + $GLOBALS['xoops']->path("uploads/xnews/topics/" . $arrCat['topic_imgurl']), + $GLOBALS['xoops']->path("uploads/" . PUBLISHER_DIRNAME . "/images/category/" . $arrCat['topic_imgurl']) ) ) { $categoryObj->setVar('image', $arrCat['topic_imgurl']); -//======== there is no need to add the category images to Image Manager, because they are handled directly from /images/category/ folder + //======== there is no need to add the category images to Image Manager, because they are handled directly from /images/category/ folder /* @@ -272,7 +270,7 @@ */ -//============================ + //============================ } } @@ -283,8 +281,8 @@ } //copy all images to Image Manager - $src = $GLOBALS['xoops']->path("/uploads/xnews/topics/"); - $dst = $GLOBALS['xoops']->path("/uploads"); + $src = $GLOBALS['xoops']->path("uploads/xnews/topics/"); + $dst = $GLOBALS['xoops']->path("uploads"); PublisherUtilities::recurseCopy($src, $dst); //populate the Image Manager with images from xNews articles (by Bleekk) @@ -329,7 +327,7 @@ $itemObj->setVar('dobr', !$arrArticle['dobr']); $itemObj->setVar('item_tag', $arrArticle['tags']); $itemObj->setVar('notifypub', $arrArticle['notifypub']); -//-------- image + //-------- image $img_handler =& xoops_gethandler('image'); @@ -339,7 +337,7 @@ $itemObj->setVar('image', $newImageId); $itemObj->setVar('images', $newImageId); -//-------------- + //-------------- $itemObj->setVar('rating', $arrArticle['rating']); $itemObj->setVar('votes', $arrArticle['votes']); @@ -350,9 +348,9 @@ /* // HTML Wrap if ($arrArticle['htmlpage']) { - $pagewrap_filename = $GLOBALS['xoops']->path("/modules/wfsection/html/" .$arrArticle['htmlpage']); + $pagewrap_filename = $GLOBALS['xoops']->path("modules/wfsection/html/" .$arrArticle['htmlpage']); if (file_exists($pagewrap_filename)) { - if (copy($pagewrap_filename, $GLOBALS['xoops']->path("/uploads/publisher/content/" . $arrArticle['htmlpage']))) { + if (copy($pagewrap_filename, $GLOBALS['xoops']->path("uploads/publisher/content/" . $arrArticle['htmlpage']))) { $itemObj->setVar('body', "[pagewrap=" . $arrArticle['htmlpage'] . "]"); echo sprintf(" " . _AM_PUBLISHER_IMPORT_ARTICLE_WRAP, $arrArticle['htmlpage']) . "<br/>"; } @@ -364,15 +362,15 @@ echo sprintf(" " . _AM_PUBLISHER_IMPORT_ARTICLE_ERROR, $arrArticle['storyid'] . ' ' . $arrArticle['title']) . "<br/>"; continue; } else { -//-------------------------------------------- + //-------------------------------------------- // Linkes files $sql = "SELECT * FROM " . $GLOBALS['xoopsDB']->prefix("nw_stories_files") . " WHERE storyid=" . $arrArticle['storyid']; $resultFiles = $GLOBALS['xoopsDB']->query($sql); $allowed_mimetypes = ''; while (($arrFile = $GLOBALS['xoopsDB']->fetchArray($resultFiles)) !== false) { - $filename = $GLOBALS['xoops']->path("/uploads/xnews/attached/" . $arrFile['downloadname']); + $filename = $GLOBALS['xoops']->path("uploads/xnews/attached/" . $arrFile['downloadname']); if (file_exists($filename)) { - if (copy($filename, $GLOBALS['xoops']->path("/uploads/publisher/" . $arrFile['filerealname']))) { + if (copy($filename, $GLOBALS['xoops']->path("uploads/publisher/" . $arrFile['filerealname']))) { $fileObj = $publisher->getHandler('file')->create(); $fileObj->setVar('name', $arrFile['filerealname']); $fileObj->setVar('description', $arrFile['filerealname']); @@ -392,7 +390,7 @@ } } -//------------------------ + //------------------------ $newArticleArray[$arrArticle['storyid']] = $itemObj->itemid(); echo " " . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE, $itemObj->title()) . "<br />"; @@ -434,15 +432,15 @@ $publisher_module_id = $publisher->getModule()->mid(); - $comment_handler = xoops_gethandler('comment'); + $commentHandler = xoops_gethandler('comment'); $criteria = new CriteriaCompo(); $criteria->add(new Criteria('com_modid', $xnews_module_id)); - $comments = $comment_handler->getObjects($criteria); + $comments = $commentHandler->getObjects($criteria); foreach ($comments as $comment) { $comment->setVar('com_itemid', $newArticleArray[$comment->getVar('com_itemid')]); $comment->setVar('com_modid', $publisher_module_id); $comment->setNew(); - if (!$comment_handler->insert($comment)) { + if (!$commentHandler->insert($comment)) { echo " " . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT_ERROR, $comment->getVar('com_title')) . "<br />"; } else { echo " " . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT, $comment->getVar('com_title')) . "<br />"; Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/import.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/import.php 2015-05-26 09:32:35 UTC (rev 13069) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/import.php 2015-05-26 09:35:26 UTC (rev 13070) @@ -23,13 +23,12 @@ $op = XoopsRequest::getString('op', XoopsRequest::getString('op', 'none', 'GET'), 'POST'); - switch ($op) { case "importExecute": $importfile = XoopsRequest::getString('importfile', 'nonselected', 'POST'); - $importfile_path = $GLOBALS['xoops']->path("/modules/" . $publisher->getModule()->dirname() . "/admin/import/" . $importfile . ".php"); + $importfile_path = $GLOBALS['xoops']->path("modules/" . $publisher->getModule()->dirname() . "/admin/import/" . $importfile . ".php"); include_once $importfile_path; break; @@ -45,11 +44,11 @@ xoops_load('XoopsFormLoader'); - $module_handler = xoops_gethandler('module'); + $moduleHandler = xoops_gethandler('module'); // WF-Section /*$wfs_version = 0; - $moduleObj = $module_handler->getByDirname('wfsection'); + $moduleObj = $moduleHandler->getByDirname('wfsection'); if ($moduleObj) { $from_module_version = round($moduleObj->getVar('version') / 100, 2); if (($from_module_version == 1.5) || $from_module_version == 1.04 || $from_module_version == 1.01 || $from_module_version == 2.07 || $from_module_version == 2.06) { @@ -60,7 +59,7 @@ // News $news_version = 0; - $moduleObj = $module_handler->getByDirname('news'); + $moduleObj = $moduleHandler->getByDirname('news'); if ($moduleObj) { $from_module_version = round($moduleObj->getVar('version') / 100, 2); if (($from_module_version >= 1.1)) { @@ -71,7 +70,7 @@ // xNews $xnews_version = 0; - $moduleObj = $module_handler->getByDirname('xnews'); + $moduleObj = $moduleHandler->getByDirname('xnews'); if ($moduleObj) { $from_module_version = round($moduleObj->getVar('version') / 100, 2); if (($from_module_version >= 1.1)) { @@ -82,7 +81,7 @@ // AMS $ams_version = 0; - $moduleObj = $module_handler->getByDirname('AMS'); + $moduleObj = $moduleHandler->getByDirname('AMS'); if ($moduleObj) { $from_module_version = round($moduleObj->getVar('version') / 100, 2); if (($from_module_version >= 1.1)) { @@ -93,7 +92,7 @@ // Smartsection $smartsection_version = 0; - $moduleObj = $module_handler->getByDirname('smartsection'); + $moduleObj = $moduleHandler->getByDirname('smartsection'); if ($moduleObj) { $from_module_version = round($moduleObj->getVar('version') / 100, 2); if (($from_module_version >= 1.1)) { @@ -104,7 +103,7 @@ // C-Jay Content $cjaycontent_version = 0; - $moduleObj = $module_handler->getByDirname('cjaycontent'); + $moduleObj = $moduleHandler->getByDirname('cjaycontent'); if ($moduleObj) { $from_module_version = round($moduleObj->getVar('version') / 100, 2); if (($from_module_version >= 1.1)) { @@ -115,7 +114,7 @@ // FmContent $fmcontent_version = 0; - $moduleObj = $module_handler->getByDirname('fmcontent'); + $moduleObj = $moduleHandler->getByDirname('fmcontent'); if ($moduleObj) { $from_module_version = round($moduleObj->getVar('version') / 100, 2); if (($from_module_version >= 1.1)) { @@ -126,7 +125,7 @@ // XF-Section /*$xfs_version = 0; - $moduleObj = $module_handler->getByDirname('xfsection'); + $moduleObj = $moduleHandler->getByDirname('xfsection'); If ($moduleObj) { $from_module_version = round($moduleObj->getVar('version') / 100, 2); if ($from_module_version > 1.00) { Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/index.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/index.php 2015-05-26 09:32:35 UTC (rev 13069) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/index.php 2015-05-26 09:35:26 UTC (rev 13070) @@ -33,8 +33,6 @@ // $indexAdmin->addConfigBoxLine(array($folder[$i], '777'), 'chmod'); } - - echo $indexAdmin->addNavigation('index.php'); echo $indexAdmin->renderIndex(); Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/menu.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/menu.php 2015-05-26 09:32:35 UTC (rev 13069) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/menu.php 2015-05-26 09:35:26 UTC (rev 13070) @@ -22,8 +22,8 @@ // defined("XOOPS_ROOT_PATH") || exit("XOOPS root path not defined"); $dirname = basename(dirname(__DIR__)); -$module_handler = xoops_gethandler('module'); -$module = $module_handler->getByDirname($dirname); +$moduleHandler = xoops_gethandler('module'); +$module = $moduleHandler->getByDirname($dirname); $pathIcon32 = $module->getInfo('icons32'); include_once dirname(__DIR__) . '/include/config.php'; Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/mimetypes.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/mimetypes.php 2015-05-26 09:32:35 UTC (rev 13069) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/mimetypes.php 2015-05-26 09:35:26 UTC (rev 13070) @@ -48,7 +48,6 @@ $op = XoopsRequest::getString('op', 'default', 'GET'); - switch ($op) { case "add": PublisherMimetypesUtilities::add(); @@ -95,7 +94,7 @@ $publisher = PublisherPublisher::getInstance(); global $limit, $start; $error = array(); - if (!(XoopsRequest::get('add_mime', '', 'POST'))) { + if (!(XoopsRequest::getString('add_mime', '', 'POST'))) { publisherCpHeader(); //publisher_adminMenu(4, _AM_PUBLISHER_MIMETYPES); @@ -554,7 +553,6 @@ $order = XoopsRequest::getString('order', 'ASC', 'POST'); $sort = XoopsRequest::getString('sort', 'mime_name', 'POST'); - publisherCpHeader(); //publisher_adminMenu(4, _AM_PUBLISHER_MIMETYPES . " > " . _AM_PUBLISHER_BUTTON_SEARCH); @@ -714,7 +712,6 @@ $limit = XoopsRequest::getInt('limit', 0, 'GET'); $start = XoopsRequest::getInt('start', 0, 'GET'); - if (!(XoopsRequest::getString('id', '', 'GET'))) { redirect_header(PUBLISHER_ADMIN_URL . "/mimetypes.php", 3, _AM_PUBLISHER_MESSAGE_NO_ID); } else { @@ -774,7 +771,7 @@ */ public static function clearEditSessionVars($id) { - $id = intval($id); + $id = (int)($id); $session = PublisherSession::getInstance(); $session->del("publisher_editMime_$id"); $session->del("publisher_editMimeErr_$id"); Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/preferences.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/preferences.php 2015-05-26 09:32:35 UTC (rev 13069) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/preferences.php 2015-05-26 09:35:26 UTC (rev 13070) @@ -40,7 +40,6 @@ $configcat = XoopsRequest::getString('configcat', '', 'GET'); - if ($op == 'showmod') { $config_handler = xoops_gethandler('config'); Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/pw_upload_file.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/pw_upload_file.php 2015-05-26 09:32:35 UTC (rev 13069) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/pw_upload_file.php 2015-05-26 09:35:26 UTC (rev 13070) @@ -24,11 +24,11 @@ $errors = array(); if (publisher_pagewrap_upload($errors)) { - redirect_header(XoopsRequest::get('backto', '', 'POST'), 2, _AM_PUBLISHER_FILEUPLOAD_SUCCESS); + redirect_header(XoopsRequest::getString('backto', '', 'POST'), 2, _AM_PUBLISHER_FILEUPLOAD_SUCCESS); } else { $errorstxt = implode('<br />', $errors); $message = sprintf(_CO_PUBLISHER_MESSAGE_FILE_ERROR, $errorstxt); - redirect_header(XoopsRequest::get('backto', '', 'POST'), 5, $message); + redirect_header(XoopsRequest::getString('backto', '', 'POST'), 5, $message); } /** Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/archive.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/archive.php 2015-05-26 09:32:35 UTC (rev 13069) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/archive.php 2015-05-26 09:35:26 UTC (rev 13070) @@ -81,8 +81,8 @@ foreach ($items as $item) { $time = XoopsLocal::formatTimestamp($item['datesub'], 'mysql', $useroffset); if (preg_match("/([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})/", $time, $datetime)) { - $this_year = intval($datetime[1]); - $this_month = intval($datetime[2]); + $this_year = (int)($datetime[1]); + $this_month = (int)($datetime[2]); //first year if (empty($lastyear)) { $lastyear = $this_year; Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/blocks/category_items_sel.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/blocks/category_items_sel.php 2015-05-26 09:32:35 UTC (rev 13069) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/blocks/category_items_sel.php 2015-05-26 09:35:26 UTC (rev 13070) @@ -72,6 +72,7 @@ unset($items, $categories, $itemObj, $catID, $catObj); if (count($block['categories']) == 0) return $block; + return $block; } Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/blocks/items_columns.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/blocks/items_columns.php 2015-05-26 09:32:35 UTC (rev 13069) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/blocks/items_columns.php 2015-05-26 09:35:26 UTC (rev 13070) @@ -37,10 +37,10 @@ $publisher = PublisherPublisher::getInstance(); //Column Settings - $opt_num_columns = isset($options[0]) ? intval($options[0]) : '2'; + $opt_num_columns = isset($options[0]) ? (int)($options[0]) : '2'; $sel_categories = isset($options[1]) ? explode(',', $options[1]) : array(); - $opt_cat_items = intval($options[2]); - $opt_cat_truncate = isset($options[3]) ? intval($options[3]) : '0'; + $opt_cat_items = (int)($options[2]); + $opt_cat_truncate = isset($options[3]) ? (int)($options[3]) : '0'; $block = array(); $block['lang_reads'] = _MB_PUBLISHER_READS; @@ -130,7 +130,7 @@ $block['template'] = $options[4]; $block['columns'] = $columns; - $block['columnwidth'] = intval(100 / $opt_num_columns); + $block['columnwidth'] = (int)(100 / $opt_num_columns); $GLOBALS['xoTheme']->addStylesheet(XOOPS_URL . '/modules/' . PUBLISHER_DIRNAME . '/assets/css/publisher.css'); Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/blocks/items_spot.php ===============================================... [truncated message content] |