";
echo "
";
//echo "
";
@@ -226,7 +226,7 @@
include_once $GLOBALS['xoops']->path('class/pagenav.php');
$pagenav = new XoopsPageNav($totalCategories, $publisher->getConfig('idxcat_perpage'), $startcategory, 'startcategory');
echo '
' . $pagenav->renderNav() . '
';
- echo '
';
+ echo '
';
publisherCloseCollapsableBar('createdcategories', 'createdcategoriesicon');
echo '
';
//editcat(false);
diff --git a/admin/clone.php b/admin/clone.php
index 4301cb78..73166e52 100644
--- a/admin/clone.php
+++ b/admin/clone.php
@@ -15,7 +15,6 @@
* @package Publisher
* @since 1.0
* @author trabis
- * @version $Id: clone.php 10374 2012-12-12 23:39:48Z trabis $
*/
include_once __DIR__ . '/admin_header.php';
@@ -26,7 +25,7 @@
if ('submit' === XoopsRequest::getString('op', '', 'POST')) {
if (!$GLOBALS['xoopsSecurity']->check()) {
- redirect_header('clone.php', 3, implode('
', $GLOBALS['xoopsSecurity']->getErrors()));
+ redirect_header('clone.php', 3, implode('
', $GLOBALS['xoopsSecurity']->getErrors()));
// exit();
}
@@ -47,7 +46,8 @@
$patterns = array(
strtolower(PUBLISHER_DIRNAME) => strtolower($clone),
strtoupper(PUBLISHER_DIRNAME) => strtoupper($clone),
- ucfirst(strtolower(PUBLISHER_DIRNAME)) => ucfirst(strtolower($clone)));
+ ucfirst(strtolower(PUBLISHER_DIRNAME)) => ucfirst(strtolower($clone))
+ );
$patKeys = array_keys($patterns);
$patValues = array_values($patterns);
@@ -56,7 +56,7 @@
$msg = '';
if (is_dir($GLOBALS['xoops']->path('modules/' . strtolower($clone)))) {
- $msg .= sprintf(_AM_PUBLISHER_CLONE_CONGRAT, "" . ucfirst(strtolower($clone)) . '') . "
\n";
+ $msg .= sprintf(_AM_PUBLISHER_CLONE_CONGRAT, "" . ucfirst(strtolower($clone)) . '') . "
\n";
if (!$logocreated) {
$msg .= _AM_PUBLISHER_CLONE_IMAGEFAIL;
}
@@ -86,7 +86,7 @@
function file_put_contents($filename, $data, $file_append = false)
{
if ($fp == fopen($filename, (!$file_append ? 'w+' : 'a+'))) {
- fputs($fp, $data);
+ fwrite($fp, $data);
fclose($fp);
}
}
@@ -154,7 +154,9 @@ public static function createLogo($dirname)
// unset($func);
}
- if (!file_exists($imageBase = $GLOBALS['xoops']->path('modules/' . $dirname . '/assets/images/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/logo.png')) ||
+ !file_exists($font = $GLOBALS['xoops']->path('modules/' . $dirname . '/assets/images/VeraBd.ttf'))
+ ) {
return false;
}
diff --git a/admin/file.php b/admin/file.php
index 91c998b3..5062d099 100644
--- a/admin/file.php
+++ b/admin/file.php
@@ -16,7 +16,6 @@
* @since 1.0
* @author trabis
* @author The SmartFactory
- * @version $Id: file.php 10374 2012-12-12 23:39:48Z trabis $
*/
include_once __DIR__ . '/admin_header.php';
@@ -43,7 +42,7 @@ function publisher_editFile($showmenu = false, $fileid = 0, $itemid = 0)
// exit();
}
- echo "
\n";
+ echo "
\n";
echo "" . _AM_PUBLISHER_FILE_EDITING . '';
echo "" . _AM_PUBLISHER_FILE_EDITING_DSC . '';
publisherOpenCollapsableBar('editfile', 'editfileicon', _AM_PUBLISHER_FILE_INFORMATIONS);
@@ -111,11 +110,11 @@ function publisher_editFile($showmenu = false, $fileid = 0, $itemid = 0)
// Storing the file
if (!$fileObj->store()) {
- redirect_header('item.php?op=mod&itemid=' . $fileObj->itemid().'#tab_2', 3, _AM_PUBLISHER_FILE_EDITING_ERROR . publisherFormatErrors($fileObj->getErrors()));
+ redirect_header('item.php?op=mod&itemid=' . $fileObj->itemid() . '#tab_2', 3, _AM_PUBLISHER_FILE_EDITING_ERROR . publisherFormatErrors($fileObj->getErrors()));
// exit;
}
- redirect_header('item.php?op=mod&itemid=' . $fileObj->itemid().'#tab_2', 2, _AM_PUBLISHER_FILE_EDITING_SUCCESS);
+ redirect_header('item.php?op=mod&itemid=' . $fileObj->itemid() . '#tab_2', 2, _AM_PUBLISHER_FILE_EDITING_SUCCESS);
// exit();
break;
@@ -130,18 +129,18 @@ function publisher_editFile($showmenu = false, $fileid = 0, $itemid = 0)
if ($confirm) {
if (!$publisher->getHandler('file')->delete($fileObj)) {
- redirect_header('item.php?op=mod&itemid=' . $fileObj->itemid().'#tab_2', 2, _AM_PUBLISHER_FILE_DELETE_ERROR);
+ redirect_header('item.php?op=mod&itemid=' . $fileObj->itemid() . '#tab_2', 2, _AM_PUBLISHER_FILE_DELETE_ERROR);
// exit;
}
- redirect_header('item.php?op=mod&itemid=' . $fileObj->itemid().'#tab_2', 2, sprintf(_AM_PUBLISHER_FILEISDELETED, $fileObj->name()));
+ redirect_header('item.php?op=mod&itemid=' . $fileObj->itemid() . '#tab_2', 2, sprintf(_AM_PUBLISHER_FILEISDELETED, $fileObj->name()));
// exit();
} else {
// no confirm: show deletion condition
$fileid = XoopsRequest::getInt('fileid', 0, 'GET');
publisherCpHeader();
- xoops_confirm(array('op' => 'del', 'fileid' => $fileObj->fileid(), 'confirm' => 1, 'name' => $fileObj->name()), 'file.php', _AM_PUBLISHER_DELETETHISFILE . '
' . $fileObj->name() . '
', _AM_PUBLISHER_DELETE);
+ xoops_confirm(array('op' => 'del', 'fileid' => $fileObj->fileid(), 'confirm' => 1, 'name' => $fileObj->name()), 'file.php', _AM_PUBLISHER_DELETETHISFILE . '
' . $fileObj->name() . '
', _AM_PUBLISHER_DELETE);
xoops_cp_footer();
}
diff --git a/admin/import.php b/admin/import.php
index b790f589..86a9f169 100644
--- a/admin/import.php
+++ b/admin/import.php
@@ -16,7 +16,6 @@
* @since 1.0
* @author trabis
* @author The SmartFactory
- * @version $Id: import.php 12825 2014-10-31 02:42:34Z zyspec $
*/
include_once __DIR__ . '/admin_header.php';
diff --git a/admin/import/ams.php b/admin/import/ams.php
index 77ab4f88..9049b200 100644
--- a/admin/import/ams.php
+++ b/admin/import/ams.php
@@ -17,7 +17,6 @@
* @author trabis
* @author The SmartFactory
* @author Marius Scurtescu
- * @version $Id: ams.php 10374 2012-12-12 23:39:48Z trabis $
*/
include_once dirname(__DIR__) . '/admin_header.php';
@@ -58,7 +57,7 @@
// add 'publisher' category to 'imagecategory' table
// if (!$GLOBALS['xoopsSecurity']->check()) {
- // redirect_header('admin.php?fct=images', 3, implode('
', $GLOBALS['xoopsSecurity']->getErrors()));
+ // redirect_header('admin.php?fct=images', 3, implode('
', $GLOBALS['xoopsSecurity']->getErrors()));
// }
$imageCategoryHandler = xoops_getHandler('imagecategory');
@@ -128,7 +127,7 @@
$cat_cbox_options[$cid] = "$cat_title ($art_count)";
}
- $cat_label = new XoopsFormLabel(_AM_PUBLISHER_IMPORT_CATEGORIES, implode('
', $cat_cbox_options));
+ $cat_label = new XoopsFormLabel(_AM_PUBLISHER_IMPORT_CATEGORIES, implode('
', $cat_cbox_options));
$cat_label->setDescription(_AM_PUBLISHER_IMPORT_CATEGORIES_DSC);
$form->addElement($cat_label);
@@ -362,7 +361,7 @@
$fileObj->setVar('short_url', $arrFile['filerealname']);
if ($fileObj->store($allowed_mimetypes, true, false)) {
- echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE_FILE, $arrFile['filerealname']) . '
';
+ echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE_FILE, $arrFile['filerealname']) . '
';
}
}
}
@@ -371,7 +370,7 @@
//------------------------
$newArticleArray[$arrArticle['storyid']] = $itemObj->itemid();
- echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE, $itemObj->getTitle()) . '
';
+ echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE, $itemObj->getTitle()) . '
';
++$cnt_imported_articles;
}
}
@@ -406,7 +405,7 @@
unset($oldid, $newCat);
// Looping through the comments to link them to the new articles and module
- echo _AM_PUBLISHER_IMPORT_COMMENTS . '
';
+ echo _AM_PUBLISHER_IMPORT_COMMENTS . '
';
$publisher_module_id = $publisher->getModule()->mid();
@@ -419,9 +418,9 @@
$comment->setVar('com_modid', $publisher_module_id);
$comment->setNew();
if (!$commentHandler->insert($comment)) {
- echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT_ERROR, $comment->getVar('com_title')) . '
';
+ echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT_ERROR, $comment->getVar('com_title')) . '
';
} else {
- echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT, $comment->getVar('com_title')) . '
';
+ echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT, $comment->getVar('com_title')) . '
';
}
}
// unset($comment);
diff --git a/admin/import/cjaycontent.php b/admin/import/cjaycontent.php
index dcf770b3..afc484fb 100644
--- a/admin/import/cjaycontent.php
+++ b/admin/import/cjaycontent.php
@@ -17,7 +17,6 @@
* @author trabis
* @author The SmartFactory
* @author Marius Scurtescu
- * @version $Id: cjaycontent.php 10374 2012-12-12 23:39:48Z trabis $
*/
include_once dirname(__DIR__) . '/admin_header.php';
@@ -146,7 +145,7 @@
continue;
} else {
$newArticleArray[$arrArticle['id']] = $itemObj->itemid();
- echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE, $itemObj->getTitle()) . '
';
+ echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE, $itemObj->getTitle()) . '
';
++$cnt_imported_articles;
}
}
@@ -154,7 +153,7 @@
echo '
';
// Looping through the comments to link them to the new articles and module
- echo _AM_PUBLISHER_IMPORT_COMMENTS . '
';
+ echo _AM_PUBLISHER_IMPORT_COMMENTS . '
';
$publisher_module_id = $publisher->getModule()->mid();
@@ -167,9 +166,9 @@
$comment->setVar('com_modid', $publisher_module_id);
$comment->setNew();
if (!$commentHandler->insert($comment)) {
- echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT_ERROR, $comment->getVar('com_title')) . '
';
+ echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT_ERROR, $comment->getVar('com_title')) . '
';
} else {
- echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT, $comment->getVar('com_title')) . '
';
+ echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT, $comment->getVar('com_title')) . '
';
}
}
// unset($comment);
diff --git a/admin/import/fmcontent.php b/admin/import/fmcontent.php
index 5cb85c13..b25d038c 100644
--- a/admin/import/fmcontent.php
+++ b/admin/import/fmcontent.php
@@ -18,7 +18,6 @@
* @author The SmartFactory
* @author Marius Scurtescu
* @author ZySpec
- * @version $Id: news.php 12629 2014-06-22 02:42:25Z beckmi $
*/
include_once dirname(__DIR__) . '/admin_header.php';
@@ -81,7 +80,7 @@
echo "" . sprintf(_AM_PUBLISHER_IMPORT_MODULE_FOUND, $importFromModuleName, $fmContentCount, count($cat_cbox_options)) . '';
$form = new XoopsThemeForm(_AM_PUBLISHER_IMPORT_SETTINGS, 'import_form', PUBLISHER_ADMIN_URL . "/import/$scriptname");
- $cat_label = new XoopsFormLabel(_AM_PUBLISHER_IMPORT_CATEGORIES, implode('
', $cat_cbox_options));
+ $cat_label = new XoopsFormLabel(_AM_PUBLISHER_IMPORT_CATEGORIES, implode('
', $cat_cbox_options));
$cat_label->setDescription(_AM_PUBLISHER_IMPORT_CATEGORIES_DSC);
$form->addElement($cat_label);
@@ -191,11 +190,11 @@
}
if (!$itemObj->store()) {
- echo sprintf(' ' . _AM_PUBLISHER_IMPORT_ARTICLE_ERROR, $thisFmContentObj->getVar('title')) . '
\n';
+ echo sprintf(' ' . _AM_PUBLISHER_IMPORT_ARTICLE_ERROR, $thisFmContentObj->getVar('title')) . '
\n';
continue;
} else {
$newArticleArray[$thisFmContentObj->getVar('storyid')] = $itemObj->itemid();
- echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE, $itemObj->getTitle()) . '
\n';
+ echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE, $itemObj->getTitle()) . '
\n';
++$cnt_imported_articles;
}
}
@@ -207,7 +206,7 @@
publisherSaveCategoryPermissions($groupsIds, $categoryObj->categoryid(), 'item_submit');
unset($fmContentObjs, $itemObj, $categoryObj, $thisFmContentObj);
- echo "
\n";
+ echo "
\n";
}
// Process all "normal" Topics (categories) from FmContent
@@ -238,14 +237,14 @@
}
}
if (!$publisher->getHandler('category')->insert($categoryObj)) {
- echo sprintf(_AM_PUBLISHER_IMPORT_CATEGORY_ERROR, $thisFmTopicObj->getVar('topic_title')) . "
\n";
+ echo sprintf(_AM_PUBLISHER_IMPORT_CATEGORY_ERROR, $thisFmTopicObj->getVar('topic_title')) . "
\n";
continue;
}
$CatIds['newid'] = $categoryObj->categoryid();
++$cnt_imported_cat;
- echo sprintf(_AM_PUBLISHER_IMPORT_CATEGORY_SUCCESS, $categoryObj->name()) . "
\n";
+ echo sprintf(_AM_PUBLISHER_IMPORT_CATEGORY_SUCCESS, $categoryObj->name()) . "
\n";
// retrieve all articles (content) for this category
$criteria = new CriteriaCompo();
@@ -283,11 +282,11 @@
}
if (!$itemObj->store()) {
- echo sprintf(' ' . _AM_PUBLISHER_IMPORT_ARTICLE_ERROR, $thisFmContentObj->getVar('title')) . "
\n";
+ echo sprintf(' ' . _AM_PUBLISHER_IMPORT_ARTICLE_ERROR, $thisFmContentObj->getVar('title')) . "
\n";
continue;
} else {
$newArticleArray[$thisFmContentObj->getVar('storyid')] = $itemObj->itemid();
- echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE, $itemObj->getTitle()) . "
\n";
+ echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE, $itemObj->getTitle()) . "
\n";
++$cnt_imported_articles;
}
}
@@ -300,7 +299,7 @@
$newCatArray[$CatIds['oldid']] = $CatIds;
unset($CatIds, $thisFmContentObj);
- echo "
\n";
+ echo "
\n";
}
// unset($thisFmTopicObj);
@@ -316,7 +315,7 @@
unset($oldid, $CatIds);
// Looping through the comments to link them to the new articles and module
- echo _AM_PUBLISHER_IMPORT_COMMENTS . "
\n";
+ echo _AM_PUBLISHER_IMPORT_COMMENTS . "
\n";
$publisher_module_id = $publisher->getModule()->mid();
@@ -329,14 +328,14 @@
$comment->setVar('com_modid', $publisher_module_id);
$comment->setNew();
if (!$commentHandler->insert($comment)) {
- echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT_ERROR, $comment->getVar('com_title')) . "
\n";
+ echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT_ERROR, $comment->getVar('com_title')) . "
\n";
} else {
- echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT, $comment->getVar('com_title')) . "
\n";
+ echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT, $comment->getVar('com_title')) . "
\n";
}
}
// unset($comment);
- echo '
' . _AM_PUBLISHER_IMPORT_DONE . "
\n" . '' . sprintf(_AM_PUBLISHER_IMPORTED_CATEGORIES, $cnt_imported_cat) . "
\n" . '' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLES, $cnt_imported_articles) . "
\n" . "
\n" . _AM_PUBLISHER_IMPORT_GOTOMODULE . "
\n";
+ echo '
' . _AM_PUBLISHER_IMPORT_DONE . "
\n" . '' . sprintf(_AM_PUBLISHER_IMPORTED_CATEGORIES, $cnt_imported_cat) . "
\n" . '' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLES, $cnt_imported_articles) . "
\n" . "
\n" . _AM_PUBLISHER_IMPORT_GOTOMODULE . "
\n";
publisherCloseCollapsableBar('fmimportgo', 'fmimportgoicon');
xoops_cp_footer();
diff --git a/admin/import/news.php b/admin/import/news.php
index 4097f4e6..cb8b892b 100644
--- a/admin/import/news.php
+++ b/admin/import/news.php
@@ -17,7 +17,6 @@
* @author trabis
* @author The SmartFactory
* @author Marius Scurtescu
- * @version $Id: news.php 10374 2012-12-12 23:39:48Z trabis $
*/
include_once dirname(__DIR__) . '/admin_header.php';
@@ -65,7 +64,7 @@
$cat_cbox_options[$cid] = '$cat_title ($art_count)';
}
- $cat_label = new XoopsFormLabel(_AM_PUBLISHER_IMPORT_CATEGORIES, implode('
', $cat_cbox_options));
+ $cat_label = new XoopsFormLabel(_AM_PUBLISHER_IMPORT_CATEGORIES, implode('
', $cat_cbox_options));
$cat_label->setDescription(_AM_PUBLISHER_IMPORT_CATEGORIES_DSC);
$form->addElement($cat_label);
@@ -208,14 +207,14 @@
$fileObj->setVar('filename', $arrFile['filerealname']);
if ($fileObj->store($allowed_mimetypes, true, false)) {
- echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE_FILE, $arrFile['filerealname']) . '
';
+ echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE_FILE, $arrFile['filerealname']) . '
';
}
}
}
}
*/
$newArticleArray[$arrArticle['storyid']] = $itemObj->itemid();
- echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE, $itemObj->getTitle()) . '
';
+ echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE, $itemObj->getTitle()) . '
';
++$cnt_imported_articles;
}
}
@@ -247,7 +246,7 @@
unset($oldid, $newCat);
// Looping through the comments to link them to the new articles and module
- echo _AM_PUBLISHER_IMPORT_COMMENTS . '
';
+ echo _AM_PUBLISHER_IMPORT_COMMENTS . '
';
$publisher_module_id = $publisher->getModule()->mid();
@@ -260,9 +259,9 @@
$comment->setVar('com_modid', $publisher_module_id);
$comment->setNew();
if (!$commentHandler->insert($comment)) {
- echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT_ERROR, $comment->getVar('com_title')) . '
';
+ echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT_ERROR, $comment->getVar('com_title')) . '
';
} else {
- echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT, $comment->getVar('com_title')) . '
';
+ echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT, $comment->getVar('com_title')) . '
';
}
}
// unset($comment);
diff --git a/admin/import/smartsection.php b/admin/import/smartsection.php
index e5dadada..4d820328 100644
--- a/admin/import/smartsection.php
+++ b/admin/import/smartsection.php
@@ -17,7 +17,6 @@
* @author trabis
* @author The SmartFactory
* @author Marius Scurtescu
- * @version $Id: smartsection.php 10374 2012-12-12 23:39:48Z trabis $
*/
include_once dirname(__DIR__) . '/admin_header.php';
@@ -65,7 +64,7 @@
$cat_cbox_options[$cid] = "$cat_title ($art_count)";
}
- $cat_label = new XoopsFormLabel(_AM_PUBLISHER_IMPORT_CATEGORIES, implode('
', $cat_cbox_options));
+ $cat_label = new XoopsFormLabel(_AM_PUBLISHER_IMPORT_CATEGORIES, implode('
', $cat_cbox_options));
$cat_label->setDescription(_AM_PUBLISHER_IMPORT_CATEGORIES_DSC);
$form->addElement($cat_label);
@@ -185,14 +184,14 @@
$fileObj->setVar('fileid', 0);
if ($fileObj->store($allowed_mimetypes, true, false)) {
- echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE_FILE, $arrFile['filename']) . '
';
+ echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE_FILE, $arrFile['filename']) . '
';
}
}
}
}
$newArticleArray[$arrArticle['itemid']] = $itemObj->itemid();
- echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE, $itemObj->getTitle()) . '
';
+ echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE, $itemObj->getTitle()) . '
';
++$cnt_imported_articles;
}
}
@@ -224,7 +223,7 @@
unset($oldid, $newCat);
// Looping through the comments to link them to the new articles and module
- echo _AM_PUBLISHER_IMPORT_COMMENTS . '
';
+ echo _AM_PUBLISHER_IMPORT_COMMENTS . '
';
$publisher_module_id = $publisher->getModule()->mid();
@@ -237,9 +236,9 @@
$comment->setVar('com_modid', $publisher_module_id);
$comment->setNew();
if (!$commentHandler->insert($comment)) {
- echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT_ERROR, $comment->getVar('com_title')) . '
';
+ echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT_ERROR, $comment->getVar('com_title')) . '
';
} else {
- echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT, $comment->getVar('com_title')) . '
';
+ echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT, $comment->getVar('com_title')) . '
';
}
}
// unset($comment);
diff --git a/admin/import/wfsection.php b/admin/import/wfsection.php
index a72194d8..440bcbc5 100644
--- a/admin/import/wfsection.php
+++ b/admin/import/wfsection.php
@@ -17,7 +17,6 @@
* @author trabis
* @author The SmartFactory
* @author Marius Scurtescu
- * @version $Id: wfsection.php 10374 2012-12-12 23:39:48Z trabis $
*/
include_once dirname(__DIR__) . '/admin_header.php';
@@ -63,7 +62,7 @@
$cat_title = $myts->displayTarea($cat_title);
$cat_cbox_options[$cid] = "$cat_title ($art_count)";
}
- $cat_label = new XoopsFormLabel(_AM_PUBLISHER_IMPORT_CATEGORIES, implode('
', $cat_cbox_options));
+ $cat_label = new XoopsFormLabel(_AM_PUBLISHER_IMPORT_CATEGORIES, implode('
', $cat_cbox_options));
$cat_label->setDescription(_AM_PUBLISHER_IMPORT_CATEGORIES_DSC);
$form->addElement($cat_label);
@@ -205,14 +204,14 @@
$fileObj->setVar('filename', $arrFile['filerealname']);
if ($fileObj->store($allowed_mimetypes, true, false)) {
- echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE_FILE, $arrFile['filerealname']) . '
';
+ echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE_FILE, $arrFile['filerealname']) . '
';
}
}
}
}
$newArticleArray[$arrArticle['articleid']] = $itemObj->itemid();
- echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE, $itemObj->getTitle()) . '
';
+ echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE, $itemObj->getTitle()) . '
';
++$cnt_imported_articles;
}
}
@@ -236,7 +235,7 @@
unset($oldid, $newCat);
// Looping through the comments to link them to the new articles and module
- echo _AM_PUBLISHER_IMPORT_COMMENTS . '
';
+ echo _AM_PUBLISHER_IMPORT_COMMENTS . '
';
$moduleHandler = xoops_getHandler('module');
$moduleObj = $moduleHandler->getByDirname('wfsection');
@@ -253,9 +252,9 @@
$comment->setVar('com_modid', $publisher_module_id);
$comment->setNew();
if (!$commentHandler->insert($comment)) {
- echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT_ERROR, $comment->getVar('com_title')) . '
';
+ echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT_ERROR, $comment->getVar('com_title')) . '
';
} else {
- echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT, $comment->getVar('com_title')) . '
';
+ echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT, $comment->getVar('com_title')) . '
';
}
}
// unset($comment);
diff --git a/admin/import/xfsection.php b/admin/import/xfsection.php
index a6eb3cec..06dceec1 100644
--- a/admin/import/xfsection.php
+++ b/admin/import/xfsection.php
@@ -17,7 +17,6 @@
* @author trabis
* @author The SmartFactory
* @author ohwada
- * @version $Id: xfsection.php 10374 2012-12-12 23:39:48Z trabis $
*/
include_once dirname(__DIR__) . '/admin_header.php';
@@ -63,7 +62,7 @@
$cat_title = $myts->displayTarea($cat_title);
$cat_cbox_options[$cid] = "$cat_title ($art_count)";
}
- $cat_label = new XoopsFormLabel(_AM_PUBLISHER_IMPORT_CATEGORIES, implode('
', $cat_cbox_options));
+ $cat_label = new XoopsFormLabel(_AM_PUBLISHER_IMPORT_CATEGORIES, implode('
', $cat_cbox_options));
$cat_label->setDescription(_AM_PUBLISHER_IMPORT_CATEGORIES_DSC);
$form->addElement($cat_label);
@@ -204,14 +203,14 @@
$fileObj->setVar('filename', $arrFile['filerealname']);
if ($fileObj->store($allowed_mimetypes, true, false)) {
- echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE_FILE, $arrFile['filerealname']) . '
';
+ echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE_FILE, $arrFile['filerealname']) . '
';
}
}
}
}
$newArticleArray[$arrArticle['articleid']] = $itemObj->itemid();
- echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE, $itemObj->getTitle()) . '
';
+ echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE, $itemObj->getTitle()) . '
';
++$cnt_imported_articles;
}
}
@@ -235,7 +234,7 @@
unset($oldid, $newCat);
// Looping through the comments to link them to the new articles and module
- echo _AM_PUBLISHER_IMPORT_COMMENTS . '
';
+ echo _AM_PUBLISHER_IMPORT_COMMENTS . '
';
$moduleHandler = xoops_getHandler('module');
$moduleObj = $moduleHandler->getByDirname('xfsection');
@@ -252,9 +251,9 @@
$comment->setVar('com_modid', $publisher_module_id);
$comment->setNew();
if (!$commentHandler->insert($comment)) {
- echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT_ERROR, $comment->getVar('com_title')) . '
';
+ echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT_ERROR, $comment->getVar('com_title')) . '
';
} else {
- echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT, $comment->getVar('com_title')) . '
';
+ echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT, $comment->getVar('com_title')) . '
';
}
}
// unset($comment);
diff --git a/admin/import/xnews.php b/admin/import/xnews.php
index c3fda301..64d91e7a 100644
--- a/admin/import/xnews.php
+++ b/admin/import/xnews.php
@@ -17,7 +17,6 @@
* @author trabis
* @author The SmartFactory
* @author Marius Scurtescu
- * @version $Id: xnews.php 10374 2012-12-12 23:39:48Z trabis $
*/
include_once dirname(__DIR__) . '/admin_header.php';
@@ -58,7 +57,7 @@
// add 'publisher' category to 'imagecategory' table
// if (!$GLOBALS['xoopsSecurity']->check()) {
- // redirect_header('admin.php?fct=images', 3, implode('
', $GLOBALS['xoopsSecurity']->getErrors()));
+ // redirect_header('admin.php?fct=images', 3, implode('
', $GLOBALS['xoopsSecurity']->getErrors()));
// }
$imageCategoryHandler = xoops_getHandler('imagecategory');
@@ -129,7 +128,7 @@
$cat_cbox_options[$cid] = "$cat_title ($art_count)";
}
- $cat_label = new XoopsFormLabel(_AM_PUBLISHER_IMPORT_CATEGORIES, implode('
', $cat_cbox_options));
+ $cat_label = new XoopsFormLabel(_AM_PUBLISHER_IMPORT_CATEGORIES, implode('
', $cat_cbox_options));
$cat_label->setDescription(_AM_PUBLISHER_IMPORT_CATEGORIES_DSC);
$form->addElement($cat_label);
@@ -361,7 +360,7 @@
$fileObj->setVar('short_url', $arrFile['filerealname']);
if ($fileObj->store($allowed_mimetypes, true, false)) {
- echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE_FILE, $arrFile['filerealname']) . '
';
+ echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE_FILE, $arrFile['filerealname']) . '
';
}
}
}
@@ -370,7 +369,7 @@
//------------------------
$newArticleArray[$arrArticle['storyid']] = $itemObj->itemid();
- echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE, $itemObj->getTitle()) . '
';
+ echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE, $itemObj->getTitle()) . '
';
++$cnt_imported_articles;
}
}
@@ -405,7 +404,7 @@
unset($oldid, $newCat);
// Looping through the comments to link them to the new articles and module
- echo _AM_PUBLISHER_IMPORT_COMMENTS . '
';
+ echo _AM_PUBLISHER_IMPORT_COMMENTS . '
';
$publisher_module_id = $publisher->getModule()->mid();
@@ -418,9 +417,9 @@
$comment->setVar('com_modid', $publisher_module_id);
$comment->setNew();
if (!$commentHandler->insert($comment)) {
- echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT_ERROR, $comment->getVar('com_title')) . '
';
+ echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT_ERROR, $comment->getVar('com_title')) . '
';
} else {
- echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT, $comment->getVar('com_title')) . '
';
+ echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT, $comment->getVar('com_title')) . '
';
}
}
// unset($comment);
diff --git a/admin/index.php b/admin/index.php
index 1302d718..885e5e5c 100644
--- a/admin/index.php
+++ b/admin/index.php
@@ -17,7 +17,6 @@
* @package Publisher
* @since 1.0
* @author Mage, Mamba
- * @version $Id: index.php 10374 2012-12-12 23:39:48Z trabis $
*/
include_once __DIR__ . '/admin_header.php';
@@ -33,7 +32,7 @@
// $indexAdmin->addConfigBoxLine(array($folder[$i], '777'), 'chmod');
}
-echo $indexAdmin->addNavigation('index.php');
+echo $indexAdmin->addNavigation(basename(__FILE__));
echo $indexAdmin->renderIndex();
include_once __DIR__ . '/admin_footer.php';
diff --git a/admin/item.php b/admin/item.php
index eecf2eea..aff8bae5 100644
--- a/admin/item.php
+++ b/admin/item.php
@@ -17,7 +17,6 @@
* @since 1.0
* @author trabis
* @author The SmartFactory
- * @version $Id: item.php 10661 2013-01-04 19:22:48Z trabis $
*/
include_once __DIR__ . '/admin_header.php';
@@ -156,7 +155,7 @@
// exit();
} else {
xoops_cp_header();
- xoops_confirm(array('op' => 'del', 'itemid' => $itemObj->itemid(), 'confirm' => 1, 'name' => $itemObj->getTitle()), 'item.php', _AM_PUBLISHER_DELETETHISITEM . "
'" . $itemObj->getTitle() . "'.
", _AM_PUBLISHER_DELETE);
+ xoops_confirm(array('op' => 'del', 'itemid' => $itemObj->itemid(), 'confirm' => 1, 'name' => $itemObj->getTitle()), 'item.php', _AM_PUBLISHER_DELETETHISITEM . "
'" . $itemObj->getTitle() . "'.
", _AM_PUBLISHER_DELETE);
xoops_cp_footer();
}
exit();
@@ -168,7 +167,7 @@
//publisher_adminMenu(2, _AM_PUBLISHER_ITEMS);
xoops_load('XoopsPageNav');
- echo "
\n";
+ echo "
\n";
echo "';
@@ -218,7 +217,7 @@
echo '';
}
echo "\n";
- echo "
\n";
+ echo "
\n";
$pagenav = new XoopsPageNav($totalitems, $publisher->getConfig('idxcat_perpage'), $submittedstartitem, 'submittedstartitem');
echo '' . $pagenav->renderNav() . '
';
@@ -268,7 +267,7 @@
echo '';
}
echo "\n";
- echo "
\n";
+ echo "
\n";
$pagenav = new XoopsPageNav($totalitems, $publisher->getConfig('idxcat_perpage'), $publishedstartitem, 'publishedstartitem');
echo '' . $pagenav->renderNav() . '
';
@@ -317,7 +316,7 @@
echo '';
}
echo "\n";
- echo "
\n";
+ echo "
\n";
$pagenav = new XoopsPageNav($totalitems, $publisher->getConfig('idxcat_perpage'), $offlinestartitem, 'offlinestartitem');
echo '' . $pagenav->renderNav() . '
';
@@ -365,7 +364,7 @@
echo '';
}
echo "\n";
- echo "
\n";
+ echo "
\n";
$pagenav = new XoopsPageNav($totalitems, $publisher->getConfig('idxcat_perpage'), $rejectedstartitem, 'rejectedstartitem');
echo '' . $pagenav->renderNav() . '
';
@@ -467,7 +466,7 @@ function publisher_editItem($showmenu = false, $itemid = 0, $clone = false)
$categoryObj = $itemObj->getCategory();
- echo "
\n";
+ echo "
\n";
publisherOpenCollapsableBar('edititemtable', 'edititemicon', $pageTitle, $pageInfo);
if ($clone) {
diff --git a/admin/main.php b/admin/main.php
index ddd1bb11..d7ba98f3 100644
--- a/admin/main.php
+++ b/admin/main.php
@@ -16,7 +16,6 @@
* @since 1.0
* @author trabis
* @author The SmartFactory
- * @version $Id:main.php 335 2011-12-05 20:24:01Z lusopoemas@gmail.com $
*/
include_once __DIR__ . '/admin_header.php';
@@ -60,19 +59,24 @@
$totalrejected = $publisher->getHandler('item')->getItemsCount(-1, array(PublisherConstants::PUBLISHER_STATUS_REJECTED));
// Check Path Configuration
-if ((publisherGetPathStatus('root', true) < 0) || (publisherGetPathStatus('images', true) < 0) || (publisherGetPathStatus('images/category', true) < 0) || (publisherGetPathStatus('images/item', true) < 0) || (publisherGetPathStatus('content', true) < 0)) {
+if ((publisherGetPathStatus('root', true) < 0) ||
+ (publisherGetPathStatus('images', true) < 0) ||
+ (publisherGetPathStatus('images/category', true) < 0) ||
+ (publisherGetPathStatus('images/item', true) < 0) ||
+ (publisherGetPathStatus('content', true) < 0)
+) {
PublisherUtilities::createDir();
}
publisherOpenCollapsableBar('inventorytable', 'inventoryicon', _AM_PUBLISHER_INVENTORY);
-echo '
';
+echo '
';
echo "";
echo "" . _AM_PUBLISHER_TOTALCAT . " | " . $totalcategories . ' | ';
echo "" . _AM_PUBLISHER_TOTALSUBMITTED . " | " . $totalsubmitted . ' | ';
echo "" . _AM_PUBLISHER_TOTALPUBLISHED . " | " . $totalpublished . ' | ';
echo "" . _AM_PUBLISHER_TOTAL_OFFLINE . " | " . $totaloffline . ' | ';
echo '
';
-echo '
';
+echo '
';
echo " ' . "\n\n";
@@ -995,7 +998,7 @@ function publisherGetEditors($allowedEditors = null)
/**
* @param string $string
- * @param int $length
+ * @param int $length
* @return int
*/
function publisherStringToInt($string = '', $length = 5)
@@ -1005,6 +1008,7 @@ function publisherStringToInt($string = '', $length = 5)
for ($i = 0; $i < $length; ++$i) {
$final .= (int)$string[$i];
}
+
return (int)$final;
}
diff --git a/include/media.textsanitizer.php b/include/media.textsanitizer.php
index 9f3ffb63..dc5741ad 100644
--- a/include/media.textsanitizer.php
+++ b/include/media.textsanitizer.php
@@ -17,7 +17,6 @@
* @since 1.0
* @author trabis