Skip to content

Commit

Permalink
Merge pull request #10 from mambax7/master
Browse files Browse the repository at this point in the history
1.02 RC5
  • Loading branch information
mambax7 committed Dec 25, 2015
2 parents 25ca2e1 + 4e2c996 commit 4e5a369
Show file tree
Hide file tree
Showing 47 changed files with 487 additions and 476 deletions.
6 changes: 2 additions & 4 deletions publisher/admin/clone.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
$msg .= _AM_PUBLISHER_CLONE_FAIL;
}
echo $msg;

} else {
include_once $GLOBALS['xoops']->path('class/xoopsformloader.php');
$form = new XoopsThemeForm(sprintf(_AM_PUBLISHER_CLONE_TITLE, $publisher->getModule()->getVar('name', 'E')), 'clone', 'clone.php', 'post', true);
Expand Down Expand Up @@ -98,7 +97,6 @@ function file_put_contents($filename, $data, $file_append = false)
*/
class PublisherClone
{

// recursive clonning script
/**
* @param $path
Expand Down Expand Up @@ -152,7 +150,7 @@ public static function createLogo($dirname)
return false;
}
}
// unset($func);
// 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'))) {
Expand All @@ -166,7 +164,7 @@ public static function createLogo($dirname)
imagefilledrectangle($imageModule, 5, 35, 85, 46, $greyColor);

// Write text
$textColor = imagecolorallocate($imageModule, 0, 0, 0);
$textColor = imagecolorallocate($imageModule, 0, 0, 0);
$spaceToBorder = (80 - strlen($dirname) * 6.5) / 2;
imagefttext($imageModule, 8.5, 0, $spaceToBorder, 45, $textColor, $font, ucfirst($dirname), array());

Expand Down
1 change: 0 additions & 1 deletion publisher/admin/file.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ function publisher_editFile($showmenu = false, $fileid = 0, $itemid = 0)
} else {
publisherCloseCollapsableBar('addfile', 'addfileicon');
}

}

$false = false;
Expand Down
12 changes: 6 additions & 6 deletions publisher/admin/import.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
$moduleObj = $moduleHandler->getByDirname('news');
if ($moduleObj) {
$from_module_version = round($moduleObj->getVar('version') / 100, 2);
if (($from_module_version >= 1.1)) {
if ($from_module_version >= 1.1) {
$importfile_select_array['news'] = 'News ' . $from_module_version;
$news_version = $from_module_version;
}
Expand All @@ -70,7 +70,7 @@
$moduleObj = $moduleHandler->getByDirname('xnews');
if ($moduleObj) {
$from_module_version = round($moduleObj->getVar('version') / 100, 2);
if (($from_module_version >= 1.1)) {
if ($from_module_version >= 1.1) {
$importfile_select_array['xnews'] = 'xNews ' . $from_module_version;
$xnews_version = $from_module_version;
}
Expand All @@ -81,7 +81,7 @@
$moduleObj = $moduleHandler->getByDirname('AMS');
if ($moduleObj) {
$from_module_version = round($moduleObj->getVar('version') / 100, 2);
if (($from_module_version >= 1.1)) {
if ($from_module_version >= 1.1) {
$importfile_select_array['ams'] = 'AMS ' . $from_module_version;
$ams_version = $from_module_version;
}
Expand All @@ -92,7 +92,7 @@
$moduleObj = $moduleHandler->getByDirname('smartsection');
if ($moduleObj) {
$from_module_version = round($moduleObj->getVar('version') / 100, 2);
if (($from_module_version >= 1.1)) {
if ($from_module_version >= 1.1) {
$importfile_select_array['smartsection'] = 'Smartsection ' . $from_module_version;
$smartsection_version = $from_module_version;
}
Expand All @@ -103,7 +103,7 @@
$moduleObj = $moduleHandler->getByDirname('cjaycontent');
if ($moduleObj) {
$from_module_version = round($moduleObj->getVar('version') / 100, 2);
if (($from_module_version >= 1.1)) {
if ($from_module_version >= 1.1) {
$importfile_select_array['cjaycontent'] = 'C-Jay Content ' . $from_module_version;
$cjaycontent_version = $from_module_version;
}
Expand All @@ -114,7 +114,7 @@
$moduleObj = $moduleHandler->getByDirname('fmcontent');
if ($moduleObj) {
$from_module_version = round($moduleObj->getVar('version') / 100, 2);
if (($from_module_version >= 1.1)) {
if ($from_module_version >= 1.1) {
$importfile_select_array['fmcontent'] = 'FmContent ' . $from_module_version;
$fmcontent_version = $from_module_version;
}
Expand Down
12 changes: 5 additions & 7 deletions publisher/admin/import/ams.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@
publisherOpenCollapsableBar('amsimport', 'amsimporticon', sprintf(_AM_PUBLISHER_IMPORT_FROM, $importFromModuleName), _AM_PUBLISHER_IMPORT_INFO);

$result = $GLOBALS['xoopsDB']->query('SELECT COUNT(*) FROM ' . $GLOBALS['xoopsDB']->prefix('ams_topics'));
list ($totalCat) = $GLOBALS['xoopsDB']->fetchRow($result);
list($totalCat) = $GLOBALS['xoopsDB']->fetchRow($result);

if ($totalCat == 0) {
echo "<span style=\"color: #567; margin: 3px 0 12px 0; font-size: small; display: block; \">" . _AM_PUBLISHER_IMPORT_NO_CATEGORY . '</span>';
} else {
include_once $GLOBALS['xoops']->path('class/xoopstree.php');

$result = $GLOBALS['xoopsDB']->query('SELECT COUNT(*) FROM ' . $GLOBALS['xoopsDB']->prefix('nw_stories'));
list ($totalArticles) = $GLOBALS['xoopsDB']->fetchRow($result);
list($totalArticles) = $GLOBALS['xoopsDB']->fetchRow($result);

if ($totalArticles == 0) {
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>';
Expand Down Expand Up @@ -80,7 +80,7 @@
echo 'Caught exception: couldn not insert Image Category' . $e->getMessage() . 'n';
}

$newid = $imagecategory->getVar('imgcat_id');
$newid = $imagecategory->getVar('imgcat_id');
$imagecategorypermHandler =& xoops_getHandler('groupperm');
if (!isset($readgroup)) {
$readgroup = array();
Expand Down Expand Up @@ -123,7 +123,7 @@
$result = $GLOBALS['xoopsDB']->query($sql);
$cat_cbox_options = array();

while ((list ($cid, $pid, $cat_title, $art_count) = $GLOBALS['xoopsDB']->fetchRow($result)) !== false) {
while ((list($cid, $pid, $cat_title, $art_count) = $GLOBALS['xoopsDB']->fetchRow($result)) !== false) {
$cat_title = $myts->displayTarea($cat_title);
$cat_cbox_options[$cid] = "$cat_title ($art_count)";
}
Expand Down Expand Up @@ -158,7 +158,7 @@
if ($op === 'go') {
publisherCpHeader();
//publisher_adminMenu(-1, _AM_PUBLISHER_IMPORT);
include_once(dirname(dirname(__DIR__))) . '/include/common.php';
include_once (dirname(dirname(__DIR__))) . '/include/common.php';
publisherOpenCollapsableBar('amsimportgo', 'amsimportgoicon', sprintf(_AM_PUBLISHER_IMPORT_FROM, $importFromModuleName), _AM_PUBLISHER_IMPORT_RESULT);

$moduleHandler =& xoops_getHandler('module');
Expand Down Expand Up @@ -248,7 +248,6 @@
*/

//============================

}
}

Expand Down Expand Up @@ -424,7 +423,6 @@
} else {
echo '&nbsp;&nbsp;' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT, $comment->getVar('com_title')) . '<br />';
}

}
// unset($comment);

Expand Down
7 changes: 3 additions & 4 deletions publisher/admin/import/cjaycontent.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
publisherOpenCollapsableBar('cjaycontentimport', 'cjaycontentimporticon', sprintf(_AM_PUBLISHER_IMPORT_FROM, $importFromModuleName), _AM_PUBLISHER_IMPORT_INFO);

$result = $GLOBALS['xoopsDB']->query('SELECT COUNT(*) FROM ' . $GLOBALS['xoopsDB']->prefix('cjaycontent'));
list ($totalArticles) = $GLOBALS['xoopsDB']->fetchRow($result);
list($totalArticles) = $GLOBALS['xoopsDB']->fetchRow($result);

if ($totalArticles == 0) {
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>';
Expand All @@ -84,7 +84,7 @@
if ($op === 'go') {
publisherCpHeader();
//publisher_adminMenu(-1, _AM_PUBLISHER_IMPORT);
include_once(dirname(dirname(__DIR__))) . '/include/common.php';
include_once (dirname(dirname(__DIR__))) . '/include/common.php';
publisherOpenCollapsableBar('cjaycontentimportgo', 'cjaycontentimportgoicon', sprintf(_AM_PUBLISHER_IMPORT_FROM, $importFromModuleName), _AM_PUBLISHER_IMPORT_RESULT);

$moduleHandler =& xoops_getHandler('module');
Expand Down Expand Up @@ -171,9 +171,8 @@
} else {
echo '&nbsp;&nbsp;' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT, $comment->getVar('com_title')) . '<br />';
}

}
// unset($comment);
// unset($comment);

echo '<br/><br/>Done.<br/>';

Expand Down
3 changes: 1 addition & 2 deletions publisher/admin/import/fmcontent.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
$result = $GLOBALS['xoopsDB']->query($sql);
$cat_cbox_options = array();

while ((list ($cid, $pid, $cat_title, $art_count) = $GLOBALS['xoopsDB']->fetchRow($result)) !== false) {
while ((list($cid, $pid, $cat_title, $art_count) = $GLOBALS['xoopsDB']->fetchRow($result)) !== false) {
$cat_title = $myts->displayTarea($cat_title);
$cat_cbox_options[$cid] = "{$cat_title} ($art_count)";
}
Expand Down Expand Up @@ -333,7 +333,6 @@
} else {
echo '&nbsp;&nbsp;' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT, $comment->getVar('com_title')) . "<br />\n";
}

}
// unset($comment);

Expand Down
7 changes: 3 additions & 4 deletions publisher/admin/import/news.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@
publisherOpenCollapsableBar('newsimport', 'newsimporticon', sprintf(_AM_PUBLISHER_IMPORT_FROM, $importFromModuleName), _AM_PUBLISHER_IMPORT_INFO);

$result = $GLOBALS['xoopsDB']->query('SELECT COUNT(*) FROM ' . $GLOBALS['xoopsDB']->prefix('topics'));
list ($totalCat) = $GLOBALS['xoopsDB']->fetchRow($result);
list($totalCat) = $GLOBALS['xoopsDB']->fetchRow($result);

if ($totalCat == 0) {
echo "<span style=\"color: #567; margin: 3px 0 12px 0; font-size: small; display: block; \">" . _AM_PUBLISHER_IMPORT_NO_CATEGORY . '</span>';
} else {
include_once $GLOBALS['xoops']->path('class/xoopstree.php');

$result = $GLOBALS['xoopsDB']->query('SELECT COUNT(*) FROM ' . $GLOBALS['xoopsDB']->prefix('stories'));
list ($totalArticles) = $GLOBALS['xoopsDB']->fetchRow($result);
list($totalArticles) = $GLOBALS['xoopsDB']->fetchRow($result);

if ($totalArticles == 0) {
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>';
Expand All @@ -60,7 +60,7 @@
$result = $GLOBALS['xoopsDB']->query($sql);
$cat_cbox_options = array();

while ((list ($cid, $pid, $cat_title, $art_count) = $GLOBALS['xoopsDB']->fetchRow($result)) !== false) {
while ((list($cid, $pid, $cat_title, $art_count) = $GLOBALS['xoopsDB']->fetchRow($result)) !== false) {
$cat_title = $myts->displayTarea($cat_title);
$cat_cbox_options[$cid] = '$cat_title ($art_count)';
}
Expand Down Expand Up @@ -264,7 +264,6 @@
} else {
echo '&nbsp;&nbsp;' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT, $comment->getVar('com_title')) . '<br />';
}

}
// unset($comment);

Expand Down
9 changes: 4 additions & 5 deletions publisher/admin/import/smartsection.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@
publisherOpenCollapsableBar('newsimport', 'newsimporticon', sprintf(_AM_PUBLISHER_IMPORT_FROM, $importFromModuleName), _AM_PUBLISHER_IMPORT_INFO);

$result = $GLOBALS['xoopsDB']->query('SELECT COUNT(*) FROM ' . $GLOBALS['xoopsDB']->prefix('smartsection_categories'));
list ($totalCat) = $GLOBALS['xoopsDB']->fetchRow($result);
list($totalCat) = $GLOBALS['xoopsDB']->fetchRow($result);

if ($totalCat == 0) {
echo "<span style=\"color: #567; margin: 3px 0 12px 0; font-size: small; display: block; \">" . _AM_PUBLISHER_IMPORT_NO_CATEGORY . '</span>';
} else {
include_once $GLOBALS['xoops']->path('class/xoopstree.php');

$result = $GLOBALS['xoopsDB']->query('SELECT COUNT(*) FROM ' . $GLOBALS['xoopsDB']->prefix('smartsection_items'));
list ($totalArticles) = $GLOBALS['xoopsDB']->fetchRow($result);
list($totalArticles) = $GLOBALS['xoopsDB']->fetchRow($result);

if ($totalArticles == 0) {
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>';
Expand All @@ -60,7 +60,7 @@
$result = $GLOBALS['xoopsDB']->query($sql);
$cat_cbox_options = array();

while ((list ($cid, $pid, $cat_title, $art_count) = $GLOBALS['xoopsDB']->fetchRow($result)) !== false) {
while ((list($cid, $pid, $cat_title, $art_count) = $GLOBALS['xoopsDB']->fetchRow($result)) !== false) {
$cat_title = $myts->displayTarea($cat_title);
$cat_cbox_options[$cid] = "$cat_title ($art_count)";
}
Expand Down Expand Up @@ -241,9 +241,8 @@
} else {
echo '&nbsp;&nbsp;' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT, $comment->getVar('com_title')) . '<br />';
}

}
// unset($comment);
// unset($comment);

echo '<br/><br/>Done.<br/>';
echo sprintf(_AM_PUBLISHER_IMPORTED_CATEGORIES, $cnt_imported_cat) . '<br/>';
Expand Down
9 changes: 4 additions & 5 deletions publisher/admin/import/wfsection.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@
publisherOpenCollapsableBar('wfsectionimport', 'wfsectionimporticon', sprintf(_AM_PUBLISHER_IMPORT_FROM, $importFromModuleName), _AM_PUBLISHER_IMPORT_INFO);

$result = $GLOBALS['xoopsDB']->query('SELECT COUNT(*) FROM ' . $GLOBALS['xoopsDB']->prefix('wfs_category'));
list ($totalCat) = $GLOBALS['xoopsDB']->fetchRow($result);
list($totalCat) = $GLOBALS['xoopsDB']->fetchRow($result);

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');

$result = $GLOBALS['xoopsDB']->query('SELECT COUNT(*) FROM ' . $GLOBALS['xoopsDB']->prefix('wfs_article'));
list ($totalArticles) = $GLOBALS['xoopsDB']->fetchRow($result);
list($totalArticles) = $GLOBALS['xoopsDB']->fetchRow($result);

if ($totalArticles == 0) {
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>';
Expand All @@ -59,7 +59,7 @@
$result = $GLOBALS['xoopsDB']->query($sql);
$cat_cbox_values = array();
$cat_cbox_options = array();
while ((list ($cid, $pid, $cat_title, $art_count) = $GLOBALS['xoopsDB']->fetchRow($result)) !== false) {
while ((list($cid, $pid, $cat_title, $art_count) = $GLOBALS['xoopsDB']->fetchRow($result)) !== false) {
$cat_title = $myts->displayTarea($cat_title);
$cat_cbox_options[$cid] = "$cat_title ($art_count)";
}
Expand Down Expand Up @@ -258,9 +258,8 @@
} else {
echo '&nbsp;&nbsp;' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT, $comment->getVar('com_title')) . '<br />';
}

}
// unset($comment);
// unset($comment);

echo '<br/><br/>Done.<br/>';
echo sprintf(_AM_PUBLISHER_IMPORTED_CATEGORIES, $cnt_imported_cat) . '<br/>';
Expand Down
9 changes: 4 additions & 5 deletions publisher/admin/import/xfsection.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@
publisherOpenCollapsableBar('xfsectionimport', 'xfsectionimporticon', sprintf(_AM_PUBLISHER_IMPORT_FROM, $importFromModuleName), _AM_PUBLISHER_IMPORT_INFO);

$result = $GLOBALS['xoopsDB']->query('SELECT COUNT(*) FROM ' . $GLOBALS['xoopsDB']->prefix('xfs_category'));
list ($totalCat) = $GLOBALS['xoopsDB']->fetchRow($result);
list($totalCat) = $GLOBALS['xoopsDB']->fetchRow($result);

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');

$result = $GLOBALS['xoopsDB']->query('SELECT COUNT(*) FROM ' . $GLOBALS['xoopsDB']->prefix('xfs_article'));
list ($totalArticles) = $GLOBALS['xoopsDB']->fetchRow($result);
list($totalArticles) = $GLOBALS['xoopsDB']->fetchRow($result);

if ($totalArticles == 0) {
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>';
Expand All @@ -59,7 +59,7 @@
$result = $GLOBALS['xoopsDB']->query($sql);
$cat_cbox_values = array();
$cat_cbox_options = array();
while ((list ($cid, $pid, $cat_title, $art_count) = $GLOBALS['xoopsDB']->fetchRow($result)) !== false) {
while ((list($cid, $pid, $cat_title, $art_count) = $GLOBALS['xoopsDB']->fetchRow($result)) !== false) {
$cat_title = $myts->displayTarea($cat_title);
$cat_cbox_options[$cid] = "$cat_title ($art_count)";
}
Expand Down Expand Up @@ -256,9 +256,8 @@
} else {
echo '&nbsp;&nbsp;' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT, $comment->getVar('com_title')) . '<br />';
}

}
// unset($comment);
// unset($comment);

echo '<br/><br/>Done.<br/>';
echo sprintf(_AM_PUBLISHER_IMPORTED_CATEGORIES, $cnt_imported_cat) . '<br/>';
Expand Down
Loading

0 comments on commit 4e5a369

Please sign in to comment.