Completed
Branch master (0b66f1)
by Michael
33:21
created
htdocs/modules/comments/admin/comment_post.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
  * @version         $Id$
18 18
  */
19 19
 
20
-include __DIR__ . '/header.php';
20
+include __DIR__.'/header.php';
21 21
 //there is no way to override current tabs when using system menu
22 22
 //this dirty hack will have to do it
23 23
 $_SERVER['REQUEST_URI'] = "admin/main.php";
Please login to merge, or discard this patch.
htdocs/modules/comments/admin/main.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
  * @version         $Id$
20 20
  */
21 21
 
22
-include __DIR__ . '/header.php';
22
+include __DIR__.'/header.php';
23 23
 
24 24
 // Get main instance
25 25
 $xoops = Xoops::getInstance();
@@ -38,9 +38,9 @@  discard block
 block discarded – undo
38 38
 $status_array =
39 39
     array(Comments::STATUS_PENDING => _MD_COMMENTS_PENDING, Comments::STATUS_ACTIVE => _MD_COMMENTS_ACTIVE, Comments::STATUS_HIDDEN => _MD_COMMENTS_HIDDEN);
40 40
 $status_array2 = array(
41
-    Comments::STATUS_PENDING => '<span style="text-decoration: none; font-weight: bold; color: #008000;">' . _MD_COMMENTS_PENDING . '</span>',
42
-    Comments::STATUS_ACTIVE => '<span style="text-decoration: none; font-weight: bold; color: #ff0000;">' . _MD_COMMENTS_ACTIVE . '</span>',
43
-    Comments::STATUS_HIDDEN => '<span style="text-decoration: none; font-weight: bold; color: #0000ff;">' . _MD_COMMENTS_HIDDEN . '</span>'
41
+    Comments::STATUS_PENDING => '<span style="text-decoration: none; font-weight: bold; color: #008000;">'._MD_COMMENTS_PENDING.'</span>',
42
+    Comments::STATUS_ACTIVE => '<span style="text-decoration: none; font-weight: bold; color: #ff0000;">'._MD_COMMENTS_ACTIVE.'</span>',
43
+    Comments::STATUS_HIDDEN => '<span style="text-decoration: none; font-weight: bold; color: #0000ff;">'._MD_COMMENTS_HIDDEN.'</span>'
44 44
 );
45 45
 $start = 0;
46 46
 $status_array[0] = _AM_COMMENTS_FORM_ALL_STATUS;
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 $module_handler = $xoops->getHandlerModule();
56 56
 $available_plugins = \Xoops\Module\Plugin::getPlugins('comments');
57 57
 if (!empty($available_plugins)) {
58
-    $criteria = new Criteria('dirname', "('" . implode("','", array_keys($available_plugins)).  "')", 'IN');
58
+    $criteria = new Criteria('dirname', "('".implode("','", array_keys($available_plugins))."')", 'IN');
59 59
     $module_array = $module_handler->getNameList($criteria);
60 60
 }
61 61
 
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
                 /* @var $plugin CommentsPluginInterface */
74 74
                 $module = $xoops->getModuleById($comment->getVar('modid'));
75 75
                 $plugin = Xoops\Module\Plugin::getPlugin($module->getVar('dirname'), 'comments');
76
-                header('Location: ' . \XoopsBaseConfig::get('url') . '/modules/' . $module->getVar('dirname') . '/' . $plugin->pageName() . '?' . $plugin->itemName() . '=' . $comment->getVar('itemid') . '&id=' . $comment->getVar('id') . '&rootid=' . $comment->getVar('rootid') . '&mode=thread&' . str_replace('&amp;', '&', $comment->getVar('exparams')) . '#comment' . $comment->getVar('id'));
76
+                header('Location: '.\XoopsBaseConfig::get('url').'/modules/'.$module->getVar('dirname').'/'.$plugin->pageName().'?'.$plugin->itemName().'='.$comment->getVar('itemid').'&id='.$comment->getVar('id').'&rootid='.$comment->getVar('rootid').'&mode=thread&'.str_replace('&amp;', '&', $comment->getVar('exparams')).'#comment'.$comment->getVar('id'));
77 77
                 exit();
78 78
             }
79 79
         }
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
         }
222 222
 
223 223
         $url = $helper->url('admin/main.php');
224
-        $form = '<form class="form-inline" action="' . $url . '" method="post">
224
+        $form = '<form class="form-inline" action="'.$url.'" method="post">
225 225
                 <select class="span2" name="comments_module">';
226 226
 
227 227
         foreach ($module_array as $k => $v) {
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
             if ($k == $module) {
230 230
                 $sel = ' selected="selected"';
231 231
             }
232
-            $form .= '<option value="' . $k . '"' . $sel . '>' . $v . '</option>';
232
+            $form .= '<option value="'.$k.'"'.$sel.'>'.$v.'</option>';
233 233
         }
234 234
         $form .= '</select>&nbsp;<select class="span2" name="comments_status">';
235 235
 
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
             if (isset($status) && $k == $status) {
239 239
                 $sel = ' selected="selected"';
240 240
             }
241
-            $form .= '<option value="' . $k . '"' . $sel . '>' . $v . '</option>';
241
+            $form .= '<option value="'.$k.'"'.$sel.'>'.$v.'</option>';
242 242
         }
243 243
 
244 244
 
@@ -248,12 +248,12 @@  discard block
 block discarded – undo
248 248
             if (isset($limit) && $k == $limit) {
249 249
                 $sel = ' selected="selected"';
250 250
             }
251
-            $form .= '<option value="' . $k . '"' . $sel . '>' . $k . '</option>';
251
+            $form .= '<option value="'.$k.'"'.$sel.'>'.$k.'</option>';
252 252
         }
253
-        $form .= '</select>&nbsp;<input class ="btn" type="submit" value="' . XoopsLocale::A_GO . '" name="selsubmit" /></form>';
253
+        $form .= '</select>&nbsp;<input class ="btn" type="submit" value="'.XoopsLocale::A_GO.'" name="selsubmit" /></form>';
254 254
 
255 255
         $xoops->tpl()->assign('form_sort', $form);
256
-        $xoops->tpl()->assign('php_selft', $_SERVER['PHP_SELF'] . '?op=comments_purge');
256
+        $xoops->tpl()->assign('php_selft', $_SERVER['PHP_SELF'].'?op=comments_purge');
257 257
 
258 258
         if ($comments_count > 0) {
259 259
             foreach (array_keys($comments_arr) as $i) {
@@ -262,18 +262,18 @@  discard block
 block discarded – undo
262 262
                 if ($comments_arr[$i]->getVar('uid') > 0) {
263 263
                     $poster = $member_handler->getUser($comments_arr[$i]->getVar('uid'));
264 264
                     if (is_object($poster)) {
265
-                        $comments_poster_uname = '<a href="' . \XoopsBaseConfig::get('url') . '/userinfo.php?uid=' . $comments_arr[$i]->getVar('uid') . '">' . $poster->getVar('uname') . '</a>';
265
+                        $comments_poster_uname = '<a href="'.\XoopsBaseConfig::get('url').'/userinfo.php?uid='.$comments_arr[$i]->getVar('uid').'">'.$poster->getVar('uname').'</a>';
266 266
                     }
267 267
                 }
268 268
 
269 269
                 $comments_icon = ($comments_arr[$i]->getVar('icon') == '') ? '/images/icons/no_posticon.gif'
270
-                    : '/images/subject/' . htmlspecialchars($comments_arr[$i]->getVar('icon'), ENT_QUOTES);
271
-                $comments_icon = '<img src="' . \XoopsBaseConfig::get('url') . $comments_icon . '" alt="" />';
270
+                    : '/images/subject/'.htmlspecialchars($comments_arr[$i]->getVar('icon'), ENT_QUOTES);
271
+                $comments_icon = '<img src="'.\XoopsBaseConfig::get('url').$comments_icon.'" alt="" />';
272 272
 
273 273
                 $comments['comments_id'] = $id;
274 274
                 $comments['comments_poster'] = $comments_poster_uname;
275 275
                 $comments['comments_icon'] = $comments_icon;
276
-                $comments['comments_title'] = '<a href="main.php?op=comments_jump&amp;item_id=' . $comments_arr[$i]->getVar("id") . '">' . $comments_arr[$i]->getVar("title")  . '</a>';
276
+                $comments['comments_title'] = '<a href="main.php?op=comments_jump&amp;item_id='.$comments_arr[$i]->getVar("id").'">'.$comments_arr[$i]->getVar("title").'</a>';
277 277
                 $comments['comments_ip'] = $comments_arr[$i]->getVar('ip');
278 278
                 $comments['comments_date'] = XoopsLocale::formatTimestamp($comments_arr[$i]->getVar('created'));
279 279
                 $comments['comments_text'] = $myts->undoHtmlSpecialChars($comments_arr[$i]->getVar('text'));
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
             }
289 289
 
290 290
             if ($comments_count > $comments_limit) {
291
-                $nav = new XoopsPageNav($comments_count, $comments_limit, $comments_start, 'comments_start', 'comments_module=' . $comments_module . '&amp;comments_status=' . $comments_status);
291
+                $nav = new XoopsPageNav($comments_count, $comments_limit, $comments_start, 'comments_start', 'comments_module='.$comments_module.'&amp;comments_status='.$comments_status);
292 292
                 $xoops->tpl()->assign('nav', $nav->renderNav());
293 293
             }
294 294
         }
Please login to merge, or discard this patch.
htdocs/modules/comments/admin/comment_edit.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
  * @version         $Id$
18 18
  */
19 19
 
20
-include __DIR__ . '/header.php';
20
+include __DIR__.'/header.php';
21 21
 //there is no way to override current tabs when using system menu
22 22
 //this dirty hack will have to do it
23 23
 $_SERVER['REQUEST_URI'] = "admin/main.php";
Please login to merge, or discard this patch.
htdocs/modules/comments/admin/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
  * @version         $Id$
18 18
  */
19 19
 
20
-include __DIR__ . '/header.php';
20
+include __DIR__.'/header.php';
21 21
 
22 22
 $xoops = Xoops::getInstance();
23 23
 $xoops->header();
Please login to merge, or discard this patch.
htdocs/modules/comments/admin/header.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,8 +18,8 @@
 block discarded – undo
18 18
  */
19 19
 
20 20
 
21
-include dirname(dirname(dirname(__DIR__))) . '/mainfile.php';
22
-require_once dirname(dirname(dirname(__DIR__))) . '/include/cp_header.php';
21
+include dirname(dirname(dirname(__DIR__))).'/mainfile.php';
22
+require_once dirname(dirname(dirname(__DIR__))).'/include/cp_header.php';
23 23
 
24 24
 $xoops = Xoops::getInstance();
25 25
 XoopsLoad::load('system', 'system');
Please login to merge, or discard this patch.
htdocs/modules/comments/comment_new.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,5 +18,5 @@
 block discarded – undo
18 18
  * @version         $Id$
19 19
  */
20 20
 
21
-include_once dirname(dirname(__DIR__)) . '/mainfile.php';
21
+include_once dirname(dirname(__DIR__)).'/mainfile.php';
22 22
 Comments::getInstance()->displayNew();
Please login to merge, or discard this patch.
htdocs/modules/comments/preloads/preload.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,8 +36,8 @@
 block discarded – undo
36 36
     {
37 37
         $path = dirname(__DIR__);
38 38
         XoopsLoad::addMap(array(
39
-            'comments'                => $path . '/class/helper.php',
40
-            'commentscommentrenderer' => $path . '/class/commentrenderer.php'
39
+            'comments'                => $path.'/class/helper.php',
40
+            'commentscommentrenderer' => $path.'/class/commentrenderer.php'
41 41
         ));
42 42
     }
43 43
 
Please login to merge, or discard this patch.
htdocs/modules/comments/language/english/main.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -55,6 +55,6 @@
 block discarded – undo
55 55
 define('_MD_COMMENTS_COMNOCOM', 'Disable comments');
56 56
 
57 57
 //For uninstall
58
-define("_MD_COMMENTS_DELETE","Deleting comments...");
59
-define("_MD_COMMENTS_DELETE_ERROR","ERROR: Could not delete comments");
60
-define("_MD_COMMENTS_DELETED","Comments deleted");
58
+define("_MD_COMMENTS_DELETE", "Deleting comments...");
59
+define("_MD_COMMENTS_DELETE_ERROR", "ERROR: Could not delete comments");
60
+define("_MD_COMMENTS_DELETED", "Comments deleted");
Please login to merge, or discard this patch.
htdocs/modules/comments/language/english/admin.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 //define("_AM_COMMENTS_MODULE_ADMIN","Modules Administration");
26 26
 
27 27
 // Tips
28
-define("_AM_COMMENTS_NAV_TIPS","
28
+define("_AM_COMMENTS_NAV_TIPS", "
29 29
 <ul>
30 30
 <li>Manage comments for all your modules.</li>
31 31
 <li>Delete comments easily with the purge.</li>
@@ -33,28 +33,28 @@  discard block
 block discarded – undo
33 33
 
34 34
 // Form
35 35
 //define("_AM_COMMENTS_FORM_LIST_COMMENTS","List Comments");
36
-define("_AM_COMMENTS_FORM_ALL_MODS","All modules");
37
-define("_AM_COMMENTS_FORM_ALL_STATUS","Any status");
36
+define("_AM_COMMENTS_FORM_ALL_MODS", "All modules");
37
+define("_AM_COMMENTS_FORM_ALL_STATUS", "Any status");
38 38
 
39
-define("_AM_COMMENTS_FORM_PURGE","Purge");
40
-define("_AM_COMMENTS_FORM_PURGE_DATE_AFTER","After this date (leave empty for any date)");
41
-define("_AM_COMMENTS_FORM_PURGE_DATE_BEFORE","Before this date (leave empty for any date)");
42
-define("_AM_COMMENTS_FORM_PURGE_GROUPS","Groups");
43
-define("_AM_COMMENTS_FORM_PURGE_USER","User name");
44
-define("_AM_COMMENTS_FORM_PURGE_STATUS","Status");
45
-define("_AM_COMMENTS_FORM_PURGE_MODULES","Modules");
39
+define("_AM_COMMENTS_FORM_PURGE", "Purge");
40
+define("_AM_COMMENTS_FORM_PURGE_DATE_AFTER", "After this date (leave empty for any date)");
41
+define("_AM_COMMENTS_FORM_PURGE_DATE_BEFORE", "Before this date (leave empty for any date)");
42
+define("_AM_COMMENTS_FORM_PURGE_GROUPS", "Groups");
43
+define("_AM_COMMENTS_FORM_PURGE_USER", "User name");
44
+define("_AM_COMMENTS_FORM_PURGE_STATUS", "Status");
45
+define("_AM_COMMENTS_FORM_PURGE_MODULES", "Modules");
46 46
 
47 47
 // Tab
48
-define("_AM_COMMENTS_TITLE","Title");
49
-define("_AM_COMMENTS_POSTED","Author");
50
-define("_AM_COMMENTS_IP","IP");
51
-define("_AM_COMMENTS_MODULE","Module");
52
-define("_AM_COMMENTS_STATUS","Status");
53
-define("_AM_COMMENTS_ACTION","Action");
54
-define("_AM_COMMENTS_VIEW","See comment");
55
-
56
-define("_AM_COMMENTS_NO_COMMENTS","No comments");
48
+define("_AM_COMMENTS_TITLE", "Title");
49
+define("_AM_COMMENTS_POSTED", "Author");
50
+define("_AM_COMMENTS_IP", "IP");
51
+define("_AM_COMMENTS_MODULE", "Module");
52
+define("_AM_COMMENTS_STATUS", "Status");
53
+define("_AM_COMMENTS_ACTION", "Action");
54
+define("_AM_COMMENTS_VIEW", "See comment");
55
+
56
+define("_AM_COMMENTS_NO_COMMENTS", "No comments");
57 57
 //define("_AM_COMMENTS_COMMENTS_FOUND","%s comment(s) found.");
58 58
 
59 59
 //since 2.6
60
-define("_AM_COMMENTS_DELETE_LIMIT","Sorry, you can delete only 4000 comments at a time.");
60
+define("_AM_COMMENTS_DELETE_LIMIT", "Sorry, you can delete only 4000 comments at a time.");
Please login to merge, or discard this patch.