@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | */ |
59 | 59 | public function configs() |
60 | 60 | { |
61 | - $config[]=array( |
|
61 | + $config[] = array( |
|
62 | 62 | 'name' => 'debugbar_enable', |
63 | 63 | 'title' => '_MI_DEBUGBAR_UCONF_ENABLE_BAR', |
64 | 64 | 'description' => '', |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | 'category' => 'cat_options' |
70 | 70 | ); |
71 | 71 | |
72 | - $config[]=array( |
|
72 | + $config[] = array( |
|
73 | 73 | 'name' => 'debug_smarty_enable', |
74 | 74 | 'title' => '_MI_DEBUGBAR_UCONF_ENABLE_SMARTY', |
75 | 75 | 'description' => '', |
@@ -23,4 +23,4 @@ |
||
23 | 23 | $doNotStartPrint = true; |
24 | 24 | $noTitle = true; |
25 | 25 | $smartPopup = true; |
26 | -include_once __DIR__ . '/print.php'; |
|
26 | +include_once __DIR__.'/print.php'; |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | * @version $Id$ |
21 | 21 | */ |
22 | 22 | |
23 | -include_once __DIR__ . '/header.php'; |
|
23 | +include_once __DIR__.'/header.php'; |
|
24 | 24 | |
25 | 25 | $xoops = Xoops::getInstance(); |
26 | 26 | |
@@ -37,11 +37,11 @@ discard block |
||
37 | 37 | if (!$publisher->getConfig('perm_rating') |
38 | 38 | || !$gperm_handler->checkRight('global', _PUBLISHER_RATE, $groups, $module_id) |
39 | 39 | ) { |
40 | - $xoops->redirect(PUBLISHER_URL . '/item.php?itemid=' . $itemid, 2, XoopsLocale::E_NO_ACCESS_PERMISSION); |
|
40 | + $xoops->redirect(PUBLISHER_URL.'/item.php?itemid='.$itemid, 2, XoopsLocale::E_NO_ACCESS_PERMISSION); |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | if ($rating > 5 || $rating < 1) { |
44 | - $xoops->redirect(PUBLISHER_URL . '/item.php?itemid=' . $itemid, 2, _MD_PUBLISHER_VOTE_BAD); |
|
44 | + $xoops->redirect(PUBLISHER_URL.'/item.php?itemid='.$itemid, 2, _MD_PUBLISHER_VOTE_BAD); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | $criteria = new Criteria('itemid', $itemid); |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | } |
63 | 63 | |
64 | 64 | if ($voted) { |
65 | - $xoops->redirect(PUBLISHER_URL . '/item.php?itemid=' . $itemid, 2, _MD_PUBLISHER_VOTE_ALREADY); |
|
65 | + $xoops->redirect(PUBLISHER_URL.'/item.php?itemid='.$itemid, 2, _MD_PUBLISHER_VOTE_ALREADY); |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | $newRatingObj = $publisher->getRatingHandler()->create(); |
@@ -79,4 +79,4 @@ discard block |
||
79 | 79 | $publisher->getItemHandler()->updateAll('rating', number_format($current_rating / $count, 4), $criteria, true); |
80 | 80 | $publisher->getItemHandler()->updateAll('votes', $count, $criteria, true); |
81 | 81 | |
82 | -$xoops->redirect(PUBLISHER_URL . '/item.php?itemid=' . $itemid, 2, _MD_PUBLISHER_VOTE_THANKS); |
|
82 | +$xoops->redirect(PUBLISHER_URL.'/item.php?itemid='.$itemid, 2, _MD_PUBLISHER_VOTE_THANKS); |
@@ -20,7 +20,7 @@ |
||
20 | 20 | * @version $Id$ |
21 | 21 | */ |
22 | 22 | |
23 | -include __DIR__ . '/admin_header.php'; |
|
23 | +include __DIR__.'/admin_header.php'; |
|
24 | 24 | $xoops = Xoops::getInstance(); |
25 | 25 | $xoops->header(); |
26 | 26 |
@@ -20,10 +20,10 @@ discard block |
||
20 | 20 | * @version $Id$ |
21 | 21 | */ |
22 | 22 | |
23 | -include_once dirname(__DIR__) . '/admin_header.php'; |
|
23 | +include_once dirname(__DIR__).'/admin_header.php'; |
|
24 | 24 | $myts = \Xoops\Core\Text\Sanitizer::getInstance(); |
25 | 25 | |
26 | -$importFromModuleName = "Smartsection " . @$_POST['smartsection_version']; |
|
26 | +$importFromModuleName = "Smartsection ".@$_POST['smartsection_version']; |
|
27 | 27 | |
28 | 28 | $scriptname = "smartsection.php"; |
29 | 29 | |
@@ -39,26 +39,26 @@ discard block |
||
39 | 39 | //publisher_adminMenu(-1, _AM_PUBLISHER_IMPORT); |
40 | 40 | PublisherUtils::openCollapsableBar('newsimport', 'newsimporticon', sprintf(_AM_PUBLISHER_IMPORT_FROM, $importFromModuleName), _AM_PUBLISHER_IMPORT_INFO); |
41 | 41 | |
42 | - $result = $xoopsDB->query("SELECT COUNT(*) FROM " . $xoopsDB->prefix("smartsection_categories")); |
|
42 | + $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("smartsection_categories")); |
|
43 | 43 | list ($totalCat) = $xoopsDB->fetchRow($result); |
44 | 44 | |
45 | 45 | if ($totalCat == 0) { |
46 | - echo "<span style=\"color: #567; margin: 3px 0 12px 0; font-size: small; display: block; \">" . _AM_PUBLISHER_IMPORT_NO_CATEGORY . "</span>"; |
|
46 | + echo "<span style=\"color: #567; margin: 3px 0 12px 0; font-size: small; display: block; \">"._AM_PUBLISHER_IMPORT_NO_CATEGORY."</span>"; |
|
47 | 47 | } else { |
48 | - include_once \XoopsBaseConfig::get('root-path') . '/class/xoopstree.php'; |
|
48 | + include_once \XoopsBaseConfig::get('root-path').'/class/xoopstree.php'; |
|
49 | 49 | |
50 | - $result = $xoopsDB->query("SELECT COUNT(*) FROM " . $xoopsDB->prefix('smartsection_items')); |
|
50 | + $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix('smartsection_items')); |
|
51 | 51 | list ($totalArticles) = $xoopsDB->fetchRow($result); |
52 | 52 | |
53 | 53 | if ($totalArticles == 0) { |
54 | - 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>"; |
|
54 | + 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>"; |
|
55 | 55 | } else { |
56 | - 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>"; |
|
56 | + 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>"; |
|
57 | 57 | |
58 | - $form = new Xoops\Form\ThemeForm(_AM_PUBLISHER_IMPORT_SETTINGS, 'import_form', PUBLISHER_ADMIN_URL . "/import/{$scriptname}"); |
|
58 | + $form = new Xoops\Form\ThemeForm(_AM_PUBLISHER_IMPORT_SETTINGS, 'import_form', PUBLISHER_ADMIN_URL."/import/{$scriptname}"); |
|
59 | 59 | |
60 | 60 | // Categories to be imported |
61 | - $sql = "SELECT cat.categoryid, cat.parentid, cat.name, COUNT(art.itemid) FROM " . $xoopsDB->prefix('smartsection_categories') . " AS cat INNER JOIN " . $xoopsDB->prefix('smartsection_items') . " AS art ON cat.categoryid=art.categoryid GROUP BY art.categoryid"; |
|
61 | + $sql = "SELECT cat.categoryid, cat.parentid, cat.name, COUNT(art.itemid) FROM ".$xoopsDB->prefix('smartsection_categories')." AS cat INNER JOIN ".$xoopsDB->prefix('smartsection_items')." AS art ON cat.categoryid=art.categoryid GROUP BY art.categoryid"; |
|
62 | 62 | |
63 | 63 | $result = $xoopsDB->query($sql); |
64 | 64 | $cat_cbox_options = array(); |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | |
112 | 112 | $parentId = $_POST['parent_category']; |
113 | 113 | |
114 | - $sql = "SELECT * FROM " . $xoopsDB->prefix('smartsection_categories'); |
|
114 | + $sql = "SELECT * FROM ".$xoopsDB->prefix('smartsection_categories'); |
|
115 | 115 | |
116 | 116 | $resultCat = $xoopsDB->query($sql); |
117 | 117 | |
@@ -131,20 +131,20 @@ discard block |
||
131 | 131 | |
132 | 132 | // Copy category image |
133 | 133 | if (($arrCat['image'] !== 'blank.gif') && ($arrCat['image'] != '')) { |
134 | - copy(\XoopsBaseConfig::get('root-path') . "/uploads/smartsection/images/category/" . $arrCat['image'], \XoopsBaseConfig::get('root-path') . "/uploads/publisher/images/category/" . $arrCat['image']); |
|
134 | + copy(\XoopsBaseConfig::get('root-path')."/uploads/smartsection/images/category/".$arrCat['image'], \XoopsBaseConfig::get('root-path')."/uploads/publisher/images/category/".$arrCat['image']); |
|
135 | 135 | } |
136 | 136 | |
137 | 137 | if (!$publisher->getCategoryHandler()->insert($categoryObj)) { |
138 | - echo sprintf(_AM_PUBLISHER_IMPORT_CATEGORY_ERROR, $arrCat['name']) . "<br/>"; |
|
138 | + echo sprintf(_AM_PUBLISHER_IMPORT_CATEGORY_ERROR, $arrCat['name'])."<br/>"; |
|
139 | 139 | continue; |
140 | 140 | } |
141 | 141 | |
142 | 142 | $newCat['newid'] = $categoryObj->getVar('categoryid'); |
143 | 143 | ++$cnt_imported_cat; |
144 | 144 | |
145 | - echo sprintf(_AM_PUBLISHER_IMPORT_CATEGORY_SUCCESS, $categoryObj->getVar('name')) . "<br\>"; |
|
145 | + echo sprintf(_AM_PUBLISHER_IMPORT_CATEGORY_SUCCESS, $categoryObj->getVar('name'))."<br\>"; |
|
146 | 146 | |
147 | - $sql = "SELECT * FROM " . $xoopsDB->prefix('smartsection_items') . " WHERE categoryid=" . $arrCat['categoryid']; |
|
147 | + $sql = "SELECT * FROM ".$xoopsDB->prefix('smartsection_items')." WHERE categoryid=".$arrCat['categoryid']; |
|
148 | 148 | $resultArticles = $xoopsDB->query($sql); |
149 | 149 | |
150 | 150 | while (false !== ($arrArticle = $xoopsDB->fetchArray($resultArticles))) { |
@@ -172,31 +172,31 @@ discard block |
||
172 | 172 | */ |
173 | 173 | |
174 | 174 | if (!$itemObj->store()) { |
175 | - echo sprintf(" " . _AM_PUBLISHER_IMPORT_ARTICLE_ERROR, $arrArticle['title']) . "<br/>"; |
|
175 | + echo sprintf(" "._AM_PUBLISHER_IMPORT_ARTICLE_ERROR, $arrArticle['title'])."<br/>"; |
|
176 | 176 | continue; |
177 | 177 | } else { |
178 | 178 | |
179 | 179 | // Linkes files |
180 | - $sql = "SELECT * FROM " . $xoopsDB->prefix("smartsection_files") . " WHERE itemid=" . $arrArticle['itemid']; |
|
180 | + $sql = "SELECT * FROM ".$xoopsDB->prefix("smartsection_files")." WHERE itemid=".$arrArticle['itemid']; |
|
181 | 181 | $resultFiles = $xoopsDB->query($sql); |
182 | 182 | $allowed_mimetypes = null; |
183 | 183 | while (false !== ($arrFile = $xoopsDB->fetchArray($resultFiles))) { |
184 | - $filename = \XoopsBaseConfig::get('root-path') . "/uploads/smartsection/" . $arrFile['filename']; |
|
184 | + $filename = \XoopsBaseConfig::get('root-path')."/uploads/smartsection/".$arrFile['filename']; |
|
185 | 185 | if (XoopsLoad::fileExists($filename)) { |
186 | - if (copy($filename, \XoopsBaseConfig::get('root-path') . "/uploads/publisher/" . $arrFile['filename'])) { |
|
186 | + if (copy($filename, \XoopsBaseConfig::get('root-path')."/uploads/publisher/".$arrFile['filename'])) { |
|
187 | 187 | $fileObj = $publisher->getFileHandler()->create(); |
188 | 188 | $fileObj->setVars($arrFile); |
189 | 189 | $fileObj->setVar('fileid', 0); |
190 | 190 | |
191 | 191 | if ($fileObj->store($allowed_mimetypes, true, false)) { |
192 | - echo " " . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE_FILE, $arrFile['filename']) . "<br />"; |
|
192 | + echo " ".sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE_FILE, $arrFile['filename'])."<br />"; |
|
193 | 193 | } |
194 | 194 | } |
195 | 195 | } |
196 | 196 | } |
197 | 197 | |
198 | 198 | $newArticleArray[$arrArticle['itemid']] = $itemObj->getVar('itemid'); |
199 | - echo " " . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE, $itemObj->title()) . "<br />"; |
|
199 | + echo " ".sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE, $itemObj->title())."<br />"; |
|
200 | 200 | ++$cnt_imported_articles; |
201 | 201 | } |
202 | 202 | } |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | } |
229 | 229 | |
230 | 230 | // Looping through the comments to link them to the new articles and module |
231 | - echo _AM_PUBLISHER_IMPORT_COMMENTS . "<br />"; |
|
231 | + echo _AM_PUBLISHER_IMPORT_COMMENTS."<br />"; |
|
232 | 232 | |
233 | 233 | $publisher_module_id = $publisher->getModule()->mid(); |
234 | 234 | |
@@ -241,17 +241,17 @@ discard block |
||
241 | 241 | $comment->setVar('com_modid', $publisher_module_id); |
242 | 242 | $comment->setNew(); |
243 | 243 | if (!$comment_handler->insert($comment)) { |
244 | - echo " " . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT_ERROR, $comment->getVar('com_title')) . "<br />"; |
|
244 | + echo " ".sprintf(_AM_PUBLISHER_IMPORTED_COMMENT_ERROR, $comment->getVar('com_title'))."<br />"; |
|
245 | 245 | } else { |
246 | - echo " " . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT, $comment->getVar('com_title')) . "<br />"; |
|
246 | + echo " ".sprintf(_AM_PUBLISHER_IMPORTED_COMMENT, $comment->getVar('com_title'))."<br />"; |
|
247 | 247 | } |
248 | 248 | |
249 | 249 | } |
250 | 250 | |
251 | 251 | echo "<br/><br/>Done.<br/>"; |
252 | - echo sprintf(_AM_PUBLISHER_IMPORTED_CATEGORIES, $cnt_imported_cat) . "<br/>"; |
|
253 | - echo sprintf(_AM_PUBLISHER_IMPORTED_ARTICLES, $cnt_imported_articles) . "<br/>"; |
|
254 | - echo "<br/><a href='" . PUBLISHER_URL . "/'>" . _AM_PUBLISHER_IMPORT_GOTOMODULE . "</a><br/>"; |
|
252 | + echo sprintf(_AM_PUBLISHER_IMPORTED_CATEGORIES, $cnt_imported_cat)."<br/>"; |
|
253 | + echo sprintf(_AM_PUBLISHER_IMPORTED_ARTICLES, $cnt_imported_articles)."<br/>"; |
|
254 | + echo "<br/><a href='".PUBLISHER_URL."/'>"._AM_PUBLISHER_IMPORT_GOTOMODULE."</a><br/>"; |
|
255 | 255 | |
256 | 256 | PublisherUtils::closeCollapsableBar('newsimportgo', 'newsimportgoicon'); |
257 | 257 | $xoops->footer(); |
@@ -20,10 +20,10 @@ discard block |
||
20 | 20 | * @version $Id$ |
21 | 21 | */ |
22 | 22 | |
23 | -include_once dirname(__DIR__) . '/admin_header.php'; |
|
23 | +include_once dirname(__DIR__).'/admin_header.php'; |
|
24 | 24 | $myts = \Xoops\Core\Text\Sanitizer::getInstance(); |
25 | 25 | |
26 | -$importFromModuleName = "WF-Section " . @$_POST['wfs_version']; |
|
26 | +$importFromModuleName = "WF-Section ".@$_POST['wfs_version']; |
|
27 | 27 | |
28 | 28 | $scriptname = "wfsection.php"; |
29 | 29 | |
@@ -39,26 +39,26 @@ discard block |
||
39 | 39 | //publisher_adminMenu(-1, _AM_PUBLISHER_IMPORT); |
40 | 40 | PublisherUtils::openCollapsableBar('wfsectionimport', 'wfsectionimporticon', sprintf(_AM_PUBLISHER_IMPORT_FROM, $importFromModuleName), _AM_PUBLISHER_IMPORT_INFO); |
41 | 41 | |
42 | - $result = $xoopsDB->query("SELECT COUNT(*) FROM " . $xoopsDB->prefix("wfs_category")); |
|
42 | + $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("wfs_category")); |
|
43 | 43 | list ($totalCat) = $xoopsDB->fetchRow($result); |
44 | 44 | |
45 | 45 | if ($totalCat == 0) { |
46 | - echo "<span style=\"color: #567; margin: 3px 0 12px 0; font-size: small; display: block; \">" . _AM_PUBLISHER_IMPORT_NOCATSELECTED . "</span>"; |
|
46 | + echo "<span style=\"color: #567; margin: 3px 0 12px 0; font-size: small; display: block; \">"._AM_PUBLISHER_IMPORT_NOCATSELECTED."</span>"; |
|
47 | 47 | } else { |
48 | - include_once \XoopsBaseConfig::get('root-path') . "/class/xoopstree.php"; |
|
48 | + include_once \XoopsBaseConfig::get('root-path')."/class/xoopstree.php"; |
|
49 | 49 | |
50 | - $result = $xoopsDB->query("SELECT COUNT(*) FROM " . $xoopsDB->prefix("wfs_article")); |
|
50 | + $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("wfs_article")); |
|
51 | 51 | list ($totalArticles) = $xoopsDB->fetchRow($result); |
52 | 52 | |
53 | 53 | if ($totalArticles == 0) { |
54 | - 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>"; |
|
54 | + 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>"; |
|
55 | 55 | } else { |
56 | - 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>"; |
|
56 | + 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>"; |
|
57 | 57 | |
58 | - $form = new Xoops\Form\ThemeForm(_AM_PUBLISHER_IMPORT_SETTINGS, 'import_form', PUBLISHER_ADMIN_URL . "/import/$scriptname"); |
|
58 | + $form = new Xoops\Form\ThemeForm(_AM_PUBLISHER_IMPORT_SETTINGS, 'import_form', PUBLISHER_ADMIN_URL."/import/$scriptname"); |
|
59 | 59 | |
60 | 60 | // Categories to be imported |
61 | - $sql = "SELECT cat.id, cat.pid, cat.title, COUNT(art.articleid) FROM " . $xoopsDB->prefix("wfs_category") . " AS cat INNER JOIN " . $xoopsDB->prefix("wfs_article") . " AS art ON cat.id=art.categoryid GROUP BY art.categoryid"; |
|
61 | + $sql = "SELECT cat.id, cat.pid, cat.title, COUNT(art.articleid) FROM ".$xoopsDB->prefix("wfs_category")." AS cat INNER JOIN ".$xoopsDB->prefix("wfs_article")." AS art ON cat.id=art.categoryid GROUP BY art.categoryid"; |
|
62 | 62 | $result = $xoopsDB->query($sql); |
63 | 63 | $cat_cbox_values = array(); |
64 | 64 | $cat_cbox_options = array(); |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | $orders = 'orders'; |
110 | 110 | } |
111 | 111 | //$sql = "SELECT * FROM ".$xoopsDB->prefix("wfs_category")." ORDER by orders"; |
112 | - $sql = "SELECT * FROM " . $xoopsDB->prefix("wfs_category") . " ORDER by $orders"; |
|
112 | + $sql = "SELECT * FROM ".$xoopsDB->prefix("wfs_category")." ORDER by $orders"; |
|
113 | 113 | //end added to support 2.0.7 |
114 | 114 | $resultCat = $xoopsDB->query($sql); |
115 | 115 | |
@@ -134,13 +134,13 @@ discard block |
||
134 | 134 | |
135 | 135 | // Category image |
136 | 136 | if (($arrCat['imgurl'] !== 'blank.gif') && ($arrCat['imgurl'])) { |
137 | - if (copy(XOOPS_ROOT_PATH . "/modules/wfsection/images/category/" . $arrCat['imgurl'], PUBLISHER_UPLOADS_PATH . "/images/category/" . $arrCat['imgurl'])) { |
|
137 | + if (copy(XOOPS_ROOT_PATH."/modules/wfsection/images/category/".$arrCat['imgurl'], PUBLISHER_UPLOADS_PATH."/images/category/".$arrCat['imgurl'])) { |
|
138 | 138 | $categoryObj->setVar('image', $arrCat['imgurl']); |
139 | 139 | } |
140 | 140 | } |
141 | 141 | |
142 | 142 | if (!$categoryObj->store(false)) { |
143 | - echo sprintf(_AM_PUBLISHER_IMPORT_CATEGORY_ERROR, $arrCat['title']) . "<br/>"; |
|
143 | + echo sprintf(_AM_PUBLISHER_IMPORT_CATEGORY_ERROR, $arrCat['title'])."<br/>"; |
|
144 | 144 | continue; |
145 | 145 | } |
146 | 146 | |
@@ -151,9 +151,9 @@ discard block |
||
151 | 151 | |
152 | 152 | ++$cnt_imported_cat; |
153 | 153 | |
154 | - echo sprintf(_AM_PUBLISHER_IMPORT_CATEGORY_SUCCESS, $categoryObj->getVar('name')) . "<br\>"; |
|
154 | + echo sprintf(_AM_PUBLISHER_IMPORT_CATEGORY_SUCCESS, $categoryObj->getVar('name'))."<br\>"; |
|
155 | 155 | |
156 | - $sql = "SELECT * FROM " . $xoopsDB->prefix("wfs_article") . " WHERE categoryid=" . $arrCat['id'] . " ORDER BY weight"; |
|
156 | + $sql = "SELECT * FROM ".$xoopsDB->prefix("wfs_article")." WHERE categoryid=".$arrCat['id']." ORDER BY weight"; |
|
157 | 157 | $resultArticles = $xoopsDB->query($sql); |
158 | 158 | while (false !== ($arrArticle = $xoopsDB->fetchArray($resultArticles))) { |
159 | 159 | // insert article |
@@ -175,28 +175,28 @@ discard block |
||
175 | 175 | |
176 | 176 | // HTML Wrap |
177 | 177 | if ($arrArticle['htmlpage']) { |
178 | - $pagewrap_filename = \XoopsBaseConfig::get('root-path') . "/modules/wfsection/html/" . $arrArticle['htmlpage']; |
|
178 | + $pagewrap_filename = \XoopsBaseConfig::get('root-path')."/modules/wfsection/html/".$arrArticle['htmlpage']; |
|
179 | 179 | if (XoopsLoad::fileExists($pagewrap_filename)) { |
180 | - if (copy($pagewrap_filename, PUBLISHER_UPLOADS_PATH . "/content/" . $arrArticle['htmlpage'])) { |
|
181 | - $itemObj->setVar('body', "[pagewrap=" . $arrArticle['htmlpage'] . "]"); |
|
182 | - echo sprintf(" " . _AM_PUBLISHER_IMPORT_ARTICLE_WRAP, $arrArticle['htmlpage']) . "<br/>"; |
|
180 | + if (copy($pagewrap_filename, PUBLISHER_UPLOADS_PATH."/content/".$arrArticle['htmlpage'])) { |
|
181 | + $itemObj->setVar('body', "[pagewrap=".$arrArticle['htmlpage']."]"); |
|
182 | + echo sprintf(" "._AM_PUBLISHER_IMPORT_ARTICLE_WRAP, $arrArticle['htmlpage'])."<br/>"; |
|
183 | 183 | } |
184 | 184 | } |
185 | 185 | } |
186 | 186 | |
187 | 187 | if (!$itemObj->store()) { |
188 | - echo sprintf(" " . _AM_PUBLISHER_IMPORT_ARTICLE_ERROR, $arrArticle['title']) . "<br/>"; |
|
188 | + echo sprintf(" "._AM_PUBLISHER_IMPORT_ARTICLE_ERROR, $arrArticle['title'])."<br/>"; |
|
189 | 189 | continue; |
190 | 190 | } else { |
191 | 191 | // Linkes files |
192 | 192 | |
193 | - $sql = "SELECT * FROM " . $xoopsDB->prefix("wfs_files") . " WHERE articleid=" . $arrArticle['articleid']; |
|
193 | + $sql = "SELECT * FROM ".$xoopsDB->prefix("wfs_files")." WHERE articleid=".$arrArticle['articleid']; |
|
194 | 194 | $resultFiles = $xoopsDB->query($sql); |
195 | 195 | $allowed_mimetypes = ''; |
196 | 196 | while (false !== ($arrFile = $xoopsDB->fetchArray($resultFiles))) { |
197 | - $filename = \XoopsBaseConfig::get('root-path') . "/modules/wfsection/cache/uploaded/" . $arrFile['filerealname']; |
|
197 | + $filename = \XoopsBaseConfig::get('root-path')."/modules/wfsection/cache/uploaded/".$arrFile['filerealname']; |
|
198 | 198 | if (XoopsLoad::fileExists($filename)) { |
199 | - if (copy($filename, PUBLISHER_UPLOADS_PATH . "/" . $arrFile['filerealname'])) { |
|
199 | + if (copy($filename, PUBLISHER_UPLOADS_PATH."/".$arrFile['filerealname'])) { |
|
200 | 200 | $fileObj = $publisher->getFileHandler()->create(); |
201 | 201 | $fileObj->setVar('name', $arrFile['fileshowname']); |
202 | 202 | $fileObj->setVar('description', $arrFile['filedescript']); |
@@ -209,14 +209,14 @@ discard block |
||
209 | 209 | $fileObj->setVar('filename', $arrFile['filerealname']); |
210 | 210 | |
211 | 211 | if ($fileObj->store($allowed_mimetypes, true, false)) { |
212 | - echo " " . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE_FILE, $arrFile['filerealname']) . "<br />"; |
|
212 | + echo " ".sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE_FILE, $arrFile['filerealname'])."<br />"; |
|
213 | 213 | } |
214 | 214 | } |
215 | 215 | } |
216 | 216 | } |
217 | 217 | |
218 | 218 | $newArticleArray[$arrArticle['articleid']] = $itemObj->getVar('itemid'); |
219 | - echo " " . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE, $itemObj->title()) . "<br />"; |
|
219 | + echo " ".sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE, $itemObj->title())."<br />"; |
|
220 | 220 | ++$cnt_imported_articles; |
221 | 221 | } |
222 | 222 | } |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | } |
240 | 240 | |
241 | 241 | // Looping through the comments to link them to the new articles and module |
242 | - echo _AM_PUBLISHER_IMPORT_COMMENTS . "<br />"; |
|
242 | + echo _AM_PUBLISHER_IMPORT_COMMENTS."<br />"; |
|
243 | 243 | |
244 | 244 | $module_handler = xoops_getHandler('module'); |
245 | 245 | $moduleObj = $module_handler->getByDirname('wfsection'); |
@@ -256,17 +256,17 @@ discard block |
||
256 | 256 | $comment->setVar('com_modid', $publisher_module_id); |
257 | 257 | $comment->setNew(); |
258 | 258 | if (!$comment_handler->insert($comment)) { |
259 | - echo " " . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT_ERROR, $comment->getVar('com_title')) . "<br />"; |
|
259 | + echo " ".sprintf(_AM_PUBLISHER_IMPORTED_COMMENT_ERROR, $comment->getVar('com_title'))."<br />"; |
|
260 | 260 | } else { |
261 | - echo " " . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT, $comment->getVar('com_title')) . "<br />"; |
|
261 | + echo " ".sprintf(_AM_PUBLISHER_IMPORTED_COMMENT, $comment->getVar('com_title'))."<br />"; |
|
262 | 262 | } |
263 | 263 | |
264 | 264 | } |
265 | 265 | |
266 | 266 | echo "<br/><br/>Done.<br/>"; |
267 | - echo sprintf(_AM_PUBLISHER_IMPORTED_CATEGORIES, $cnt_imported_cat) . "<br/>"; |
|
268 | - echo sprintf(_AM_PUBLISHER_IMPORTED_ARTICLES, $cnt_imported_articles) . "<br/>"; |
|
269 | - echo "<br/><a href='" . PUBLISHER_URL . "/'>" . _AM_PUBLISHER_IMPORT_GOTOMODULE . "</a><br/>"; |
|
267 | + echo sprintf(_AM_PUBLISHER_IMPORTED_CATEGORIES, $cnt_imported_cat)."<br/>"; |
|
268 | + echo sprintf(_AM_PUBLISHER_IMPORTED_ARTICLES, $cnt_imported_articles)."<br/>"; |
|
269 | + echo "<br/><a href='".PUBLISHER_URL."/'>"._AM_PUBLISHER_IMPORT_GOTOMODULE."</a><br/>"; |
|
270 | 270 | |
271 | 271 | PublisherUtils::closeCollapsableBar('wfsectionimportgo', 'wfsectionimportgoicon'); |
272 | 272 | $xoops->footer(); |
@@ -20,10 +20,10 @@ discard block |
||
20 | 20 | * @version $Id$ |
21 | 21 | */ |
22 | 22 | |
23 | -include_once dirname(__DIR__) . '/admin_header.php'; |
|
23 | +include_once dirname(__DIR__).'/admin_header.php'; |
|
24 | 24 | $myts = \Xoops\Core\Text\Sanitizer::getInstance(); |
25 | 25 | |
26 | -$importFromModuleName = "News " . @$_POST['news_version']; |
|
26 | +$importFromModuleName = "News ".@$_POST['news_version']; |
|
27 | 27 | |
28 | 28 | $scriptname = "news.php"; |
29 | 29 | |
@@ -39,26 +39,26 @@ discard block |
||
39 | 39 | //publisher_adminMenu(-1, _AM_PUBLISHER_IMPORT); |
40 | 40 | PublisherUtils::openCollapsableBar('newsimport', 'newsimporticon', sprintf(_AM_PUBLISHER_IMPORT_FROM, $importFromModuleName), _AM_PUBLISHER_IMPORT_INFO); |
41 | 41 | |
42 | - $result = $xoopsDB->query("SELECT COUNT(*) FROM " . $xoopsDB->prefix("topics")); |
|
42 | + $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("topics")); |
|
43 | 43 | list ($totalCat) = $xoopsDB->fetchRow($result); |
44 | 44 | |
45 | 45 | if ($totalCat == 0) { |
46 | - echo "<span style=\"color: #567; margin: 3px 0 12px 0; font-size: small; display: block; \">" . _AM_PUBLISHER_IMPORT_NO_CATEGORY . "</span>"; |
|
46 | + echo "<span style=\"color: #567; margin: 3px 0 12px 0; font-size: small; display: block; \">"._AM_PUBLISHER_IMPORT_NO_CATEGORY."</span>"; |
|
47 | 47 | } else { |
48 | - include_once \XoopsBaseConfig::get('root-path') . '/class/xoopstree.php'; |
|
48 | + include_once \XoopsBaseConfig::get('root-path').'/class/xoopstree.php'; |
|
49 | 49 | |
50 | - $result = $xoopsDB->query("SELECT COUNT(*) FROM " . $xoopsDB->prefix("stories")); |
|
50 | + $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("stories")); |
|
51 | 51 | list ($totalArticles) = $xoopsDB->fetchRow($result); |
52 | 52 | |
53 | 53 | if ($totalArticles == 0) { |
54 | - 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>"; |
|
54 | + 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>"; |
|
55 | 55 | } else { |
56 | - 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>"; |
|
56 | + 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>"; |
|
57 | 57 | |
58 | - $form = new Xoops\Form\ThemeForm(_AM_PUBLISHER_IMPORT_SETTINGS, 'import_form', PUBLISHER_ADMIN_URL . "/import/$scriptname"); |
|
58 | + $form = new Xoops\Form\ThemeForm(_AM_PUBLISHER_IMPORT_SETTINGS, 'import_form', PUBLISHER_ADMIN_URL."/import/$scriptname"); |
|
59 | 59 | |
60 | 60 | // Categories to be imported |
61 | - $sql = "SELECT cat.topic_id, cat.topic_pid, cat.topic_title, COUNT(art.storyid) FROM " . $xoopsDB->prefix("topics") . " AS cat INNER JOIN " . $xoopsDB->prefix("stories") . " AS art ON cat.topic_id=art.topicid GROUP BY art.topicid"; |
|
61 | + $sql = "SELECT cat.topic_id, cat.topic_pid, cat.topic_title, COUNT(art.storyid) FROM ".$xoopsDB->prefix("topics")." AS cat INNER JOIN ".$xoopsDB->prefix("stories")." AS art ON cat.topic_id=art.topicid GROUP BY art.topicid"; |
|
62 | 62 | |
63 | 63 | $result = $xoopsDB->query($sql); |
64 | 64 | $cat_cbox_options = array(); |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | |
112 | 112 | $parentId = $_POST['parent_category']; |
113 | 113 | |
114 | - $sql = "SELECT * FROM " . $xoopsDB->prefix('topics'); |
|
114 | + $sql = "SELECT * FROM ".$xoopsDB->prefix('topics'); |
|
115 | 115 | |
116 | 116 | $resultCat = $xoopsDB->query($sql); |
117 | 117 | |
@@ -133,22 +133,22 @@ discard block |
||
133 | 133 | |
134 | 134 | // Category image |
135 | 135 | if (($arrCat['topic_imgurl'] !== 'blank.gif') && ($arrCat['topic_imgurl'] != '')) { |
136 | - if (copy(\XoopsBaseConfig::get('root-path') . "/modules/news/images/topics/" . $arrCat['topic_imgurl'], \XoopsBaseConfig::get('root-path') . "/uploads/publisher/images/category/" . $arrCat['topic_imgurl'])) { |
|
136 | + if (copy(\XoopsBaseConfig::get('root-path')."/modules/news/images/topics/".$arrCat['topic_imgurl'], \XoopsBaseConfig::get('root-path')."/uploads/publisher/images/category/".$arrCat['topic_imgurl'])) { |
|
137 | 137 | $categoryObj->setVar('image', $arrCat['topic_imgurl']); |
138 | 138 | } |
139 | 139 | } |
140 | 140 | |
141 | 141 | if (!$publisher->getCategoryHandler()->insert($categoryObj)) { |
142 | - echo sprintf(_AM_PUBLISHER_IMPORT_CATEGORY_ERROR, $arrCat['topic_title']) . "<br/>"; |
|
142 | + echo sprintf(_AM_PUBLISHER_IMPORT_CATEGORY_ERROR, $arrCat['topic_title'])."<br/>"; |
|
143 | 143 | continue; |
144 | 144 | } |
145 | 145 | |
146 | 146 | $newCat['newid'] = $categoryObj->getVar('categoryid'); |
147 | 147 | ++$cnt_imported_cat; |
148 | 148 | |
149 | - echo sprintf(_AM_PUBLISHER_IMPORT_CATEGORY_SUCCESS, $categoryObj->getVar('name')) . "<br\>"; |
|
149 | + echo sprintf(_AM_PUBLISHER_IMPORT_CATEGORY_SUCCESS, $categoryObj->getVar('name'))."<br\>"; |
|
150 | 150 | |
151 | - $sql = "SELECT * FROM " . $xoopsDB->prefix('stories') . " WHERE topicid=" . $arrCat['topic_id']; |
|
151 | + $sql = "SELECT * FROM ".$xoopsDB->prefix('stories')." WHERE topicid=".$arrCat['topic_id']; |
|
152 | 152 | $resultArticles = $xoopsDB->query($sql); |
153 | 153 | while (false !== ($arrArticle = $xoopsDB->fetchArray($resultArticles))) { |
154 | 154 | // insert article |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | */ |
187 | 187 | |
188 | 188 | if (!$itemObj->store()) { |
189 | - echo sprintf(" " . _AM_PUBLISHER_IMPORT_ARTICLE_ERROR, $arrArticle['title']) . "<br/>"; |
|
189 | + echo sprintf(" "._AM_PUBLISHER_IMPORT_ARTICLE_ERROR, $arrArticle['title'])."<br/>"; |
|
190 | 190 | continue; |
191 | 191 | } else { |
192 | 192 | /* |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | } |
219 | 219 | */ |
220 | 220 | $newArticleArray[$arrArticle['storyid']] = $itemObj->getVar('itemid'); |
221 | - echo " " . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE, $itemObj->title()) . "<br />"; |
|
221 | + echo " ".sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE, $itemObj->title())."<br />"; |
|
222 | 222 | ++$cnt_imported_articles; |
223 | 223 | } |
224 | 224 | } |
@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | } |
251 | 251 | |
252 | 252 | // Looping through the comments to link them to the new articles and module |
253 | - echo _AM_PUBLISHER_IMPORT_COMMENTS . "<br />"; |
|
253 | + echo _AM_PUBLISHER_IMPORT_COMMENTS."<br />"; |
|
254 | 254 | |
255 | 255 | $publisher_module_id = $publisher->getModule()->mid(); |
256 | 256 | |
@@ -263,17 +263,17 @@ discard block |
||
263 | 263 | $comment->setVar('com_modid', $publisher_module_id); |
264 | 264 | $comment->setNew(); |
265 | 265 | if (!$comment_handler->insert($comment)) { |
266 | - echo " " . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT_ERROR, $comment->getVar('com_title')) . "<br />"; |
|
266 | + echo " ".sprintf(_AM_PUBLISHER_IMPORTED_COMMENT_ERROR, $comment->getVar('com_title'))."<br />"; |
|
267 | 267 | } else { |
268 | - echo " " . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT, $comment->getVar('com_title')) . "<br />"; |
|
268 | + echo " ".sprintf(_AM_PUBLISHER_IMPORTED_COMMENT, $comment->getVar('com_title'))."<br />"; |
|
269 | 269 | } |
270 | 270 | |
271 | 271 | } |
272 | 272 | |
273 | 273 | echo "<br/><br/>Done.<br/>"; |
274 | - echo sprintf(_AM_PUBLISHER_IMPORTED_CATEGORIES, $cnt_imported_cat) . "<br/>"; |
|
275 | - echo sprintf(_AM_PUBLISHER_IMPORTED_ARTICLES, $cnt_imported_articles) . "<br/>"; |
|
276 | - echo "<br/><a href='" . PUBLISHER_URL . "/'>" . _AM_PUBLISHER_IMPORT_GOTOMODULE . "</a><br/>"; |
|
274 | + echo sprintf(_AM_PUBLISHER_IMPORTED_CATEGORIES, $cnt_imported_cat)."<br/>"; |
|
275 | + echo sprintf(_AM_PUBLISHER_IMPORTED_ARTICLES, $cnt_imported_articles)."<br/>"; |
|
276 | + echo "<br/><a href='".PUBLISHER_URL."/'>"._AM_PUBLISHER_IMPORT_GOTOMODULE."</a><br/>"; |
|
277 | 277 | |
278 | 278 | PublisherUtils::closeCollapsableBar('newsimportgo', 'newsimportgoicon'); |
279 | 279 | $xoops->footer(); |
@@ -20,10 +20,10 @@ discard block |
||
20 | 20 | * @version $Id$ |
21 | 21 | */ |
22 | 22 | |
23 | -include_once dirname(__DIR__) . '/admin_header.php'; |
|
23 | +include_once dirname(__DIR__).'/admin_header.php'; |
|
24 | 24 | $myts = \Xoops\Core\Text\Sanitizer::getInstance(); |
25 | 25 | |
26 | -$importFromModuleName = "XF-Section " . @$_POST['xfs_version']; |
|
26 | +$importFromModuleName = "XF-Section ".@$_POST['xfs_version']; |
|
27 | 27 | |
28 | 28 | $scriptname = "xfsection.php"; |
29 | 29 | |
@@ -39,26 +39,26 @@ discard block |
||
39 | 39 | //publisher_adminMenu(-1, _AM_PUBLISHER_IMPORT); |
40 | 40 | PublisherUtils::openCollapsableBar('xfsectionimport', 'xfsectionimporticon', sprintf(_AM_PUBLISHER_IMPORT_FROM, $importFromModuleName), _AM_PUBLISHER_IMPORT_INFO); |
41 | 41 | |
42 | - $result = $xoopsDB->query("SELECT COUNT(*) FROM " . $xoopsDB->prefix("xfs_category")); |
|
42 | + $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("xfs_category")); |
|
43 | 43 | list ($totalCat) = $xoopsDB->fetchRow($result); |
44 | 44 | |
45 | 45 | if ($totalCat == 0) { |
46 | - echo "<span style=\"color: #567; margin: 3px 0 12px 0; font-size: small; display: block; \">" . _AM_PUBLISHER_IMPORT_NOCATSELECTED . "</span>"; |
|
46 | + echo "<span style=\"color: #567; margin: 3px 0 12px 0; font-size: small; display: block; \">"._AM_PUBLISHER_IMPORT_NOCATSELECTED."</span>"; |
|
47 | 47 | } else { |
48 | - include_once \XoopsBaseConfig::get('root-path') . '/class/xoopstree.php'; |
|
48 | + include_once \XoopsBaseConfig::get('root-path').'/class/xoopstree.php'; |
|
49 | 49 | |
50 | - $result = $xoopsDB->query("SELECT COUNT(*) FROM " . $xoopsDB->prefix("xfs_article")); |
|
50 | + $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("xfs_article")); |
|
51 | 51 | list ($totalArticles) = $xoopsDB->fetchRow($result); |
52 | 52 | |
53 | 53 | if ($totalArticles == 0) { |
54 | - 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>"; |
|
54 | + 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>"; |
|
55 | 55 | } else { |
56 | - 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>"; |
|
56 | + 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>"; |
|
57 | 57 | |
58 | - $form = new Xoops\Form\ThemeForm(_AM_PUBLISHER_IMPORT_SETTINGS, 'import_form', PUBLISHER_ADMIN_URL . "/import/$scriptname"); |
|
58 | + $form = new Xoops\Form\ThemeForm(_AM_PUBLISHER_IMPORT_SETTINGS, 'import_form', PUBLISHER_ADMIN_URL."/import/$scriptname"); |
|
59 | 59 | |
60 | 60 | // Categories to be imported |
61 | - $sql = "SELECT cat.id, cat.pid, cat.title, COUNT(art.articleid) FROM " . $xoopsDB->prefix("xfs_category") . " AS cat INNER JOIN " . $xoopsDB->prefix("xfs_article") . " AS art ON cat.id=art.categoryid GROUP BY art.categoryid"; |
|
61 | + $sql = "SELECT cat.id, cat.pid, cat.title, COUNT(art.articleid) FROM ".$xoopsDB->prefix("xfs_category")." AS cat INNER JOIN ".$xoopsDB->prefix("xfs_article")." AS art ON cat.id=art.categoryid GROUP BY art.categoryid"; |
|
62 | 62 | $result = $xoopsDB->query($sql); |
63 | 63 | $cat_cbox_values = array(); |
64 | 64 | $cat_cbox_options = array(); |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | $parentId = $_POST['parent_category']; |
105 | 105 | |
106 | 106 | |
107 | - $sql = "SELECT * FROM " . $xoopsDB->prefix("xfs_category") . " ORDER by orders"; |
|
107 | + $sql = "SELECT * FROM ".$xoopsDB->prefix("xfs_category")." ORDER by orders"; |
|
108 | 108 | |
109 | 109 | $resultCat = $xoopsDB->query($sql); |
110 | 110 | |
@@ -127,13 +127,13 @@ discard block |
||
127 | 127 | |
128 | 128 | // Category image |
129 | 129 | if (($arrCat['imgurl'] !== 'blank.gif') && ($arrCat['imgurl'])) { |
130 | - if (copy(\XoopsBaseConfig::get('root-path') . "/modules/xfsection/images/category/" . $arrCat['imgurl'], PUBLISHER_UPLOADS_PATH . "/images/category/" . $arrCat['imgurl'])) { |
|
130 | + if (copy(\XoopsBaseConfig::get('root-path')."/modules/xfsection/images/category/".$arrCat['imgurl'], PUBLISHER_UPLOADS_PATH."/images/category/".$arrCat['imgurl'])) { |
|
131 | 131 | $categoryObj->setVar('image', $arrCat['imgurl']); |
132 | 132 | } |
133 | 133 | } |
134 | 134 | |
135 | 135 | if (!$categoryObj->store(false)) { |
136 | - echo sprintf(_AM_PUBLISHER_IMPORT_CATEGORY_ERROR, $arrCat['title']) . "<br/>"; |
|
136 | + echo sprintf(_AM_PUBLISHER_IMPORT_CATEGORY_ERROR, $arrCat['title'])."<br/>"; |
|
137 | 137 | continue; |
138 | 138 | } |
139 | 139 | |
@@ -144,9 +144,9 @@ discard block |
||
144 | 144 | |
145 | 145 | ++$cnt_imported_cat; |
146 | 146 | |
147 | - echo sprintf(_AM_PUBLISHER_IMPORT_CATEGORY_SUCCESS, $categoryObj->getVar('name')) . "<br\>"; |
|
147 | + echo sprintf(_AM_PUBLISHER_IMPORT_CATEGORY_SUCCESS, $categoryObj->getVar('name'))."<br\>"; |
|
148 | 148 | |
149 | - $sql = "SELECT * FROM " . $xoopsDB->prefix("xfs_article") . " WHERE categoryid=" . $arrCat['id'] . " ORDER BY weight"; |
|
149 | + $sql = "SELECT * FROM ".$xoopsDB->prefix("xfs_article")." WHERE categoryid=".$arrCat['id']." ORDER BY weight"; |
|
150 | 150 | $resultArticles = $xoopsDB->query($sql); |
151 | 151 | while (false !== ($arrArticle = $xoopsDB->fetchArray($resultArticles))) { |
152 | 152 | // insert article |
@@ -174,28 +174,28 @@ discard block |
||
174 | 174 | |
175 | 175 | // HTML Wrap |
176 | 176 | if ($arrArticle['htmlpage']) { |
177 | - $pagewrap_filename = \XoopsBaseConfig::get('root-path') . "/modules/xfsection/html/" . $arrArticle['htmlpage']; |
|
177 | + $pagewrap_filename = \XoopsBaseConfig::get('root-path')."/modules/xfsection/html/".$arrArticle['htmlpage']; |
|
178 | 178 | if (XoopsLoad::fileExists($pagewrap_filename)) { |
179 | - if (copy($pagewrap_filename, PUBLISHER_UPLOADS_PATH . "/content/" . $arrArticle['htmlpage'])) { |
|
180 | - $itemObj->setVar('body', "[pagewrap=" . $arrArticle['htmlpage'] . "]"); |
|
181 | - echo sprintf(" " . _AM_PUBLISHER_IMPORT_ARTICLE_WRAP, $arrArticle['htmlpage']) . "<br/>"; |
|
179 | + if (copy($pagewrap_filename, PUBLISHER_UPLOADS_PATH."/content/".$arrArticle['htmlpage'])) { |
|
180 | + $itemObj->setVar('body', "[pagewrap=".$arrArticle['htmlpage']."]"); |
|
181 | + echo sprintf(" "._AM_PUBLISHER_IMPORT_ARTICLE_WRAP, $arrArticle['htmlpage'])."<br/>"; |
|
182 | 182 | } |
183 | 183 | } |
184 | 184 | } |
185 | 185 | |
186 | 186 | if (!$itemObj->store()) { |
187 | - echo sprintf(" " . _AM_PUBLISHER_IMPORT_ARTICLE_ERROR, $arrArticle['title']) . "<br/>"; |
|
187 | + echo sprintf(" "._AM_PUBLISHER_IMPORT_ARTICLE_ERROR, $arrArticle['title'])."<br/>"; |
|
188 | 188 | continue; |
189 | 189 | } else { |
190 | 190 | // Linkes files |
191 | 191 | |
192 | - $sql = "SELECT * FROM " . $xoopsDB->prefix("xfs_files") . " WHERE articleid=" . $arrArticle['articleid']; |
|
192 | + $sql = "SELECT * FROM ".$xoopsDB->prefix("xfs_files")." WHERE articleid=".$arrArticle['articleid']; |
|
193 | 193 | $resultFiles = $xoopsDB->query($sql); |
194 | 194 | $allowed_mimetypes = ''; |
195 | 195 | while (false !== ($arrFile = $xoopsDB->fetchArray($resultFiles))) { |
196 | - $filename = \XoopsBaseConfig::get('root-path') . "/modules/xfsection/cache/uploaded/" . $arrFile['filerealname']; |
|
196 | + $filename = \XoopsBaseConfig::get('root-path')."/modules/xfsection/cache/uploaded/".$arrFile['filerealname']; |
|
197 | 197 | if (XoopsLoad::fileExists($filename)) { |
198 | - if (copy($filename, PUBLISHER_UPLOADS_PATH . "/" . $arrFile['filerealname'])) { |
|
198 | + if (copy($filename, PUBLISHER_UPLOADS_PATH."/".$arrFile['filerealname'])) { |
|
199 | 199 | $fileObj = $publisher->getFileHandler()->create(); |
200 | 200 | $fileObj->setVar('name', $arrFile['fileshowname']); |
201 | 201 | $fileObj->setVar('description', $arrFile['filedescript']); |
@@ -208,14 +208,14 @@ discard block |
||
208 | 208 | $fileObj->setVar('filename', $arrFile['filerealname']); |
209 | 209 | |
210 | 210 | if ($fileObj->store($allowed_mimetypes, true, false)) { |
211 | - echo " " . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE_FILE, $arrFile['filerealname']) . "<br />"; |
|
211 | + echo " ".sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE_FILE, $arrFile['filerealname'])."<br />"; |
|
212 | 212 | } |
213 | 213 | } |
214 | 214 | } |
215 | 215 | } |
216 | 216 | |
217 | 217 | $newArticleArray[$arrArticle['articleid']] = $itemObj->getVar('itemid'); |
218 | - echo " " . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE, $itemObj->title()) . "<br />"; |
|
218 | + echo " ".sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE, $itemObj->title())."<br />"; |
|
219 | 219 | ++$cnt_imported_articles; |
220 | 220 | } |
221 | 221 | } |
@@ -238,7 +238,7 @@ discard block |
||
238 | 238 | } |
239 | 239 | |
240 | 240 | // Looping through the comments to link them to the new articles and module |
241 | - echo _AM_PUBLISHER_IMPORT_COMMENTS . "<br />"; |
|
241 | + echo _AM_PUBLISHER_IMPORT_COMMENTS."<br />"; |
|
242 | 242 | |
243 | 243 | $module_handler = xoops_getHandler('module'); |
244 | 244 | $moduleObj = $module_handler->getByDirname('xfsection'); |
@@ -255,17 +255,17 @@ discard block |
||
255 | 255 | $comment->setVar('com_modid', $publisher_module_id); |
256 | 256 | $comment->setNew(); |
257 | 257 | if (!$comment_handler->insert($comment)) { |
258 | - echo " " . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT_ERROR, $comment->getVar('com_title')) . "<br />"; |
|
258 | + echo " ".sprintf(_AM_PUBLISHER_IMPORTED_COMMENT_ERROR, $comment->getVar('com_title'))."<br />"; |
|
259 | 259 | } else { |
260 | - echo " " . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT, $comment->getVar('com_title')) . "<br />"; |
|
260 | + echo " ".sprintf(_AM_PUBLISHER_IMPORTED_COMMENT, $comment->getVar('com_title'))."<br />"; |
|
261 | 261 | } |
262 | 262 | |
263 | 263 | } |
264 | 264 | |
265 | 265 | echo "<br/><br/>Done.<br/>"; |
266 | - echo sprintf(_AM_PUBLISHER_IMPORTED_CATEGORIES, $cnt_imported_cat) . "<br/>"; |
|
267 | - echo sprintf(_AM_PUBLISHER_IMPORTED_ARTICLES, $cnt_imported_articles) . "<br/>"; |
|
268 | - echo "<br/><a href='" . publisher_URL . "'>" . _AM_PUBLISHER_IMPORT_GOTOMODULE . "</a><br/>"; |
|
266 | + echo sprintf(_AM_PUBLISHER_IMPORTED_CATEGORIES, $cnt_imported_cat)."<br/>"; |
|
267 | + echo sprintf(_AM_PUBLISHER_IMPORTED_ARTICLES, $cnt_imported_articles)."<br/>"; |
|
268 | + echo "<br/><a href='".publisher_URL."'>"._AM_PUBLISHER_IMPORT_GOTOMODULE."</a><br/>"; |
|
269 | 269 | |
270 | 270 | PublisherUtils::closeCollapsableBar('xfsectionimportgo', 'xfsectionimportgoicon'); |
271 | 271 | $xoops->footer(); |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | * @version $Id$ |
22 | 22 | */ |
23 | 23 | |
24 | -include_once __DIR__ . '/admin_header.php'; |
|
24 | +include_once __DIR__.'/admin_header.php'; |
|
25 | 25 | $xoops = Xoops::getInstance(); |
26 | 26 | |
27 | 27 | $op = Request::getString('op'); |
@@ -46,8 +46,8 @@ discard block |
||
46 | 46 | } |
47 | 47 | |
48 | 48 | echo "<br />\n"; |
49 | - echo "<span style='color: #2F5376; font-weight: bold; font-size: 16px; margin: 6px 06 0 0; '>" . _AM_PUBLISHER_FILE_EDITING . "</span>"; |
|
50 | - echo "<span style=\"color: #567; margin: 3px 0 12px 0; font-size: small; display: block; \">" . _AM_PUBLISHER_FILE_EDITING_DSC . "</span>"; |
|
49 | + echo "<span style='color: #2F5376; font-weight: bold; font-size: 16px; margin: 6px 06 0 0; '>"._AM_PUBLISHER_FILE_EDITING."</span>"; |
|
50 | + echo "<span style=\"color: #567; margin: 3px 0 12px 0; font-size: small; display: block; \">"._AM_PUBLISHER_FILE_EDITING_DSC."</span>"; |
|
51 | 51 | PublisherUtils::openCollapsableBar('editfile', 'editfileicon', _AM_PUBLISHER_FILE_INFORMATIONS); |
52 | 52 | } else { |
53 | 53 | // there's no parameter, so we're adding an item |
@@ -56,8 +56,8 @@ discard block |
||
56 | 56 | if ($showmenu) { |
57 | 57 | //publisher_adminMenu(2, _AM_PUBLISHER_FILE . " > " . _AM_PUBLISHER_FILE_ADD); |
58 | 58 | } |
59 | - echo "<span style='color: #2F5376; font-weight: bold; font-size: 16px; margin: 6px 06 0 0; '>" . _AM_PUBLISHER_FILE_ADDING . "</span>"; |
|
60 | - echo "<span style=\"color: #567; margin: 3px 0 12px 0; font-size: small; display: block; \">" . _AM_PUBLISHER_FILE_ADDING_DSC . "</span>"; |
|
59 | + echo "<span style='color: #2F5376; font-weight: bold; font-size: 16px; margin: 6px 06 0 0; '>"._AM_PUBLISHER_FILE_ADDING."</span>"; |
|
60 | + echo "<span style=\"color: #567; margin: 3px 0 12px 0; font-size: small; display: block; \">"._AM_PUBLISHER_FILE_ADDING_DSC."</span>"; |
|
61 | 61 | PublisherUtils::openCollapsableBar('addfile', 'addfileicon', _AM_PUBLISHER_FILE_INFORMATIONS); |
62 | 62 | } |
63 | 63 | |
@@ -115,11 +115,11 @@ discard block |
||
115 | 115 | |
116 | 116 | // Storing the file |
117 | 117 | if (!$fileObj->store()) { |
118 | - $xoops->redirect('item.php?op=mod&itemid=' . $fileObj->getVar('itemid'), 3, _AM_PUBLISHER_FILE_EDITING_ERROR . PublisherUtils::formatErrors($fileObj->getErrors())); |
|
118 | + $xoops->redirect('item.php?op=mod&itemid='.$fileObj->getVar('itemid'), 3, _AM_PUBLISHER_FILE_EDITING_ERROR.PublisherUtils::formatErrors($fileObj->getErrors())); |
|
119 | 119 | exit; |
120 | 120 | } |
121 | 121 | |
122 | - $xoops->redirect('item.php?op=mod&itemid=' . $fileObj->getVar('itemid'), 2, _AM_PUBLISHER_FILE_EDITING_SUCCESS); |
|
122 | + $xoops->redirect('item.php?op=mod&itemid='.$fileObj->getVar('itemid'), 2, _AM_PUBLISHER_FILE_EDITING_SUCCESS); |
|
123 | 123 | exit(); |
124 | 124 | break; |
125 | 125 | |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | $fileid = isset($_GET['fileid']) ? (int)($_GET['fileid']) : 0; |
144 | 144 | |
145 | 145 | PublisherUtils::cpHeader(); |
146 | - echo $xoops->confirm(array('op' => 'del', 'fileid' => $fileObj->getVar('fileid'), 'confirm' => 1, 'name' => $fileObj->getVar('name')), 'file.php', _AM_PUBLISHER_DELETETHISFILE . " <br />" . $fileObj->getVar('name') . " <br /> <br />", _AM_PUBLISHER_DELETE); |
|
146 | + echo $xoops->confirm(array('op' => 'del', 'fileid' => $fileObj->getVar('fileid'), 'confirm' => 1, 'name' => $fileObj->getVar('name')), 'file.php', _AM_PUBLISHER_DELETETHISFILE." <br />".$fileObj->getVar('name')." <br /> <br />", _AM_PUBLISHER_DELETE); |
|
147 | 147 | $xoops->footer(); |
148 | 148 | } |
149 | 149 | exit(); |