Completed
Push — master ( 2f8aec...b781ca )
by Richard
16s
created
htdocs/modules/publisher/admin/import/wfsection.php 1 patch
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -26,10 +26,10 @@  discard block
 block discarded – undo
26 26
 use Xoops\Form\ThemeForm;
27 27
 use XoopsModules\Publisher;
28 28
 
29
-require_once dirname(__DIR__) . '/admin_header.php';
29
+require_once dirname(__DIR__).'/admin_header.php';
30 30
 $myts = Sanitizer::getInstance();
31 31
 
32
-$importFromModuleName = 'WF-Section ' . @$_POST['wfs_version'];
32
+$importFromModuleName = 'WF-Section '.@$_POST['wfs_version'];
33 33
 
34 34
 $scriptname = 'wfsection.php';
35 35
 
@@ -44,26 +44,26 @@  discard block
 block discarded – undo
44 44
     //publisher_adminMenu(-1, _AM_PUBLISHER_IMPORT);
45 45
     Publisher\Utils::openCollapsableBar('wfsectionimport', 'wfsectionimporticon', sprintf(_AM_PUBLISHER_IMPORT_FROM, $importFromModuleName), _AM_PUBLISHER_IMPORT_INFO);
46 46
 
47
-    $result = $xoopsDB->query('SELECT COUNT(*) FROM ' . $xoopsDB->prefix('wfs_category'));
47
+    $result = $xoopsDB->query('SELECT COUNT(*) FROM '.$xoopsDB->prefix('wfs_category'));
48 48
     [$totalCat] = $xoopsDB->fetchRow($result);
49 49
 
50 50
     if (0 == $totalCat) {
51
-        echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">' . _AM_PUBLISHER_IMPORT_NOCATSELECTED . '</span>';
51
+        echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">'._AM_PUBLISHER_IMPORT_NOCATSELECTED.'</span>';
52 52
     } else {
53
-        require_once XoopsBaseConfig::get('root-path') . '/class/xoopstree.php';
53
+        require_once XoopsBaseConfig::get('root-path').'/class/xoopstree.php';
54 54
 
55
-        $result = $xoopsDB->query('SELECT COUNT(*) FROM ' . $xoopsDB->prefix('wfs_article'));
55
+        $result = $xoopsDB->query('SELECT COUNT(*) FROM '.$xoopsDB->prefix('wfs_article'));
56 56
         [$totalArticles] = $xoopsDB->fetchRow($result);
57 57
 
58 58
         if (0 == $totalArticles) {
59
-            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>';
59
+            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>';
60 60
         } else {
61
-            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>';
61
+            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>';
62 62
 
63
-            $form = new ThemeForm(_AM_PUBLISHER_IMPORT_SETTINGS, 'import_form', PUBLISHER_ADMIN_URL . "/import/$scriptname");
63
+            $form = new ThemeForm(_AM_PUBLISHER_IMPORT_SETTINGS, 'import_form', PUBLISHER_ADMIN_URL."/import/$scriptname");
64 64
 
65 65
             // Categories to be imported
66
-            $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';
66
+            $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';
67 67
             $result = $xoopsDB->query($sql);
68 68
             $cat_cbox_values = [];
69 69
             $cat_cbox_options = [];
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
         $orders = 'orders';
115 115
     }
116 116
     //$sql = "SELECT * FROM ".$xoopsDB->prefix("wfs_category")." ORDER by orders";
117
-    $sql = 'SELECT * FROM ' . $xoopsDB->prefix('wfs_category') . " ORDER by $orders";
117
+    $sql = 'SELECT * FROM '.$xoopsDB->prefix('wfs_category')." ORDER by $orders";
118 118
     //end added to support 2.0.7
119 119
     $resultCat = $xoopsDB->query($sql);
120 120
 
@@ -139,13 +139,13 @@  discard block
 block discarded – undo
139 139
 
140 140
         // Category image
141 141
         if (('blank.gif' !== $arrCat['imgurl']) && $arrCat['imgurl']) {
142
-            if (copy(XOOPS_ROOT_PATH . '/modules/wfsection/images/category/' . $arrCat['imgurl'], PUBLISHER_UPLOADS_PATH . '/images/category/' . $arrCat['imgurl'])) {
142
+            if (copy(XOOPS_ROOT_PATH.'/modules/wfsection/images/category/'.$arrCat['imgurl'], PUBLISHER_UPLOADS_PATH.'/images/category/'.$arrCat['imgurl'])) {
143 143
                 $categoryObj->setVar('image', $arrCat['imgurl']);
144 144
             }
145 145
         }
146 146
 
147 147
         if (!$categoryObj->store(false)) {
148
-            echo sprintf(_AM_PUBLISHER_IMPORT_CATEGORY_ERROR, $arrCat['title']) . '<br>';
148
+            echo sprintf(_AM_PUBLISHER_IMPORT_CATEGORY_ERROR, $arrCat['title']).'<br>';
149 149
             continue;
150 150
         }
151 151
 
@@ -156,9 +156,9 @@  discard block
 block discarded – undo
156 156
 
157 157
         ++$cnt_imported_cat;
158 158
 
159
-        echo sprintf(_AM_PUBLISHER_IMPORT_CATEGORY_SUCCESS, $categoryObj->getVar('name')) . "<br\>";
159
+        echo sprintf(_AM_PUBLISHER_IMPORT_CATEGORY_SUCCESS, $categoryObj->getVar('name'))."<br\>";
160 160
 
161
-        $sql = 'SELECT * FROM ' . $xoopsDB->prefix('wfs_article') . ' WHERE categoryid=' . $arrCat['id'] . ' ORDER BY weight';
161
+        $sql = 'SELECT * FROM '.$xoopsDB->prefix('wfs_article').' WHERE categoryid='.$arrCat['id'].' ORDER BY weight';
162 162
         $resultArticles = $xoopsDB->query($sql);
163 163
         while (false !== ($arrArticle = $xoopsDB->fetchArray($resultArticles))) {
164 164
             // insert article
@@ -180,29 +180,29 @@  discard block
 block discarded – undo
180 180
 
181 181
             // HTML Wrap
182 182
             if ($arrArticle['htmlpage']) {
183
-                $pagewrap_filename = XoopsBaseConfig::get('root-path') . '/modules/wfsection/html/' . $arrArticle['htmlpage'];
183
+                $pagewrap_filename = XoopsBaseConfig::get('root-path').'/modules/wfsection/html/'.$arrArticle['htmlpage'];
184 184
                 if (XoopsLoad::fileExists($pagewrap_filename)) {
185
-                    if (copy($pagewrap_filename, PUBLISHER_UPLOADS_PATH . '/content/' . $arrArticle['htmlpage'])) {
186
-                        $itemObj->setVar('body', '[pagewrap=' . $arrArticle['htmlpage'] . ']');
187
-                        echo sprintf('&nbsp;&nbsp;&nbsp;&nbsp;' . _AM_PUBLISHER_IMPORT_ARTICLE_WRAP, $arrArticle['htmlpage']) . '<br>';
185
+                    if (copy($pagewrap_filename, PUBLISHER_UPLOADS_PATH.'/content/'.$arrArticle['htmlpage'])) {
186
+                        $itemObj->setVar('body', '[pagewrap='.$arrArticle['htmlpage'].']');
187
+                        echo sprintf('&nbsp;&nbsp;&nbsp;&nbsp;'._AM_PUBLISHER_IMPORT_ARTICLE_WRAP, $arrArticle['htmlpage']).'<br>';
188 188
                     }
189 189
                 }
190 190
             }
191 191
 
192 192
             if (!$itemObj->store()) {
193
-                echo sprintf('  ' . _AM_PUBLISHER_IMPORT_ARTICLE_ERROR, $arrArticle['title']) . '<br>';
193
+                echo sprintf('  '._AM_PUBLISHER_IMPORT_ARTICLE_ERROR, $arrArticle['title']).'<br>';
194 194
                 continue;
195 195
             }
196 196
 
197 197
             // Linkes files
198 198
 
199
-            $sql = 'SELECT * FROM ' . $xoopsDB->prefix('wfs_files') . ' WHERE articleid=' . $arrArticle['articleid'];
199
+            $sql = 'SELECT * FROM '.$xoopsDB->prefix('wfs_files').' WHERE articleid='.$arrArticle['articleid'];
200 200
             $resultFiles = $xoopsDB->query($sql);
201 201
             $allowed_mimetypes = '';
202 202
             while (false !== ($arrFile = $xoopsDB->fetchArray($resultFiles))) {
203
-                $filename = XoopsBaseConfig::get('root-path') . '/modules/wfsection/cache/uploaded/' . $arrFile['filerealname'];
203
+                $filename = XoopsBaseConfig::get('root-path').'/modules/wfsection/cache/uploaded/'.$arrFile['filerealname'];
204 204
                 if (XoopsLoad::fileExists($filename)) {
205
-                    if (copy($filename, PUBLISHER_UPLOADS_PATH . '/' . $arrFile['filerealname'])) {
205
+                    if (copy($filename, PUBLISHER_UPLOADS_PATH.'/'.$arrFile['filerealname'])) {
206 206
                         $fileObj = $helper->getFileHandler()->create();
207 207
                         $fileObj->setVar('name', $arrFile['fileshowname']);
208 208
                         $fileObj->setVar('description', $arrFile['filedescript']);
@@ -215,14 +215,14 @@  discard block
 block discarded – undo
215 215
                         $fileObj->setVar('filename', $arrFile['filerealname']);
216 216
 
217 217
                         if ($fileObj->store($allowed_mimetypes, true, false)) {
218
-                            echo '&nbsp;&nbsp;&nbsp;&nbsp;' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE_FILE, $arrFile['filerealname']) . '<br>';
218
+                            echo '&nbsp;&nbsp;&nbsp;&nbsp;'.sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE_FILE, $arrFile['filerealname']).'<br>';
219 219
                         }
220 220
                     }
221 221
                 }
222 222
             }
223 223
 
224 224
             $newArticleArray[$arrArticle['articleid']] = $itemObj->getVar('itemid');
225
-            echo '&nbsp;&nbsp;' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE, $itemObj->title()) . '<br>';
225
+            echo '&nbsp;&nbsp;'.sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE, $itemObj->title()).'<br>';
226 226
             ++$cnt_imported_articles;
227 227
         }
228 228
         $newCatArray[$newCat['oldid']] = $newCat;
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
     }
245 245
 
246 246
     // Looping through the comments to link them to the new articles and module
247
-    echo _AM_PUBLISHER_IMPORT_COMMENTS . '<br>';
247
+    echo _AM_PUBLISHER_IMPORT_COMMENTS.'<br>';
248 248
 
249 249
     $moduleHandler = xoops_getHandler('module');
250 250
     $moduleObj = $moduleHandler->getByDirname('wfsection');
@@ -261,16 +261,16 @@  discard block
 block discarded – undo
261 261
         $comment->setVar('com_modid', $publisher_module_id);
262 262
         $comment->setNew();
263 263
         if (!$commentHandler->insert($comment)) {
264
-            echo '&nbsp;&nbsp;' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT_ERROR, $comment->getVar('com_title')) . '<br>';
264
+            echo '&nbsp;&nbsp;'.sprintf(_AM_PUBLISHER_IMPORTED_COMMENT_ERROR, $comment->getVar('com_title')).'<br>';
265 265
         } else {
266
-            echo '&nbsp;&nbsp;' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT, $comment->getVar('com_title')) . '<br>';
266
+            echo '&nbsp;&nbsp;'.sprintf(_AM_PUBLISHER_IMPORTED_COMMENT, $comment->getVar('com_title')).'<br>';
267 267
         }
268 268
     }
269 269
 
270 270
     echo '<br><br>Done.<br>';
271
-    echo sprintf(_AM_PUBLISHER_IMPORTED_CATEGORIES, $cnt_imported_cat) . '<br>';
272
-    echo sprintf(_AM_PUBLISHER_IMPORTED_ARTICLES, $cnt_imported_articles) . '<br>';
273
-    echo "<br><a href='" . PUBLISHER_URL . "/'>" . _AM_PUBLISHER_IMPORT_GOTOMODULE . '</a><br>';
271
+    echo sprintf(_AM_PUBLISHER_IMPORTED_CATEGORIES, $cnt_imported_cat).'<br>';
272
+    echo sprintf(_AM_PUBLISHER_IMPORTED_ARTICLES, $cnt_imported_articles).'<br>';
273
+    echo "<br><a href='".PUBLISHER_URL."/'>"._AM_PUBLISHER_IMPORT_GOTOMODULE.'</a><br>';
274 274
 
275 275
     Publisher\Utils::closeCollapsableBar('wfsectionimportgo', 'wfsectionimportgoicon');
276 276
     $xoops->footer();
Please login to merge, or discard this patch.
htdocs/modules/publisher/admin/import/smartsection.php 1 patch
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -26,10 +26,10 @@  discard block
 block discarded – undo
26 26
 use Xoops\Form\ThemeForm;
27 27
 use XoopsModules\Publisher;
28 28
 
29
-require_once dirname(__DIR__) . '/admin_header.php';
29
+require_once dirname(__DIR__).'/admin_header.php';
30 30
 $myts = Sanitizer::getInstance();
31 31
 
32
-$importFromModuleName = 'Smartsection ' . @$_POST['smartsection_version'];
32
+$importFromModuleName = 'Smartsection '.@$_POST['smartsection_version'];
33 33
 
34 34
 $scriptname = 'smartsection.php';
35 35
 
@@ -44,26 +44,26 @@  discard block
 block discarded – undo
44 44
     //publisher_adminMenu(-1, _AM_PUBLISHER_IMPORT);
45 45
     Publisher\Utils::openCollapsableBar('newsimport', 'newsimporticon', sprintf(_AM_PUBLISHER_IMPORT_FROM, $importFromModuleName), _AM_PUBLISHER_IMPORT_INFO);
46 46
 
47
-    $result = $xoopsDB->query('SELECT COUNT(*) FROM ' . $xoopsDB->prefix('smartsection_categories'));
47
+    $result = $xoopsDB->query('SELECT COUNT(*) FROM '.$xoopsDB->prefix('smartsection_categories'));
48 48
     [$totalCat] = $xoopsDB->fetchRow($result);
49 49
 
50 50
     if (0 == $totalCat) {
51
-        echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">' . _AM_PUBLISHER_IMPORT_NO_CATEGORY . '</span>';
51
+        echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">'._AM_PUBLISHER_IMPORT_NO_CATEGORY.'</span>';
52 52
     } else {
53
-        require_once XoopsBaseConfig::get('root-path') . '/class/xoopstree.php';
53
+        require_once XoopsBaseConfig::get('root-path').'/class/xoopstree.php';
54 54
 
55
-        $result = $xoopsDB->query('SELECT COUNT(*) FROM ' . $xoopsDB->prefix('smartsection_items'));
55
+        $result = $xoopsDB->query('SELECT COUNT(*) FROM '.$xoopsDB->prefix('smartsection_items'));
56 56
         [$totalArticles] = $xoopsDB->fetchRow($result);
57 57
 
58 58
         if (0 == $totalArticles) {
59
-            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>';
59
+            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>';
60 60
         } else {
61
-            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>';
61
+            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>';
62 62
 
63
-            $form = new ThemeForm(_AM_PUBLISHER_IMPORT_SETTINGS, 'import_form', PUBLISHER_ADMIN_URL . "/import/{$scriptname}");
63
+            $form = new ThemeForm(_AM_PUBLISHER_IMPORT_SETTINGS, 'import_form', PUBLISHER_ADMIN_URL."/import/{$scriptname}");
64 64
 
65 65
             // Categories to be imported
66
-            $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';
66
+            $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';
67 67
 
68 68
             $result = $xoopsDB->query($sql);
69 69
             $cat_cbox_options = [];
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
 
117 117
     $parentId = $_POST['parent_category'];
118 118
 
119
-    $sql = 'SELECT * FROM ' . $xoopsDB->prefix('smartsection_categories');
119
+    $sql = 'SELECT * FROM '.$xoopsDB->prefix('smartsection_categories');
120 120
 
121 121
     $resultCat = $xoopsDB->query($sql);
122 122
 
@@ -136,20 +136,20 @@  discard block
 block discarded – undo
136 136
 
137 137
         // Copy category image
138 138
         if (('blank.gif' !== $arrCat['image']) && ('' != $arrCat['image'])) {
139
-            copy(XoopsBaseConfig::get('root-path') . '/uploads/smartsection/images/category/' . $arrCat['image'], XoopsBaseConfig::get('root-path') . '/uploads/publisher/images/category/' . $arrCat['image']);
139
+            copy(XoopsBaseConfig::get('root-path').'/uploads/smartsection/images/category/'.$arrCat['image'], XoopsBaseConfig::get('root-path').'/uploads/publisher/images/category/'.$arrCat['image']);
140 140
         }
141 141
 
142 142
         if (!$helper->getCategoryHandler()->insert($categoryObj)) {
143
-            echo sprintf(_AM_PUBLISHER_IMPORT_CATEGORY_ERROR, $arrCat['name']) . '<br>';
143
+            echo sprintf(_AM_PUBLISHER_IMPORT_CATEGORY_ERROR, $arrCat['name']).'<br>';
144 144
             continue;
145 145
         }
146 146
 
147 147
         $newCat['newid'] = $categoryObj->getVar('categoryid');
148 148
         ++$cnt_imported_cat;
149 149
 
150
-        echo sprintf(_AM_PUBLISHER_IMPORT_CATEGORY_SUCCESS, $categoryObj->getVar('name')) . "<br\>";
150
+        echo sprintf(_AM_PUBLISHER_IMPORT_CATEGORY_SUCCESS, $categoryObj->getVar('name'))."<br\>";
151 151
 
152
-        $sql = 'SELECT * FROM ' . $xoopsDB->prefix('smartsection_items') . ' WHERE categoryid=' . $arrCat['categoryid'];
152
+        $sql = 'SELECT * FROM '.$xoopsDB->prefix('smartsection_items').' WHERE categoryid='.$arrCat['categoryid'];
153 153
         $resultArticles = $xoopsDB->query($sql);
154 154
 
155 155
         while (false !== ($arrArticle = $xoopsDB->fetchArray($resultArticles))) {
@@ -177,31 +177,31 @@  discard block
 block discarded – undo
177 177
             */
178 178
 
179 179
             if (!$itemObj->store()) {
180
-                echo sprintf('  ' . _AM_PUBLISHER_IMPORT_ARTICLE_ERROR, $arrArticle['title']) . '<br>';
180
+                echo sprintf('  '._AM_PUBLISHER_IMPORT_ARTICLE_ERROR, $arrArticle['title']).'<br>';
181 181
                 continue;
182 182
             }
183 183
 
184 184
             // Linkes files
185
-            $sql = 'SELECT * FROM ' . $xoopsDB->prefix('smartsection_files') . ' WHERE itemid=' . $arrArticle['itemid'];
185
+            $sql = 'SELECT * FROM '.$xoopsDB->prefix('smartsection_files').' WHERE itemid='.$arrArticle['itemid'];
186 186
             $resultFiles = $xoopsDB->query($sql);
187 187
             $allowed_mimetypes = null;
188 188
             while (false !== ($arrFile = $xoopsDB->fetchArray($resultFiles))) {
189
-                $filename = XoopsBaseConfig::get('root-path') . '/uploads/smartsection/' . $arrFile['filename'];
189
+                $filename = XoopsBaseConfig::get('root-path').'/uploads/smartsection/'.$arrFile['filename'];
190 190
                 if (XoopsLoad::fileExists($filename)) {
191
-                    if (copy($filename, XoopsBaseConfig::get('root-path') . '/uploads/publisher/' . $arrFile['filename'])) {
191
+                    if (copy($filename, XoopsBaseConfig::get('root-path').'/uploads/publisher/'.$arrFile['filename'])) {
192 192
                         $fileObj = $helper->getFileHandler()->create();
193 193
                         $fileObj->setVars($arrFile);
194 194
                         $fileObj->setVar('fileid', 0);
195 195
 
196 196
                         if ($fileObj->store($allowed_mimetypes, true, false)) {
197
-                            echo '&nbsp;&nbsp;&nbsp;&nbsp;' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE_FILE, $arrFile['filename']) . '<br>';
197
+                            echo '&nbsp;&nbsp;&nbsp;&nbsp;'.sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE_FILE, $arrFile['filename']).'<br>';
198 198
                         }
199 199
                     }
200 200
                 }
201 201
             }
202 202
 
203 203
             $newArticleArray[$arrArticle['itemid']] = $itemObj->getVar('itemid');
204
-            echo '&nbsp;&nbsp;' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE, $itemObj->title()) . '<br>';
204
+            echo '&nbsp;&nbsp;'.sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE, $itemObj->title()).'<br>';
205 205
             ++$cnt_imported_articles;
206 206
         }
207 207
 
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
     }
232 232
 
233 233
     // Looping through the comments to link them to the new articles and module
234
-    echo _AM_PUBLISHER_IMPORT_COMMENTS . '<br>';
234
+    echo _AM_PUBLISHER_IMPORT_COMMENTS.'<br>';
235 235
 
236 236
     $publisher_module_id = $helper->getModule()->mid();
237 237
 
@@ -244,16 +244,16 @@  discard block
 block discarded – undo
244 244
         $comment->setVar('com_modid', $publisher_module_id);
245 245
         $comment->setNew();
246 246
         if (!$commentHandler->insert($comment)) {
247
-            echo '&nbsp;&nbsp;' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT_ERROR, $comment->getVar('com_title')) . '<br>';
247
+            echo '&nbsp;&nbsp;'.sprintf(_AM_PUBLISHER_IMPORTED_COMMENT_ERROR, $comment->getVar('com_title')).'<br>';
248 248
         } else {
249
-            echo '&nbsp;&nbsp;' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT, $comment->getVar('com_title')) . '<br>';
249
+            echo '&nbsp;&nbsp;'.sprintf(_AM_PUBLISHER_IMPORTED_COMMENT, $comment->getVar('com_title')).'<br>';
250 250
         }
251 251
     }
252 252
 
253 253
     echo '<br><br>Done.<br>';
254
-    echo sprintf(_AM_PUBLISHER_IMPORTED_CATEGORIES, $cnt_imported_cat) . '<br>';
255
-    echo sprintf(_AM_PUBLISHER_IMPORTED_ARTICLES, $cnt_imported_articles) . '<br>';
256
-    echo "<br><a href='" . PUBLISHER_URL . "/'>" . _AM_PUBLISHER_IMPORT_GOTOMODULE . '</a><br>';
254
+    echo sprintf(_AM_PUBLISHER_IMPORTED_CATEGORIES, $cnt_imported_cat).'<br>';
255
+    echo sprintf(_AM_PUBLISHER_IMPORTED_ARTICLES, $cnt_imported_articles).'<br>';
256
+    echo "<br><a href='".PUBLISHER_URL."/'>"._AM_PUBLISHER_IMPORT_GOTOMODULE.'</a><br>';
257 257
 
258 258
     Publisher\Utils::closeCollapsableBar('newsimportgo', 'newsimportgoicon');
259 259
     $xoops->footer();
Please login to merge, or discard this patch.
htdocs/modules/publisher/admin/about.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
  */
22 22
 use Xoops\Module\Admin;
23 23
 
24
-require __DIR__ . '/admin_header.php';
24
+require __DIR__.'/admin_header.php';
25 25
 
26 26
 $xoops = Xoops::getInstance();
27 27
 $xoops->header();
Please login to merge, or discard this patch.
htdocs/modules/publisher/admin/admin_header.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,12 +23,12 @@
 block discarded – undo
23 23
 use XoopsModules\Publisher;
24 24
 use XoopsModules\Publisher\Helper;
25 25
 
26
-require_once dirname(dirname(dirname(__DIR__))) . '/include/cp_header.php';
26
+require_once dirname(dirname(dirname(__DIR__))).'/include/cp_header.php';
27 27
 
28 28
 $xoops = Xoops::getInstance();
29 29
 
30 30
 $helper = Helper::getInstance();
31 31
 $helper->loadLanguage('modinfo');
32 32
 
33
-XoopsLoad::loadFile($xoops->path(dirname(__DIR__) . '/include/common.php'));
33
+XoopsLoad::loadFile($xoops->path(dirname(__DIR__).'/include/common.php'));
34 34
 //XoopsLoad::loadFile($xoops->path(XOOPS_ROOT_PATH . '/include/cp_header.php'));
Please login to merge, or discard this patch.
htdocs/modules/publisher/admin/item.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -159,11 +159,11 @@
 block discarded – undo
159 159
         } else {
160 160
             $xoops->header();
161 161
             echo $xoops->confirm([
162
-                                     'op' => 'del',
163
-                                     'itemid' => $itemObj->getVar('itemid'),
164
-                                     'confirm' => 1,
165
-                                     'name' => $itemObj->title(),
166
-                                 ], 'item.php', _AM_PUBLISHER_DELETETHISITEM . " <br>'" . $itemObj->title() . "'. <br> <br>", _AM_PUBLISHER_DELETE);
162
+                                        'op' => 'del',
163
+                                        'itemid' => $itemObj->getVar('itemid'),
164
+                                        'confirm' => 1,
165
+                                        'name' => $itemObj->title(),
166
+                                    ], 'item.php', _AM_PUBLISHER_DELETETHISITEM . " <br>'" . $itemObj->title() . "'. <br> <br>", _AM_PUBLISHER_DELETE);
167 167
             $xoops->footer();
168 168
         }
169 169
         exit();
Please login to merge, or discard this patch.
Spacing   +66 added lines, -66 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
  * @author          trabis <[email protected]>
28 28
  * @author          The SmartFactory <www.smartfactory.ca>
29 29
  */
30
-require_once __DIR__ . '/admin_header.php';
30
+require_once __DIR__.'/admin_header.php';
31 31
 
32 32
 $xoops = Xoops::getInstance();
33 33
 
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 
128 128
         // Storing the item
129 129
         if (!$itemObj->store()) {
130
-            $xoops->redirect('javascript:history.go(-1)', 3, $error_msg . Publisher\Utils::formatErrors($itemObj->getErrors()));
130
+            $xoops->redirect('javascript:history.go(-1)', 3, $error_msg.Publisher\Utils::formatErrors($itemObj->getErrors()));
131 131
         }
132 132
 
133 133
         // attach file if any
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
 
153 153
         if ($confirm) {
154 154
             if (!$helper->getItemHandler()->delete($itemObj)) {
155
-                $xoops->redirect('item.php', 2, _AM_PUBLISHER_ITEM_DELETE_ERROR . Publisher\Utils::formatErrors($itemObj->getErrors()));
155
+                $xoops->redirect('item.php', 2, _AM_PUBLISHER_ITEM_DELETE_ERROR.Publisher\Utils::formatErrors($itemObj->getErrors()));
156 156
                 exit();
157 157
             }
158 158
             $xoops->redirect('item.php', 2, sprintf(_AM_PUBLISHER_ITEMISDELETED, $itemObj->title()));
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
                                      'itemid' => $itemObj->getVar('itemid'),
164 164
                                      'confirm' => 1,
165 165
                                      'name' => $itemObj->title(),
166
-                                 ], 'item.php', _AM_PUBLISHER_DELETETHISITEM . " <br>'" . $itemObj->title() . "'. <br> <br>", _AM_PUBLISHER_DELETE);
166
+                                 ], 'item.php', _AM_PUBLISHER_DELETETHISITEM." <br>'".$itemObj->title()."'. <br> <br>", _AM_PUBLISHER_DELETE);
167 167
             $xoops->footer();
168 168
         }
169 169
         exit();
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 
176 176
         echo "<br>\n";
177 177
         echo '<form><div style="margin-bottom: 12px;">';
178
-        echo "<input type='button' name='button' onclick=\"location='item.php?op=mod'\" value='" . _AM_PUBLISHER_CREATEITEM . "'>&nbsp;&nbsp;";
178
+        echo "<input type='button' name='button' onclick=\"location='item.php?op=mod'\" value='"._AM_PUBLISHER_CREATEITEM."'>&nbsp;&nbsp;";
179 179
         echo '</div></form>';
180 180
 
181 181
         $orderBy = 'datesub';
@@ -193,40 +193,40 @@  discard block
 block discarded – undo
193 193
 
194 194
         echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>";
195 195
         echo '<tr>';
196
-        echo "<td width='40' class='bg3' align='center'><strong>" . _AM_PUBLISHER_ITEMID . '</strong></td>';
197
-        echo "<td width='20%' class='bg3' align='left'><strong>" . _AM_PUBLISHER_ITEMCATEGORYNAME . '</strong></td>';
198
-        echo "<td class='bg3' align='left'><strong>" . _AM_PUBLISHER_TITLE . '</strong></td>';
199
-        echo "<td width='90' class='bg3' align='center'><strong>" . _AM_PUBLISHER_CREATED . '</strong></td>';
200
-        echo "<td width='80' class='bg3' align='center'><strong>" . _AM_PUBLISHER_ACTION . '</strong></td>';
196
+        echo "<td width='40' class='bg3' align='center'><strong>"._AM_PUBLISHER_ITEMID.'</strong></td>';
197
+        echo "<td width='20%' class='bg3' align='left'><strong>"._AM_PUBLISHER_ITEMCATEGORYNAME.'</strong></td>';
198
+        echo "<td class='bg3' align='left'><strong>"._AM_PUBLISHER_TITLE.'</strong></td>';
199
+        echo "<td width='90' class='bg3' align='center'><strong>"._AM_PUBLISHER_CREATED.'</strong></td>';
200
+        echo "<td width='80' class='bg3' align='center'><strong>"._AM_PUBLISHER_ACTION.'</strong></td>';
201 201
         echo '</tr>';
202 202
         if ($totalitems > 0) {
203 203
             for ($i = 0; $i < $totalItemsOnPage; ++$i) {
204 204
                 $categoryObj = $itemsObj[$i]->category();
205 205
 
206
-                $approve = "<a href='item.php?op=mod&itemid=" . $itemsObj[$i]->getVar('itemid') . "'><img src='" . PUBLISHER_URL . "/images/links/approve.gif' title='" . _AM_PUBLISHER_SUBMISSION_MODERATE . "' alt='" . _AM_PUBLISHER_SUBMISSION_MODERATE . "'></a>&nbsp;";
206
+                $approve = "<a href='item.php?op=mod&itemid=".$itemsObj[$i]->getVar('itemid')."'><img src='".PUBLISHER_URL."/images/links/approve.gif' title='"._AM_PUBLISHER_SUBMISSION_MODERATE."' alt='"._AM_PUBLISHER_SUBMISSION_MODERATE."'></a>&nbsp;";
207 207
                 $clone = '';
208
-                $delete = "<a href='item.php?op=del&itemid=" . $itemsObj[$i]->getVar('itemid') . "'><img src='" . PUBLISHER_URL . "/images/links/delete.png' title='" . _AM_PUBLISHER_DELETEITEM . "' alt='" . _AM_PUBLISHER_DELETEITEM . "'></a>";
208
+                $delete = "<a href='item.php?op=del&itemid=".$itemsObj[$i]->getVar('itemid')."'><img src='".PUBLISHER_URL."/images/links/delete.png' title='"._AM_PUBLISHER_DELETEITEM."' alt='"._AM_PUBLISHER_DELETEITEM."'></a>";
209 209
                 $modify = '';
210 210
 
211 211
                 echo '<tr>';
212
-                echo "<td class='head' align='center'>" . $itemsObj[$i]->getVar('itemid') . '</td>';
213
-                echo "<td class='even' align='left'>" . $categoryObj->getCategoryLink() . '</td>';
214
-                echo "<td class='even' align='left'><a href='" . PUBLISHER_URL . '/item.php?itemid=' . $itemsObj[$i]->getVar('itemid') . "'>" . $itemsObj[$i]->title() . '</a></td>';
215
-                echo "<td class='even' align='center'>" . $itemsObj[$i]->datesub() . '</td>';
212
+                echo "<td class='head' align='center'>".$itemsObj[$i]->getVar('itemid').'</td>';
213
+                echo "<td class='even' align='left'>".$categoryObj->getCategoryLink().'</td>';
214
+                echo "<td class='even' align='left'><a href='".PUBLISHER_URL.'/item.php?itemid='.$itemsObj[$i]->getVar('itemid')."'>".$itemsObj[$i]->title().'</a></td>';
215
+                echo "<td class='even' align='center'>".$itemsObj[$i]->datesub().'</td>';
216 216
                 echo "<td class='even' align='center'> $approve $clone $modify $delete </td>";
217 217
                 echo '</tr>';
218 218
             }
219 219
         } else {
220 220
             $itemid = 0;
221 221
             echo '<tr>';
222
-            echo "<td class='head' align='center' colspan= '7'>" . _AM_PUBLISHER_NOITEMS_SUBMITTED . '</td>';
222
+            echo "<td class='head' align='center' colspan= '7'>"._AM_PUBLISHER_NOITEMS_SUBMITTED.'</td>';
223 223
             echo '</tr>';
224 224
         }
225 225
         echo "</table>\n";
226 226
         echo "<br>\n";
227 227
 
228 228
         $pagenav = new XoopsPageNav($totalitems, $helper->getConfig('idxcat_perpage'), $submittedstartitem, 'submittedstartitem');
229
-        echo '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>';
229
+        echo '<div style="text-align:right;">'.$pagenav->renderNav().'</div>';
230 230
 
231 231
         Publisher\Utils::closeCollapsableBar('submiteditemstable', 'submiteditemsicon');
232 232
 
@@ -242,44 +242,44 @@  discard block
 block discarded – undo
242 242
 
243 243
         echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>";
244 244
         echo '<tr>';
245
-        echo "<td width='40' class='bg3' align='center'><strong>" . _AM_PUBLISHER_ITEMID . '</strong></td>';
246
-        echo "<td width='20%' class='bg3' align='left'><strong>" . _AM_PUBLISHER_ITEMCATEGORYNAME . '</strong></td>';
247
-        echo "<td class='bg3' align='left'><strong>" . _AM_PUBLISHER_TITLE . '</strong></td>';
248
-        echo "<td width='90' class='bg3' align='center'><strong>" . _AM_PUBLISHER_CREATED . '</strong></td>';
249
-        echo "<td width='80' class='bg3' align='center'><strong>" . _AM_PUBLISHER_ACTION . '</strong></td>';
245
+        echo "<td width='40' class='bg3' align='center'><strong>"._AM_PUBLISHER_ITEMID.'</strong></td>';
246
+        echo "<td width='20%' class='bg3' align='left'><strong>"._AM_PUBLISHER_ITEMCATEGORYNAME.'</strong></td>';
247
+        echo "<td class='bg3' align='left'><strong>"._AM_PUBLISHER_TITLE.'</strong></td>';
248
+        echo "<td width='90' class='bg3' align='center'><strong>"._AM_PUBLISHER_CREATED.'</strong></td>';
249
+        echo "<td width='80' class='bg3' align='center'><strong>"._AM_PUBLISHER_ACTION.'</strong></td>';
250 250
         echo '</tr>';
251 251
         if ($totalitems > 0) {
252 252
             for ($i = 0; $i < $totalItemsOnPage; ++$i) {
253 253
                 $categoryObj = $itemsObj[$i]->category();
254 254
 
255
-                $modify = "<a href='item.php?op=mod&itemid=" . $itemsObj[$i]->getVar('itemid') . "'><img src='" . PUBLISHER_URL . "/images/links/edit.gif' title='" . _AM_PUBLISHER_EDITITEM . "' alt='" . _AM_PUBLISHER_EDITITEM . "'></a>";
256
-                $delete = "<a href='item.php?op=del&itemid=" . $itemsObj[$i]->getVar('itemid') . "'><img src='" . PUBLISHER_URL . "/images/links/delete.png' title='" . _AM_PUBLISHER_DELETEITEM . "' alt='" . _AM_PUBLISHER_DELETEITEM . "'></a>";
257
-                $clone = "<a href='item.php?op=clone&itemid=" . $itemsObj[$i]->getVar('itemid') . "'><img src='" . PUBLISHER_URL . "/images/links/clone.gif' title='" . _AM_PUBLISHER_CLONE_ITEM . "' alt='" . _AM_PUBLISHER_CLONE_ITEM . "'></a>";
255
+                $modify = "<a href='item.php?op=mod&itemid=".$itemsObj[$i]->getVar('itemid')."'><img src='".PUBLISHER_URL."/images/links/edit.gif' title='"._AM_PUBLISHER_EDITITEM."' alt='"._AM_PUBLISHER_EDITITEM."'></a>";
256
+                $delete = "<a href='item.php?op=del&itemid=".$itemsObj[$i]->getVar('itemid')."'><img src='".PUBLISHER_URL."/images/links/delete.png' title='"._AM_PUBLISHER_DELETEITEM."' alt='"._AM_PUBLISHER_DELETEITEM."'></a>";
257
+                $clone = "<a href='item.php?op=clone&itemid=".$itemsObj[$i]->getVar('itemid')."'><img src='".PUBLISHER_URL."/images/links/clone.gif' title='"._AM_PUBLISHER_CLONE_ITEM."' alt='"._AM_PUBLISHER_CLONE_ITEM."'></a>";
258 258
 
259 259
                 echo '<tr>';
260
-                echo "<td class='head' align='center'>" . $itemsObj[$i]->getVar('itemid') . '</td>';
261
-                echo "<td class='even' align='left'>" . $categoryObj->getCategoryLink() . '</td>';
262
-                echo "<td class='even' align='left'>" . $itemsObj[$i]->getItemLink() . '</td>';
263
-                echo "<td class='even' align='center'>" . $itemsObj[$i]->datesub() . '</td>';
260
+                echo "<td class='head' align='center'>".$itemsObj[$i]->getVar('itemid').'</td>';
261
+                echo "<td class='even' align='left'>".$categoryObj->getCategoryLink().'</td>';
262
+                echo "<td class='even' align='left'>".$itemsObj[$i]->getItemLink().'</td>';
263
+                echo "<td class='even' align='center'>".$itemsObj[$i]->datesub().'</td>';
264 264
                 echo "<td class='even' align='center'> $clone $modify $delete </td>";
265 265
                 echo '</tr>';
266 266
             }
267 267
         } else {
268 268
             $itemid = 0;
269 269
             echo '<tr>';
270
-            echo "<td class='head' align='center' colspan= '7'>" . _AM_PUBLISHER_NOITEMS . '</td>';
270
+            echo "<td class='head' align='center' colspan= '7'>"._AM_PUBLISHER_NOITEMS.'</td>';
271 271
             echo '</tr>';
272 272
         }
273 273
         echo "</table>\n";
274 274
         echo "<br>\n";
275 275
 
276 276
         $pagenav = new XoopsPageNav($totalitems, $helper->getConfig('idxcat_perpage'), $publishedstartitem, 'publishedstartitem');
277
-        echo '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>';
277
+        echo '<div style="text-align:right;">'.$pagenav->renderNav().'</div>';
278 278
 
279 279
         Publisher\Utils::closeCollapsableBar('item_publisheditemstable', 'item_publisheditemsicon');
280 280
 
281 281
         // Display Offline articles
282
-        Publisher\Utils::openCollapsableBar('offlineitemstable', 'offlineitemsicon', _AM_PUBLISHER_ITEMS . ' ' . _CO_PUBLISHER_OFFLINE, _AM_PUBLISHER_OFFLINE_EXP);
282
+        Publisher\Utils::openCollapsableBar('offlineitemstable', 'offlineitemsicon', _AM_PUBLISHER_ITEMS.' '._CO_PUBLISHER_OFFLINE, _AM_PUBLISHER_OFFLINE_EXP);
283 283
 
284 284
         $totalitems = $helper->getItemHandler()->getItemsCount(-1, [_PUBLISHER_STATUS_OFFLINE]);
285 285
 
@@ -289,39 +289,39 @@  discard block
 block discarded – undo
289 289
 
290 290
         echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>";
291 291
         echo '<tr>';
292
-        echo "<td width='40' class='bg3' align='center'><strong>" . _AM_PUBLISHER_ITEMID . '</strong></td>';
293
-        echo "<td width='20%' class='bg3' align='left'><strong>" . _AM_PUBLISHER_ITEMCATEGORYNAME . '</strong></td>';
294
-        echo "<td class='bg3' align='left'><strong>" . _AM_PUBLISHER_TITLE . '</strong></td>';
295
-        echo "<td width='90' class='bg3' align='center'><strong>" . _AM_PUBLISHER_CREATED . '</strong></td>';
296
-        echo "<td width='80' class='bg3' align='center'><strong>" . _AM_PUBLISHER_ACTION . '</strong></td>';
292
+        echo "<td width='40' class='bg3' align='center'><strong>"._AM_PUBLISHER_ITEMID.'</strong></td>';
293
+        echo "<td width='20%' class='bg3' align='left'><strong>"._AM_PUBLISHER_ITEMCATEGORYNAME.'</strong></td>';
294
+        echo "<td class='bg3' align='left'><strong>"._AM_PUBLISHER_TITLE.'</strong></td>';
295
+        echo "<td width='90' class='bg3' align='center'><strong>"._AM_PUBLISHER_CREATED.'</strong></td>';
296
+        echo "<td width='80' class='bg3' align='center'><strong>"._AM_PUBLISHER_ACTION.'</strong></td>';
297 297
         echo '</tr>';
298 298
         if ($totalitems > 0) {
299 299
             for ($i = 0; $i < $totalItemsOnPage; ++$i) {
300 300
                 $categoryObj = $itemsObj[$i]->category();
301 301
 
302
-                $modify = "<a href='item.php?op=mod&itemid=" . $itemsObj[$i]->getVar('itemid') . "'><img src='" . PUBLISHER_URL . "/images/links/edit.gif' title='" . _AM_PUBLISHER_EDITITEM . "' alt='" . _AM_PUBLISHER_EDITITEM . "'></a>";
303
-                $delete = "<a href='item.php?op=del&itemid=" . $itemsObj[$i]->getVar('itemid') . "'><img src='" . PUBLISHER_URL . "/images/links/delete.png' title='" . _AM_PUBLISHER_DELETEITEM . "' alt='" . _AM_PUBLISHER_DELETEITEM . "'></a>";
304
-                $clone = "<a href='item.php?op=clone&itemid=" . $itemsObj[$i]->getVar('itemid') . "'><img src='" . PUBLISHER_URL . "/images/links/clone.gif' title='" . _AM_PUBLISHER_CLONE_ITEM . "' alt='" . _AM_PUBLISHER_CLONE_ITEM . "'></a>";
302
+                $modify = "<a href='item.php?op=mod&itemid=".$itemsObj[$i]->getVar('itemid')."'><img src='".PUBLISHER_URL."/images/links/edit.gif' title='"._AM_PUBLISHER_EDITITEM."' alt='"._AM_PUBLISHER_EDITITEM."'></a>";
303
+                $delete = "<a href='item.php?op=del&itemid=".$itemsObj[$i]->getVar('itemid')."'><img src='".PUBLISHER_URL."/images/links/delete.png' title='"._AM_PUBLISHER_DELETEITEM."' alt='"._AM_PUBLISHER_DELETEITEM."'></a>";
304
+                $clone = "<a href='item.php?op=clone&itemid=".$itemsObj[$i]->getVar('itemid')."'><img src='".PUBLISHER_URL."/images/links/clone.gif' title='"._AM_PUBLISHER_CLONE_ITEM."' alt='"._AM_PUBLISHER_CLONE_ITEM."'></a>";
305 305
 
306 306
                 echo '<tr>';
307
-                echo "<td class='head' align='center'>" . $itemsObj[$i]->getVar('itemid') . '</td>';
308
-                echo "<td class='even' align='left'>" . $categoryObj->getCategoryLink() . '</td>';
309
-                echo "<td class='even' align='left'>" . $itemsObj[$i]->getItemLink() . '</td>';
310
-                echo "<td class='even' align='center'>" . $itemsObj[$i]->datesub() . '</td>';
307
+                echo "<td class='head' align='center'>".$itemsObj[$i]->getVar('itemid').'</td>';
308
+                echo "<td class='even' align='left'>".$categoryObj->getCategoryLink().'</td>';
309
+                echo "<td class='even' align='left'>".$itemsObj[$i]->getItemLink().'</td>';
310
+                echo "<td class='even' align='center'>".$itemsObj[$i]->datesub().'</td>';
311 311
                 echo "<td class='even' align='center'> $clone $modify $delete </td>";
312 312
                 echo '</tr>';
313 313
             }
314 314
         } else {
315 315
             $itemid = 0;
316 316
             echo '<tr>';
317
-            echo "<td class='head' align='center' colspan= '7'>" . _AM_PUBLISHER_NOITEMS_OFFLINE . '</td>';
317
+            echo "<td class='head' align='center' colspan= '7'>"._AM_PUBLISHER_NOITEMS_OFFLINE.'</td>';
318 318
             echo '</tr>';
319 319
         }
320 320
         echo "</table>\n";
321 321
         echo "<br>\n";
322 322
 
323 323
         $pagenav = new XoopsPageNav($totalitems, $helper->getConfig('idxcat_perpage'), $offlinestartitem, 'offlinestartitem');
324
-        echo '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>';
324
+        echo '<div style="text-align:right;">'.$pagenav->renderNav().'</div>';
325 325
 
326 326
         Publisher\Utils::closeCollapsableBar('offlineitemstable', 'offlineitemsicon');
327 327
 
@@ -337,39 +337,39 @@  discard block
 block discarded – undo
337 337
 
338 338
         echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>";
339 339
         echo '<tr>';
340
-        echo "<td width='40' class='bg3' align='center'><strong>" . _AM_PUBLISHER_ITEMID . '</strong></td>';
341
-        echo "<td width='20%' class='bg3' align='left'><strong>" . _AM_PUBLISHER_ITEMCATEGORYNAME . '</strong></td>';
342
-        echo "<td class='bg3' align='left'><strong>" . _AM_PUBLISHER_TITLE . '</strong></td>';
343
-        echo "<td width='90' class='bg3' align='center'><strong>" . _AM_PUBLISHER_CREATED . '</strong></td>';
344
-        echo "<td width='80' class='bg3' align='center'><strong>" . _AM_PUBLISHER_ACTION . '</strong></td>';
340
+        echo "<td width='40' class='bg3' align='center'><strong>"._AM_PUBLISHER_ITEMID.'</strong></td>';
341
+        echo "<td width='20%' class='bg3' align='left'><strong>"._AM_PUBLISHER_ITEMCATEGORYNAME.'</strong></td>';
342
+        echo "<td class='bg3' align='left'><strong>"._AM_PUBLISHER_TITLE.'</strong></td>';
343
+        echo "<td width='90' class='bg3' align='center'><strong>"._AM_PUBLISHER_CREATED.'</strong></td>';
344
+        echo "<td width='80' class='bg3' align='center'><strong>"._AM_PUBLISHER_ACTION.'</strong></td>';
345 345
         echo '</tr>';
346 346
         if ($totalitems > 0) {
347 347
             for ($i = 0; $i < $totalItemsOnPage; ++$i) {
348 348
                 $categoryObj = $itemsObj[$i]->category();
349 349
 
350
-                $modify = "<a href='item.php?op=mod&itemid=" . $itemsObj[$i]->getVar('itemid') . "'><img src='" . PUBLISHER_URL . "/images/links/edit.gif' title='" . _AM_PUBLISHER_EDITITEM . "' alt='" . _AM_PUBLISHER_EDITITEM . "'></a>";
351
-                $delete = "<a href='item.php?op=del&itemid=" . $itemsObj[$i]->getVar('itemid') . "'><img src='" . PUBLISHER_URL . "/images/links/delete.png' title='" . _AM_PUBLISHER_DELETEITEM . "' alt='" . _AM_PUBLISHER_DELETEITEM . "'></a>";
352
-                $clone = "<a href='item.php?op=clone&itemid=" . $itemsObj[$i]->getVar('itemid') . "'><img src='" . PUBLISHER_URL . "/images/links/clone.gif' title='" . _AM_PUBLISHER_CLONE_ITEM . "' alt='" . _AM_PUBLISHER_CLONE_ITEM . "'></a>";
350
+                $modify = "<a href='item.php?op=mod&itemid=".$itemsObj[$i]->getVar('itemid')."'><img src='".PUBLISHER_URL."/images/links/edit.gif' title='"._AM_PUBLISHER_EDITITEM."' alt='"._AM_PUBLISHER_EDITITEM."'></a>";
351
+                $delete = "<a href='item.php?op=del&itemid=".$itemsObj[$i]->getVar('itemid')."'><img src='".PUBLISHER_URL."/images/links/delete.png' title='"._AM_PUBLISHER_DELETEITEM."' alt='"._AM_PUBLISHER_DELETEITEM."'></a>";
352
+                $clone = "<a href='item.php?op=clone&itemid=".$itemsObj[$i]->getVar('itemid')."'><img src='".PUBLISHER_URL."/images/links/clone.gif' title='"._AM_PUBLISHER_CLONE_ITEM."' alt='"._AM_PUBLISHER_CLONE_ITEM."'></a>";
353 353
 
354 354
                 echo '<tr>';
355
-                echo "<td class='head' align='center'>" . $itemsObj[$i]->getVar('itemid') . '</td>';
356
-                echo "<td class='even' align='left'>" . $categoryObj->getCategoryLink() . '</td>';
357
-                echo "<td class='even' align='left'>" . $itemsObj[$i]->getItemLink() . '</td>';
358
-                echo "<td class='even' align='center'>" . $itemsObj[$i]->datesub() . '</td>';
355
+                echo "<td class='head' align='center'>".$itemsObj[$i]->getVar('itemid').'</td>';
356
+                echo "<td class='even' align='left'>".$categoryObj->getCategoryLink().'</td>';
357
+                echo "<td class='even' align='left'>".$itemsObj[$i]->getItemLink().'</td>';
358
+                echo "<td class='even' align='center'>".$itemsObj[$i]->datesub().'</td>';
359 359
                 echo "<td class='even' align='center'> $clone $modify $delete </td>";
360 360
                 echo '</tr>';
361 361
             }
362 362
         } else {
363 363
             $itemid = 0;
364 364
             echo '<tr>';
365
-            echo "<td class='head' align='center' colspan= '7'>" . _AM_PUBLISHER_NOITEMS_REJECTED . '</td>';
365
+            echo "<td class='head' align='center' colspan= '7'>"._AM_PUBLISHER_NOITEMS_REJECTED.'</td>';
366 366
             echo '</tr>';
367 367
         }
368 368
         echo "</table>\n";
369 369
         echo "<br>\n";
370 370
 
371 371
         $pagenav = new XoopsPageNav($totalitems, $helper->getConfig('idxcat_perpage'), $rejectedstartitem, 'rejectedstartitem');
372
-        echo '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>';
372
+        echo '<div style="text-align:right;">'.$pagenav->renderNav().'</div>';
373 373
 
374 374
         Publisher\Utils::closeCollapsableBar('Rejecteditemstable', 'rejecteditemsicon');
375 375
         break;
@@ -448,7 +448,7 @@  discard block
 block discarded – undo
448 448
 
449 449
         if (!$clone) {
450 450
             echo '<form><div style="margin-bottom: 10px;">';
451
-            echo "<input type='button' name='button' onclick=\"location='item.php?op=clone&itemid=" . $itemObj->getVar('itemid') . "'\" value='" . _AM_PUBLISHER_CLONE_ITEM . "'>&nbsp;&nbsp;";
451
+            echo "<input type='button' name='button' onclick=\"location='item.php?op=clone&itemid=".$itemObj->getVar('itemid')."'\" value='"._AM_PUBLISHER_CLONE_ITEM."'>&nbsp;&nbsp;";
452 452
             echo '</div></form>';
453 453
         }
454 454
     } else {
@@ -479,15 +479,15 @@  discard block
 block discarded – undo
479 479
     $dir = Publisher\Utils::getUploadDir(true, 'content');
480 480
 
481 481
     if (false === mb_strpos(decoct(fileperms($dir)), '777')) {
482
-        echo '<span style="color: FF0000; "><h4>' . _AM_PUBLISHER_PERMERROR . '</h4></span>';
482
+        echo '<span style="color: FF0000; "><h4>'._AM_PUBLISHER_PERMERROR.'</h4></span>';
483 483
     }
484 484
 
485 485
     // Upload File
486 486
     echo "<form name='form_name2' id='form_name2' action='pw_upload_file.php' method='post' enctype='multipart/form-data'>";
487 487
     echo "<table cellspacing='1' width='100%' class='outer'>";
488
-    echo "<tr><th colspan='2'>" . _AM_PUBLISHER_UPLOAD_FILE . '</th></tr>';
489
-    echo "<tr valign='top' align='left'><td class='head'>" . _AM_PUBLISHER_SEARCH_PW . "</td><td class='even'><input type='file' name='fileupload' id='fileupload' size='30'></td></tr>";
490
-    echo "<tr valign='top' align='left'><td class='head'><input type='hidden' name='MAX_FILE_SIZE' id='op' value='500000'></td><td class='even'><input type='submit' name='submit' value='" . _AM_PUBLISHER_UPLOAD . "'></td></tr>";
488
+    echo "<tr><th colspan='2'>"._AM_PUBLISHER_UPLOAD_FILE.'</th></tr>';
489
+    echo "<tr valign='top' align='left'><td class='head'>"._AM_PUBLISHER_SEARCH_PW."</td><td class='even'><input type='file' name='fileupload' id='fileupload' size='30'></td></tr>";
490
+    echo "<tr valign='top' align='left'><td class='head'><input type='hidden' name='MAX_FILE_SIZE' id='op' value='500000'></td><td class='even'><input type='submit' name='submit' value='"._AM_PUBLISHER_UPLOAD."'></td></tr>";
491 491
     echo "<input type='hidden' name='backto' value='$publisher_current_page'>";
492 492
     echo '</table>';
493 493
     echo '</form>';
Please login to merge, or discard this patch.
htdocs/modules/publisher/admin/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
  */
22 22
 use Xoops\Module\Admin;
23 23
 
24
-require_once __DIR__ . '/admin_header.php';
24
+require_once __DIR__.'/admin_header.php';
25 25
 
26 26
 $xoops = Xoops::getInstance();
27 27
 $xoops->header();
Please login to merge, or discard this patch.
htdocs/modules/publisher/admin/main.php 2 patches
Indentation   +130 added lines, -130 removed lines patch added patch discarded remove patch
@@ -223,140 +223,140 @@  discard block
 block discarded – undo
223 223
             case _PUBLISHER_STATUS_SUBMITTED:
224 224
                 $statustxt = _CO_PUBLISHER_SUBMITTED;
225 225
                 $approve = "<a href='item.php?op=mod&itemid="
226
-                             . $itemsObj[$i]->getVar('itemid')
227
-                             . "'><img src='"
228
-                             . XoopsBaseConfig::get('url')
229
-                             . '/modules/'
230
-                             . $helper->getModule()->dirname()
231
-                             . "/images/links/approve.gif' title='"
232
-                             . _AM_PUBLISHER_SUBMISSION_MODERATE
233
-                             . "' alt='"
234
-                             . _AM_PUBLISHER_SUBMISSION_MODERATE
235
-                             . "'></a>&nbsp;";
226
+                                . $itemsObj[$i]->getVar('itemid')
227
+                                . "'><img src='"
228
+                                . XoopsBaseConfig::get('url')
229
+                                . '/modules/'
230
+                                . $helper->getModule()->dirname()
231
+                                . "/images/links/approve.gif' title='"
232
+                                . _AM_PUBLISHER_SUBMISSION_MODERATE
233
+                                . "' alt='"
234
+                                . _AM_PUBLISHER_SUBMISSION_MODERATE
235
+                                . "'></a>&nbsp;";
236 236
                 $clone = '';
237 237
                 $delete = "<a href='item.php?op=del&itemid="
238
-                             . $itemsObj[$i]->getVar('itemid')
239
-                             . "'><img src='"
240
-                             . XoopsBaseConfig::get('url')
241
-                             . '/modules/'
242
-                             . $helper->getModule()->dirname()
243
-                             . "/images/links/delete.png' title='"
244
-                             . _AM_PUBLISHER_DELETEITEM
245
-                             . "' alt='"
246
-                             . _AM_PUBLISHER_DELETEITEM
247
-                             . "'></a>";
238
+                                . $itemsObj[$i]->getVar('itemid')
239
+                                . "'><img src='"
240
+                                . XoopsBaseConfig::get('url')
241
+                                . '/modules/'
242
+                                . $helper->getModule()->dirname()
243
+                                . "/images/links/delete.png' title='"
244
+                                . _AM_PUBLISHER_DELETEITEM
245
+                                . "' alt='"
246
+                                . _AM_PUBLISHER_DELETEITEM
247
+                                . "'></a>";
248 248
                 $modify = '';
249 249
                 break;
250 250
             case _PUBLISHER_STATUS_PUBLISHED:
251 251
                 $statustxt = _CO_PUBLISHER_PUBLISHED;
252 252
                 $approve = '';
253 253
                 $clone = "<a href='item.php?op=clone&itemid="
254
-                             . $itemsObj[$i]->getVar('itemid')
255
-                             . "'><img src='"
256
-                             . XoopsBaseConfig::get('url')
257
-                             . '/modules/'
258
-                             . $helper->getModule()->dirname()
259
-                             . "/images/links/clone.gif' title='"
260
-                             . _AM_PUBLISHER_CLONE_ITEM
261
-                             . "' alt='"
262
-                             . _AM_PUBLISHER_CLONE_ITEM
263
-                             . "'></a>&nbsp;";
254
+                                . $itemsObj[$i]->getVar('itemid')
255
+                                . "'><img src='"
256
+                                . XoopsBaseConfig::get('url')
257
+                                . '/modules/'
258
+                                . $helper->getModule()->dirname()
259
+                                . "/images/links/clone.gif' title='"
260
+                                . _AM_PUBLISHER_CLONE_ITEM
261
+                                . "' alt='"
262
+                                . _AM_PUBLISHER_CLONE_ITEM
263
+                                . "'></a>&nbsp;";
264 264
                 $modify = "<a href='item.php?op=mod&itemid="
265
-                             . $itemsObj[$i]->getVar('itemid')
266
-                             . "'><img src='"
267
-                             . XoopsBaseConfig::get('url')
268
-                             . '/modules/'
269
-                             . $helper->getModule()->dirname()
270
-                             . "/images/links/edit.gif' title='"
271
-                             . _AM_PUBLISHER_ITEM_EDIT
272
-                             . "' alt='"
273
-                             . _AM_PUBLISHER_ITEM_EDIT
274
-                             . "'></a>&nbsp;";
265
+                                . $itemsObj[$i]->getVar('itemid')
266
+                                . "'><img src='"
267
+                                . XoopsBaseConfig::get('url')
268
+                                . '/modules/'
269
+                                . $helper->getModule()->dirname()
270
+                                . "/images/links/edit.gif' title='"
271
+                                . _AM_PUBLISHER_ITEM_EDIT
272
+                                . "' alt='"
273
+                                . _AM_PUBLISHER_ITEM_EDIT
274
+                                . "'></a>&nbsp;";
275 275
                 $delete = "<a href='item.php?op=del&itemid="
276
-                             . $itemsObj[$i]->getVar('itemid')
277
-                             . "'><img src='"
278
-                             . XoopsBaseConfig::get('url')
279
-                             . '/modules/'
280
-                             . $helper->getModule()->dirname()
281
-                             . "/images/links/delete.png' title='"
282
-                             . _AM_PUBLISHER_DELETEITEM
283
-                             . "' alt='"
284
-                             . _AM_PUBLISHER_DELETEITEM
285
-                             . "'></a>";
276
+                                . $itemsObj[$i]->getVar('itemid')
277
+                                . "'><img src='"
278
+                                . XoopsBaseConfig::get('url')
279
+                                . '/modules/'
280
+                                . $helper->getModule()->dirname()
281
+                                . "/images/links/delete.png' title='"
282
+                                . _AM_PUBLISHER_DELETEITEM
283
+                                . "' alt='"
284
+                                . _AM_PUBLISHER_DELETEITEM
285
+                                . "'></a>";
286 286
                 break;
287 287
             case _PUBLISHER_STATUS_OFFLINE:
288 288
                 $statustxt = _CO_PUBLISHER_OFFLINE;
289 289
                 $approve = '';
290 290
                 $clone = "<a href='item.php?op=clone&itemid="
291
-                             . $itemsObj[$i]->getVar('itemid')
292
-                             . "'><img src='"
293
-                             . XoopsBaseConfig::get('url')
294
-                             . '/modules/'
295
-                             . $helper->getModule()->dirname()
296
-                             . "/images/links/clone.gif' title='"
297
-                             . _AM_PUBLISHER_CLONE_ITEM
298
-                             . "' alt='"
299
-                             . _AM_PUBLISHER_CLONE_ITEM
300
-                             . "'></a>&nbsp;";
291
+                                . $itemsObj[$i]->getVar('itemid')
292
+                                . "'><img src='"
293
+                                . XoopsBaseConfig::get('url')
294
+                                . '/modules/'
295
+                                . $helper->getModule()->dirname()
296
+                                . "/images/links/clone.gif' title='"
297
+                                . _AM_PUBLISHER_CLONE_ITEM
298
+                                . "' alt='"
299
+                                . _AM_PUBLISHER_CLONE_ITEM
300
+                                . "'></a>&nbsp;";
301 301
                 $modify = "<a href='item.php?op=mod&itemid="
302
-                             . $itemsObj[$i]->getVar('itemid')
303
-                             . "'><img src='"
304
-                             . XoopsBaseConfig::get('url')
305
-                             . '/modules/'
306
-                             . $helper->getModule()->dirname()
307
-                             . "/images/links/edit.gif' title='"
308
-                             . _AM_PUBLISHER_ITEM_EDIT
309
-                             . "' alt='"
310
-                             . _AM_PUBLISHER_ITEM_EDIT
311
-                             . "'></a>&nbsp;";
302
+                                . $itemsObj[$i]->getVar('itemid')
303
+                                . "'><img src='"
304
+                                . XoopsBaseConfig::get('url')
305
+                                . '/modules/'
306
+                                . $helper->getModule()->dirname()
307
+                                . "/images/links/edit.gif' title='"
308
+                                . _AM_PUBLISHER_ITEM_EDIT
309
+                                . "' alt='"
310
+                                . _AM_PUBLISHER_ITEM_EDIT
311
+                                . "'></a>&nbsp;";
312 312
                 $delete = "<a href='item.php?op=del&itemid="
313
-                             . $itemsObj[$i]->getVar('itemid')
314
-                             . "'><img src='"
315
-                             . XoopsBaseConfig::get('url')
316
-                             . '/modules/'
317
-                             . $helper->getModule()->dirname()
318
-                             . "/images/links/delete.png' title='"
319
-                             . _AM_PUBLISHER_DELETEITEM
320
-                             . "' alt='"
321
-                             . _AM_PUBLISHER_DELETEITEM
322
-                             . "'></a>";
313
+                                . $itemsObj[$i]->getVar('itemid')
314
+                                . "'><img src='"
315
+                                . XoopsBaseConfig::get('url')
316
+                                . '/modules/'
317
+                                . $helper->getModule()->dirname()
318
+                                . "/images/links/delete.png' title='"
319
+                                . _AM_PUBLISHER_DELETEITEM
320
+                                . "' alt='"
321
+                                . _AM_PUBLISHER_DELETEITEM
322
+                                . "'></a>";
323 323
                 break;
324 324
             case _PUBLISHER_STATUS_REJECTED:
325 325
                 $statustxt = _CO_PUBLISHER_REJECTED;
326 326
                 $approve = '';
327 327
                 $clone = "<a href='item.php?op=clone&itemid="
328
-                             . $itemsObj[$i]->getVar('itemid')
329
-                             . "'><img src='"
330
-                             . XoopsBaseConfig::get('url')
331
-                             . '/modules/'
332
-                             . $helper->getModule()->dirname()
333
-                             . "/images/links/clone.gif' title='"
334
-                             . _AM_PUBLISHER_CLONE_ITEM
335
-                             . "' alt='"
336
-                             . _AM_PUBLISHER_CLONE_ITEM
337
-                             . "'></a>&nbsp;";
328
+                                . $itemsObj[$i]->getVar('itemid')
329
+                                . "'><img src='"
330
+                                . XoopsBaseConfig::get('url')
331
+                                . '/modules/'
332
+                                . $helper->getModule()->dirname()
333
+                                . "/images/links/clone.gif' title='"
334
+                                . _AM_PUBLISHER_CLONE_ITEM
335
+                                . "' alt='"
336
+                                . _AM_PUBLISHER_CLONE_ITEM
337
+                                . "'></a>&nbsp;";
338 338
                 $modify = "<a href='item.php?op=mod&itemid="
339
-                             . $itemsObj[$i]->getVar('itemid')
340
-                             . "'><img src='"
341
-                             . XoopsBaseConfig::get('url')
342
-                             . '/modules/'
343
-                             . $helper->getModule()->dirname()
344
-                             . "/images/links/edit.gif' title='"
345
-                             . _AM_PUBLISHER_REJECTED_EDIT
346
-                             . "' alt='"
347
-                             . _AM_PUBLISHER_REJECTED_EDIT
348
-                             . "'></a>&nbsp;";
339
+                                . $itemsObj[$i]->getVar('itemid')
340
+                                . "'><img src='"
341
+                                . XoopsBaseConfig::get('url')
342
+                                . '/modules/'
343
+                                . $helper->getModule()->dirname()
344
+                                . "/images/links/edit.gif' title='"
345
+                                . _AM_PUBLISHER_REJECTED_EDIT
346
+                                . "' alt='"
347
+                                . _AM_PUBLISHER_REJECTED_EDIT
348
+                                . "'></a>&nbsp;";
349 349
                 $delete = "<a href='item.php?op=del&itemid="
350
-                             . $itemsObj[$i]->getVar('itemid')
351
-                             . "'><img src='"
352
-                             . XoopsBaseConfig::get('url')
353
-                             . '/modules/'
354
-                             . $helper->getModule()->dirname()
355
-                             . "/images/links/delete.png' title='"
356
-                             . _AM_PUBLISHER_DELETEITEM
357
-                             . "' alt='"
358
-                             . _AM_PUBLISHER_DELETEITEM
359
-                             . "'></a>";
350
+                                . $itemsObj[$i]->getVar('itemid')
351
+                                . "'><img src='"
352
+                                . XoopsBaseConfig::get('url')
353
+                                . '/modules/'
354
+                                . $helper->getModule()->dirname()
355
+                                . "/images/links/delete.png' title='"
356
+                                . _AM_PUBLISHER_DELETEITEM
357
+                                . "' alt='"
358
+                                . _AM_PUBLISHER_DELETEITEM
359
+                                . "'></a>";
360 360
                 break;
361 361
             case 'default':
362 362
             default:
@@ -364,27 +364,27 @@  discard block
 block discarded – undo
364 364
                 $approve = '';
365 365
                 $clone = '';
366 366
                 $modify = "<a href='item.php?op=mod&itemid="
367
-                             . $itemsObj[$i]->getVar('itemid')
368
-                             . "'><img src='"
369
-                             . XoopsBaseConfig::get('url')
370
-                             . '/modules/'
371
-                             . $helper->getModule()->dirname()
372
-                             . "/images/links/edit.gif' title='"
373
-                             . _AM_PUBLISHER_REJECTED_EDIT
374
-                             . "' alt='"
375
-                             . _AM_PUBLISHER_REJECTED_EDIT
376
-                             . "'></a>&nbsp;";
367
+                                . $itemsObj[$i]->getVar('itemid')
368
+                                . "'><img src='"
369
+                                . XoopsBaseConfig::get('url')
370
+                                . '/modules/'
371
+                                . $helper->getModule()->dirname()
372
+                                . "/images/links/edit.gif' title='"
373
+                                . _AM_PUBLISHER_REJECTED_EDIT
374
+                                . "' alt='"
375
+                                . _AM_PUBLISHER_REJECTED_EDIT
376
+                                . "'></a>&nbsp;";
377 377
                 $delete = "<a href='item.php?op=del&itemid="
378
-                             . $itemsObj[$i]->getVar('itemid')
379
-                             . "'><img src='"
380
-                             . XoopsBaseConfig::get('url')
381
-                             . '/modules/'
382
-                             . $helper->getModule()->dirname()
383
-                             . "/images/links/delete.png' title='"
384
-                             . _AM_PUBLISHER_DELETEITEM
385
-                             . "' alt='"
386
-                             . _AM_PUBLISHER_DELETEITEM
387
-                             . "'></a>";
378
+                                . $itemsObj[$i]->getVar('itemid')
379
+                                . "'><img src='"
380
+                                . XoopsBaseConfig::get('url')
381
+                                . '/modules/'
382
+                                . $helper->getModule()->dirname()
383
+                                . "/images/links/delete.png' title='"
384
+                                . _AM_PUBLISHER_DELETEITEM
385
+                                . "' alt='"
386
+                                . _AM_PUBLISHER_DELETEITEM
387
+                                . "'></a>";
388 388
                 break;
389 389
         }
390 390
 
Please login to merge, or discard this patch.
Spacing   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
  */
21 21
 use XoopsModules\Publisher;
22 22
 
23
-require_once __DIR__ . '/admin_header.php';
23
+require_once __DIR__.'/admin_header.php';
24 24
 
25 25
 $xoops = Xoops::getInstance();
26 26
 
@@ -79,16 +79,16 @@  discard block
 block discarded – undo
79 79
 Publisher\Utils::openCollapsableBar('inventorytable', 'inventoryicon', _AM_PUBLISHER_INVENTORY);
80 80
 echo '<br>';
81 81
 echo "<table width='100%' class='outer' cellspacing='1' cellpadding='3' border='0' ><tr>";
82
-echo "<td class='head'>" . _AM_PUBLISHER_TOTALCAT . "</td><td align='center' class='even'>" . $totalcategories . '</td>';
83
-echo "<td class='head'>" . _AM_PUBLISHER_TOTALSUBMITTED . "</td><td align='center' class='even'>" . $totalsubmitted . '</td>';
84
-echo "<td class='head'>" . _AM_PUBLISHER_TOTALPUBLISHED . "</td><td align='center' class='even'>" . $totalpublished . '</td>';
85
-echo "<td class='head'>" . _AM_PUBLISHER_TOTAL_OFFLINE . "</td><td align='center' class='even'>" . $totaloffline . '</td>';
82
+echo "<td class='head'>"._AM_PUBLISHER_TOTALCAT."</td><td align='center' class='even'>".$totalcategories.'</td>';
83
+echo "<td class='head'>"._AM_PUBLISHER_TOTALSUBMITTED."</td><td align='center' class='even'>".$totalsubmitted.'</td>';
84
+echo "<td class='head'>"._AM_PUBLISHER_TOTALPUBLISHED."</td><td align='center' class='even'>".$totalpublished.'</td>';
85
+echo "<td class='head'>"._AM_PUBLISHER_TOTAL_OFFLINE."</td><td align='center' class='even'>".$totaloffline.'</td>';
86 86
 echo '</tr></table>';
87 87
 echo '<br>';
88 88
 
89 89
 echo '<form><div style="margin-bottom: 12px;">';
90
-echo "<input type='button' name='button' onclick=\"location='category.php?op=mod'\" value='" . _AM_PUBLISHER_CATEGORY_CREATE . "'>&nbsp;&nbsp;";
91
-echo "<input type='button' name='button' onclick=\"location='item.php?op=mod'\" value='" . _AM_PUBLISHER_CREATEITEM . "'>&nbsp;&nbsp;";
90
+echo "<input type='button' name='button' onclick=\"location='category.php?op=mod'\" value='"._AM_PUBLISHER_CATEGORY_CREATE."'>&nbsp;&nbsp;";
91
+echo "<input type='button' name='button' onclick=\"location='item.php?op=mod'\" value='"._AM_PUBLISHER_CREATEITEM."'>&nbsp;&nbsp;";
92 92
 echo '</div></form>';
93 93
 
94 94
 Publisher\Utils::closeCollapsableBar('inventorytable', 'inventoryicon');
@@ -147,54 +147,54 @@  discard block
 block discarded – undo
147 147
     case _PUBLISHER_STATUS_SUBMITTED:
148 148
         $selectedtxt1 = "selected='selected'";
149 149
         $caption = _CO_PUBLISHER_SUBMITTED;
150
-        $cond = ' WHERE status = ' . _PUBLISHER_STATUS_SUBMITTED . ' ';
150
+        $cond = ' WHERE status = '._PUBLISHER_STATUS_SUBMITTED.' ';
151 151
         $status_explaination = _AM_PUBLISHER_SUBMITTED_EXP;
152 152
         break;
153 153
     case _PUBLISHER_STATUS_PUBLISHED:
154 154
         $selectedtxt2 = "selected='selected'";
155 155
         $caption = _CO_PUBLISHER_PUBLISHED;
156
-        $cond = ' WHERE status = ' . _PUBLISHER_STATUS_PUBLISHED . ' ';
156
+        $cond = ' WHERE status = '._PUBLISHER_STATUS_PUBLISHED.' ';
157 157
         $status_explaination = _AM_PUBLISHER_PUBLISHED_EXP;
158 158
         break;
159 159
     case _PUBLISHER_STATUS_OFFLINE:
160 160
         $selectedtxt3 = "selected='selected'";
161 161
         $caption = _CO_PUBLISHER_OFFLINE;
162
-        $cond = ' WHERE status = ' . _PUBLISHER_STATUS_OFFLINE . ' ';
162
+        $cond = ' WHERE status = '._PUBLISHER_STATUS_OFFLINE.' ';
163 163
         $status_explaination = _AM_PUBLISHER_OFFLINE_EXP;
164 164
         break;
165 165
     case _PUBLISHER_STATUS_REJECTED:
166 166
         $selectedtxt4 = "selected='selected'";
167 167
         $caption = _CO_PUBLISHER_REJECTED;
168
-        $cond = ' WHERE status = ' . _PUBLISHER_STATUS_REJECTED . ' ';
168
+        $cond = ' WHERE status = '._PUBLISHER_STATUS_REJECTED.' ';
169 169
         $status_explaination = _AM_PUBLISHER_REJECTED_ITEM_EXP;
170 170
         break;
171 171
 }
172 172
 
173 173
 /* -- Code to show selected terms -- */
174
-echo "<form name='pick' id='pick' action='" . $_SERVER['PHP_SELF'] . "' method='POST' style='margin: 0;'>";
174
+echo "<form name='pick' id='pick' action='".$_SERVER['PHP_SELF']."' method='POST' style='margin: 0;'>";
175 175
 
176 176
 echo "
177 177
     <table width='100%' cellspacing='1' cellpadding='2' border='0' style='border-left: 1px solid #c0c0c0; border-top: 1px solid #c0c0c0; border-right: 1px solid #c0c0c0;'>
178 178
         <tr>
179
-            <td><span style='font-weight: bold; font-variant: small-caps;'>" . _AM_PUBLISHER_SHOWING . ' ' . $caption . "</span></td>
180
-            <td align='right'>" . _AM_PUBLISHER_SELECT_SORT . "
179
+            <td><span style='font-weight: bold; font-variant: small-caps;'>" . _AM_PUBLISHER_SHOWING.' '.$caption."</span></td>
180
+            <td align='right'>" . _AM_PUBLISHER_SELECT_SORT."
181 181
                 <select name='sortsel' onchange='submit()'>
182
-                    <option value='itemid' $sorttxtitemid>" . _AM_PUBLISHER_ID . "</option>
183
-                    <option value='title' $sorttxttitle>" . _AM_PUBLISHER_TITLE . "</option>
184
-                    <option value='datesub' $sorttxtcreated>" . _AM_PUBLISHER_CREATED . "</option>
185
-                    <option value='weight' $sorttxtweight>" . _CO_PUBLISHER_WEIGHT . "</option>
182
+                    <option value='itemid' $sorttxtitemid>"._AM_PUBLISHER_ID."</option>
183
+                    <option value='title' $sorttxttitle>"._AM_PUBLISHER_TITLE."</option>
184
+                    <option value='datesub' $sorttxtcreated>"._AM_PUBLISHER_CREATED."</option>
185
+                    <option value='weight' $sorttxtweight>"._CO_PUBLISHER_WEIGHT."</option>
186 186
                 </select>
187 187
                 <select name='ordersel' onchange='submit()'>
188
-                    <option value='ASC' $ordertxtasc>" . _AM_PUBLISHER_ASC . "</option>
189
-                    <option value='DESC' $ordertxtdesc>" . _AM_PUBLISHER_DESC . '</option>
188
+                    <option value='ASC' $ordertxtasc>"._AM_PUBLISHER_ASC."</option>
189
+                    <option value='DESC' $ordertxtdesc>"._AM_PUBLISHER_DESC.'</option>
190 190
                 </select>
191
-            ' . _AM_PUBLISHER_SELECT_STATUS . " :
191
+            ' . _AM_PUBLISHER_SELECT_STATUS." :
192 192
                 <select name='statussel' onchange='submit()'>
193
-                    <option value='0' $selectedtxt0>" . _AM_PUBLISHER_ALL . " [$totalitems]</option>
194
-                    <option value='1' $selectedtxt1>" . _CO_PUBLISHER_SUBMITTED . " [$totalsubmitted]</option>
195
-                    <option value='2' $selectedtxt2>" . _CO_PUBLISHER_PUBLISHED . " [$totalpublished]</option>
196
-                    <option value='3' $selectedtxt3>" . _CO_PUBLISHER_OFFLINE . " [$totaloffline]</option>
197
-                    <option value='4' $selectedtxt4>" . _CO_PUBLISHER_REJECTED . " [$totalrejected]</option>
193
+                    <option value='0' $selectedtxt0>"._AM_PUBLISHER_ALL." [$totalitems]</option>
194
+                    <option value='1' $selectedtxt1>"._CO_PUBLISHER_SUBMITTED." [$totalsubmitted]</option>
195
+                    <option value='2' $selectedtxt2>"._CO_PUBLISHER_PUBLISHED." [$totalpublished]</option>
196
+                    <option value='3' $selectedtxt3>"._CO_PUBLISHER_OFFLINE." [$totaloffline]</option>
197
+                    <option value='4' $selectedtxt4>"._CO_PUBLISHER_REJECTED." [$totalrejected]</option>
198 198
                 </select>
199 199
             </td>
200 200
         </tr>
@@ -389,18 +389,18 @@  discard block
 block discarded – undo
389 389
         }
390 390
 
391 391
         echo '<tr>';
392
-        echo "<td class='head' align='center'>" . $itemsObj[$i]->getVar('itemid') . '</td>';
393
-        echo "<td class='even' align='left'>" . $categoryObj->getCategoryLink() . '</td>';
394
-        echo "<td class='even' align='left'>" . $itemsObj[$i]->getItemLink() . '</td>';
395
-        echo "<td class='even' align='center'>" . $itemsObj[$i]->datesub() . '</td>';
396
-        echo "<td class='even' align='center'>" . $statustxt . '</td>';
397
-        echo "<td class='even' align='center'> " . $approve . $clone . $modify . $delete . '</td>';
392
+        echo "<td class='head' align='center'>".$itemsObj[$i]->getVar('itemid').'</td>';
393
+        echo "<td class='even' align='left'>".$categoryObj->getCategoryLink().'</td>';
394
+        echo "<td class='even' align='left'>".$itemsObj[$i]->getItemLink().'</td>';
395
+        echo "<td class='even' align='center'>".$itemsObj[$i]->datesub().'</td>';
396
+        echo "<td class='even' align='center'>".$statustxt.'</td>';
397
+        echo "<td class='even' align='center'> ".$approve.$clone.$modify.$delete.'</td>';
398 398
         echo '</tr>';
399 399
     }
400 400
 } else {
401 401
     // that is, $numrows = 0, there's no entries yet
402 402
     echo '<tr>';
403
-    echo "<td class='head' align='center' colspan= '7'>" . _AM_PUBLISHER_NOITEMSSEL . '</td>';
403
+    echo "<td class='head' align='center' colspan= '7'>"._AM_PUBLISHER_NOITEMSSEL.'</td>';
404 404
     echo '</tr>';
405 405
 }
406 406
 echo "</table>\n";
@@ -408,9 +408,9 @@  discard block
 block discarded – undo
408 408
 $pagenav = new XoopsPageNav($numrows, $helper->getConfig('idxcat_perpage'), $startentry, 'startentry', "statussel=$statussel&amp;sortsel=$sortsel&amp;ordersel=$ordersel");
409 409
 
410 410
 if (1 == $helper->getConfig('format_image_nav')) {
411
-    echo '<div style="text-align:right; background-color: #ffffff; margin: 10px 0;">' . $pagenav->renderImageNav() . '</div>';
411
+    echo '<div style="text-align:right; background-color: #ffffff; margin: 10px 0;">'.$pagenav->renderImageNav().'</div>';
412 412
 } else {
413
-    echo '<div style="text-align:right; background-color: #ffffff; margin: 10px 0;">' . $pagenav->renderNav() . '</div>';
413
+    echo '<div style="text-align:right; background-color: #ffffff; margin: 10px 0;">'.$pagenav->renderNav().'</div>';
414 414
 }
415 415
 // ENDs code to show active entries
416 416
 Publisher\Utils::closeCollapsableBar('allitemstable', 'allitemsicon');
@@ -436,8 +436,8 @@  discard block
 block discarded – undo
436 436
         $res = Publisher\Utils::mkdir($thePath);
437 437
 
438 438
         if ($res) {
439
-            $source = PUBLISHER_ROOT_PATH . '/images/blank.png';
440
-            $dest = $thePath . 'blank.png';
439
+            $source = PUBLISHER_ROOT_PATH.'/images/blank.png';
440
+            $dest = $thePath.'blank.png';
441 441
             Publisher\Utils::copyr($source, $dest);
442 442
         }
443 443
         $msg = $res ? _AM_PUBLISHER_DIRCREATED : _AM_PUBLISHER_DIRNOTCREATED;
@@ -448,8 +448,8 @@  discard block
 block discarded – undo
448 448
         $res = Publisher\Utils::mkdir($thePath);
449 449
 
450 450
         if ($res) {
451
-            $source = PUBLISHER_ROOT_PATH . '/images/blank.png';
452
-            $dest = $thePath . 'blank.png';
451
+            $source = PUBLISHER_ROOT_PATH.'/images/blank.png';
452
+            $dest = $thePath.'blank.png';
453 453
             Publisher\Utils::copyr($source, $dest);
454 454
         }
455 455
         $msg = $res ? _AM_PUBLISHER_DIRCREATED : _AM_PUBLISHER_DIRNOTCREATED;
@@ -460,8 +460,8 @@  discard block
 block discarded – undo
460 460
         $res = Publisher\Utils::mkdir($thePath);
461 461
 
462 462
         if ($res) {
463
-            $source = PUBLISHER_ROOT_PATH . '/images/blank.png';
464
-            $dest = $thePath . 'blank.png';
463
+            $source = PUBLISHER_ROOT_PATH.'/images/blank.png';
464
+            $dest = $thePath.'blank.png';
465 465
             Publisher\Utils::copyr($source, $dest);
466 466
         }
467 467
         $msg = $res ? _AM_PUBLISHER_DIRCREATED : _AM_PUBLISHER_DIRNOTCREATED;
@@ -478,11 +478,11 @@  discard block
 block discarded – undo
478 478
 {
479 479
     echo "<table width='100%' cellspacing='1' cellpadding='3' border='0' class='outer'>";
480 480
     echo '<tr>';
481
-    echo "<td width='40px' class='bg3' align='center'><strong>" . _AM_PUBLISHER_ITEMID . '</strong></td>';
482
-    echo "<td width='100px' class='bg3' align='center'><strong>" . _AM_PUBLISHER_ITEMCAT . '</strong></td>';
483
-    echo "<td class='bg3' align='center'><strong>" . _AM_PUBLISHER_TITLE . '</strong></td>';
484
-    echo "<td width='90px' class='bg3' align='center'><strong>" . _AM_PUBLISHER_CREATED . '</strong></td>';
485
-    echo "<td width='90px' class='bg3' align='center'><strong>" . _CO_PUBLISHER_STATUS . '</strong></td>';
486
-    echo "<td width='90px' class='bg3' align='center'><strong>" . _AM_PUBLISHER_ACTION . '</strong></td>';
481
+    echo "<td width='40px' class='bg3' align='center'><strong>"._AM_PUBLISHER_ITEMID.'</strong></td>';
482
+    echo "<td width='100px' class='bg3' align='center'><strong>"._AM_PUBLISHER_ITEMCAT.'</strong></td>';
483
+    echo "<td class='bg3' align='center'><strong>"._AM_PUBLISHER_TITLE.'</strong></td>';
484
+    echo "<td width='90px' class='bg3' align='center'><strong>"._AM_PUBLISHER_CREATED.'</strong></td>';
485
+    echo "<td width='90px' class='bg3' align='center'><strong>"._CO_PUBLISHER_STATUS.'</strong></td>';
486
+    echo "<td width='90px' class='bg3' align='center'><strong>"._AM_PUBLISHER_ACTION.'</strong></td>';
487 487
     echo '</tr>';
488 488
 }
Please login to merge, or discard this patch.
htdocs/modules/publisher/admin/file.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
  * @author          The SmartFactory <www.smartfactory.ca>
24 24
  * @version         $Id$
25 25
  */
26
-require_once __DIR__ . '/admin_header.php';
26
+require_once __DIR__.'/admin_header.php';
27 27
 $xoops = Xoops::getInstance();
28 28
 
29 29
 $op = Request::getString('op');
@@ -53,8 +53,8 @@  discard block
 block discarded – undo
53 53
         }
54 54
 
55 55
         echo "<br>\n";
56
-        echo "<span style='color: #2F5376; font-weight: bold; font-size: 16px; margin: 6px 06 0 0; '>" . _AM_PUBLISHER_FILE_EDITING . '</span>';
57
-        echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">' . _AM_PUBLISHER_FILE_EDITING_DSC . '</span>';
56
+        echo "<span style='color: #2F5376; font-weight: bold; font-size: 16px; margin: 6px 06 0 0; '>"._AM_PUBLISHER_FILE_EDITING.'</span>';
57
+        echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">'._AM_PUBLISHER_FILE_EDITING_DSC.'</span>';
58 58
         Publisher\Utils::openCollapsableBar('editfile', 'editfileicon', _AM_PUBLISHER_FILE_INFORMATIONS);
59 59
     } else {
60 60
         // there's no parameter, so we're adding an item
@@ -63,8 +63,8 @@  discard block
 block discarded – undo
63 63
         if ($showmenu) {
64 64
             //publisher_adminMenu(2, _AM_PUBLISHER_FILE . " > " . _AM_PUBLISHER_FILE_ADD);
65 65
         }
66
-        echo "<span style='color: #2F5376; font-weight: bold; font-size: 16px; margin: 6px 06 0 0; '>" . _AM_PUBLISHER_FILE_ADDING . '</span>';
67
-        echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">' . _AM_PUBLISHER_FILE_ADDING_DSC . '</span>';
66
+        echo "<span style='color: #2F5376; font-weight: bold; font-size: 16px; margin: 6px 06 0 0; '>"._AM_PUBLISHER_FILE_ADDING.'</span>';
67
+        echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">'._AM_PUBLISHER_FILE_ADDING_DSC.'</span>';
68 68
         Publisher\Utils::openCollapsableBar('addfile', 'addfileicon', _AM_PUBLISHER_FILE_INFORMATIONS);
69 69
     }
70 70
 
@@ -119,11 +119,11 @@  discard block
 block discarded – undo
119 119
 
120 120
         // Storing the file
121 121
         if (!$fileObj->store()) {
122
-            $xoops->redirect('item.php?op=mod&itemid=' . $fileObj->getVar('itemid'), 3, _AM_PUBLISHER_FILE_EDITING_ERROR . Publisher\Utils::formatErrors($fileObj->getErrors()));
122
+            $xoops->redirect('item.php?op=mod&itemid='.$fileObj->getVar('itemid'), 3, _AM_PUBLISHER_FILE_EDITING_ERROR.Publisher\Utils::formatErrors($fileObj->getErrors()));
123 123
             exit;
124 124
         }
125 125
 
126
-        $xoops->redirect('item.php?op=mod&itemid=' . $fileObj->getVar('itemid'), 2, _AM_PUBLISHER_FILE_EDITING_SUCCESS);
126
+        $xoops->redirect('item.php?op=mod&itemid='.$fileObj->getVar('itemid'), 2, _AM_PUBLISHER_FILE_EDITING_SUCCESS);
127 127
         exit();
128 128
         break;
129 129
     case 'del':
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
             $fileid = isset($_GET['fileid']) ? (int)$_GET['fileid'] : 0;
147 147
 
148 148
             Publisher\Utils::cpHeader();
149
-            echo $xoops->confirm(['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);
149
+            echo $xoops->confirm(['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);
150 150
             $xoops->footer();
151 151
         }
152 152
         exit();
Please login to merge, or discard this patch.
htdocs/modules/publisher/admin/menu.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
 
22 22
 use XoopsModules\Publisher\Helper;
23 23
 
24
-require_once dirname(__DIR__) . '/include/common.php';
24
+require_once dirname(__DIR__).'/include/common.php';
25 25
 
26 26
 $helper = Helper::getInstance();
27 27
 $helper->loadLanguage('admin');
Please login to merge, or discard this patch.