Completed
Pull Request — master (#628)
by Richard
19:02 queued 04:58
created
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.
htdocs/modules/comments/comment_edit.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()->displayEdit();
Please login to merge, or discard this patch.
htdocs/modules/comments/blocks/comments_blocks.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
     $moduleperm_handler = $xoops->getHandlerGroupPermission();
40 40
     $gperm_groupid = $xoops->getUserGroups();
41 41
     $criteria1 = new CriteriaCompo(new Criteria('gperm_name', 'module_read', '='));
42
-    $criteria1->add(new Criteria('gperm_groupid', '(' . implode(',', $gperm_groupid) . ')', 'IN'));
42
+    $criteria1->add(new Criteria('gperm_groupid', '('.implode(',', $gperm_groupid).')', 'IN'));
43 43
     $perms = $moduleperm_handler->getObjects($criteria1, true);
44 44
     $modIds = array();
45 45
     foreach ($perms as $item) {
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     }
48 48
     if (count($modIds) > 0) {
49 49
         $modIds = array_unique($modIds);
50
-        $criteria->add(new Criteria('modid', '(' . implode(',', $modIds) . ')', 'IN'));
50
+        $criteria->add(new Criteria('modid', '('.implode(',', $modIds).')', 'IN'));
51 51
     } else {
52 52
         return $block;
53 53
     }
@@ -55,23 +55,23 @@  discard block
 block discarded – undo
55 55
     $comments = $comment_handler->getObjects($criteria, true);
56 56
     $member_handler = $xoops->getHandlerMember();
57 57
     $module_handler = $xoops->getHandlerModule();
58
-    $modules = $module_handler->getObjectsArray(new Criteria('dirname', "('" . implode("','", array_keys($available_modules)) ."')", 'IN'), true);
58
+    $modules = $module_handler->getObjectsArray(new Criteria('dirname', "('".implode("','", array_keys($available_modules))."')", 'IN'), true);
59 59
     $comment_config = array();
60 60
     foreach (array_keys($comments) as $i) {
61 61
         $mid = $comments[$i]->getVar('modid');
62
-        $com['module'] = '<a href="' . \XoopsBaseConfig::get('url') . '/modules/' . $modules[$mid]->getVar('dirname') . '/">' . $modules[$mid]->getVar('name') . '</a>';
62
+        $com['module'] = '<a href="'.\XoopsBaseConfig::get('url').'/modules/'.$modules[$mid]->getVar('dirname').'/">'.$modules[$mid]->getVar('name').'</a>';
63 63
         if (!isset($comment_config[$mid])) {
64 64
             $comment_config[$mid] = \Xoops\Module\Plugin::getPlugin($modules[$mid]->getVar('dirname'), 'comments');
65 65
         }
66 66
         $com['id'] = $i;
67
-        $com['title'] = '<a href="' . \XoopsBaseConfig::get('url') . '/modules/' . $modules[$mid]->getVar('dirname') . '/' . $comment_config[$mid]->pageName() . '?' . $comment_config[$mid]->itemName() . '=' . $comments[$i]->getVar('itemid') . '&amp;com_id=' . $i . '&amp;com_rootid=' . $comments[$i]->getVar('rootid') . '&amp;' . htmlspecialchars($comments[$i]->getVar('exparams')) . '#comment' . $i . '">' . $comments[$i]->getVar('title') . '</a>';
67
+        $com['title'] = '<a href="'.\XoopsBaseConfig::get('url').'/modules/'.$modules[$mid]->getVar('dirname').'/'.$comment_config[$mid]->pageName().'?'.$comment_config[$mid]->itemName().'='.$comments[$i]->getVar('itemid').'&amp;com_id='.$i.'&amp;com_rootid='.$comments[$i]->getVar('rootid').'&amp;'.htmlspecialchars($comments[$i]->getVar('exparams')).'#comment'.$i.'">'.$comments[$i]->getVar('title').'</a>';
68 68
         $com['icon'] = htmlspecialchars($comments[$i]->getVar('icon'), ENT_QUOTES);
69 69
         $com['icon'] = ($com['icon'] != '') ? $com['icon'] : 'icon1.gif';
70 70
         $com['time'] = XoopsLocale::formatTimestamp($comments[$i]->getVar('created'), 'm');
71 71
         if ($comments[$i]->getVar('uid') > 0) {
72 72
             $poster = $member_handler->getUser($comments[$i]->getVar('uid'));
73 73
             if (is_object($poster)) {
74
-                $com['poster'] = '<a href="' . \XoopsBaseConfig::get('url') . '/userinfo.php?uid=' . $comments[$i]->getVar('uid') . '">' . $poster->getVar('uname') . '</a>';
74
+                $com['poster'] = '<a href="'.\XoopsBaseConfig::get('url').'/userinfo.php?uid='.$comments[$i]->getVar('uid').'">'.$poster->getVar('uname').'</a>';
75 75
             } else {
76 76
                 $com['poster'] = $xoops->getConfig('anonymous');
77 77
             }
Please login to merge, or discard this patch.
htdocs/modules/comments/class/commentrenderer.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -67,11 +67,11 @@  discard block
 block discarded – undo
67 67
         $this->doIconCheck = $do_iconcheck;
68 68
         $this->statusText = array(
69 69
             Comments::STATUS_PENDING => '<span style="text-decoration: none; font-weight: bold; color: #00ff00;">'
70
-                . _MD_COMMENTS_PENDING . '</span>',
70
+                . _MD_COMMENTS_PENDING.'</span>',
71 71
             Comments::STATUS_ACTIVE  => '<span style="text-decoration: none; font-weight: bold; color: #ff0000;">'
72
-                . _MD_COMMENTS_ACTIVE . '</span>',
72
+                . _MD_COMMENTS_ACTIVE.'</span>',
73 73
             Comments::STATUS_HIDDEN  => '<span style="text-decoration: none; font-weight: bold; color: #0000ff;">'
74
-                . _MD_COMMENTS_HIDDEN . '</span>'
74
+                . _MD_COMMENTS_HIDDEN.'</span>'
75 75
         );
76 76
     }
77 77
 
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
         if (isset($this->comments)) {
107 107
             unset($this->comments);
108 108
         }
109
-        $this->comments =& $comments_arr;
109
+        $this->comments = & $comments_arr;
110 110
     }
111 111
 
112 112
     /**
@@ -127,8 +127,8 @@  discard block
 block discarded – undo
127 127
             if (false != $admin_view) {
128 128
                 $text = $comment->getVar('text')
129 129
                     . '<div style="text-align:right; margin-top: 2px; margin-bottom: 0px; margin-right: 2px;">'
130
-                    . _MD_COMMENTS_STATUS . ': ' . $this->statusText[$comment->getVar('status')]
131
-                    . '<br />IP: <span style="font-weight: bold;">' . $comment->getVar('ip') . '</span></div>';
130
+                    . _MD_COMMENTS_STATUS.': '.$this->statusText[$comment->getVar('status')]
131
+                    . '<br />IP: <span style="font-weight: bold;">'.$comment->getVar('ip').'</span></div>';
132 132
             } else {
133 133
                 // hide comments that are not active
134 134
                 if (Comments::STATUS_ACTIVE != $comment->getVar('status')) {
@@ -179,8 +179,8 @@  discard block
 block discarded – undo
179 179
             // admins can see all
180 180
             $text = $tree[$comment_id]['obj']->getVar('text')
181 181
                 . '<div style="text-align:right; margin-top: 2px; margin-bottom: 0px; margin-right: 2px;">'
182
-                . _MD_COMMENTS_STATUS . ': ' . $this->statusText[$tree[$comment_id]['obj']->getVar('status')]
183
-                . '<br />IP: <span style="font-weight: bold;">' . $tree[$comment_id]['obj']->getVar('ip')
182
+                . _MD_COMMENTS_STATUS.': '.$this->statusText[$tree[$comment_id]['obj']->getVar('status')]
183
+                . '<br />IP: <span style="font-weight: bold;">'.$tree[$comment_id]['obj']->getVar('ip')
184 184
                 . '</span></div>';
185 185
         } else {
186 186
             // hide comments that are not active
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
             $image = (false != $this->useIcons) ? $this->getTitleIcon($thread[$key]['obj']->getVar('icon')) : '';
242 242
             $title = $thread[$key]['obj']->getVar('title');
243 243
             $title = (false != $admin_view)
244
-                ? $title . ' ' . $this->statusText[$thread[$key]['obj']->getVar('status')] : $title;
244
+                ? $title.' '.$this->statusText[$thread[$key]['obj']->getVar('status')] : $title;
245 245
             $replies[] = array(
246 246
                 'id'          => $key,
247 247
                 'prefix'      => $current_prefix,
@@ -289,8 +289,8 @@  discard block
 block discarded – undo
289 289
         if (false != $admin_view) {
290 290
             $text = $tree[$comment_id]['obj']->getVar('text')
291 291
                 . '<div style="text-align:right; margin-top: 2px; margin-bottom: 0px; margin-right: 2px;">'
292
-                . _MD_COMMENTS_STATUS . ': ' . $this->statusText[$tree[$comment_id]['obj']->getVar('status')]
293
-                . '<br />IP: <span style="font-weight: bold;">' . $tree[$comment_id]['obj']->getVar('ip')
292
+                . _MD_COMMENTS_STATUS.': '.$this->statusText[$tree[$comment_id]['obj']->getVar('status')]
293
+                . '<br />IP: <span style="font-weight: bold;">'.$tree[$comment_id]['obj']->getVar('ip')
294 294
                 . '</span></div>';
295 295
         } else {
296 296
             // skip this comment if it is not active and continue on processing its child comments instead
@@ -342,8 +342,8 @@  discard block
 block discarded – undo
342 342
             $title = $thread[$key]['obj']->getVar('title');
343 343
             $text = (false != $admin_view) ? $thread[$key]['obj']->getVar('text')
344 344
                 . '<div style="text-align:right; margin-top: 2px; margin-right: 2px;">'
345
-                . _MD_COMMENTS_STATUS . ': ' . $this->statusText[$thread[$key]['obj']->getVar('status')]
346
-                . '<br />IP: <span style="font-weight: bold;">' . $thread[$key]['obj']->getVar('ip')
345
+                . _MD_COMMENTS_STATUS.': '.$this->statusText[$thread[$key]['obj']->getVar('status')]
346
+                . '<br />IP: <span style="font-weight: bold;">'.$thread[$key]['obj']->getVar('ip')
347 347
                 . '</span></div>'
348 348
                 : $thread[$key]['obj']->getVar('text');
349 349
             $replies[] = array(
@@ -457,18 +457,18 @@  discard block
 block discarded – undo
457 457
         $icon_image = htmlspecialchars(trim($icon_image));
458 458
         if ($icon_image != '') {
459 459
             if (false != $this->doIconCheck) {
460
-                if (!XoopsLoad::fileExists(Xoops::getInstance()->path('images/subject/' . $icon_image))) {
461
-                    return '<img src="' . \XoopsBaseConfig::get('url')
460
+                if (!XoopsLoad::fileExists(Xoops::getInstance()->path('images/subject/'.$icon_image))) {
461
+                    return '<img src="'.\XoopsBaseConfig::get('url')
462 462
                         . '/images/icons/no_posticon.gif" alt="" />&nbsp;';
463 463
                 } else {
464
-                    return '<img src="' . \XoopsBaseConfig::get('url') . '/images/subject/' . $icon_image
464
+                    return '<img src="'.\XoopsBaseConfig::get('url').'/images/subject/'.$icon_image
465 465
                         . '" alt="" />&nbsp;';
466 466
                 }
467 467
             } else {
468
-                return '<img src="' . \XoopsBaseConfig::get('url') . '/images/subject/' . $icon_image
468
+                return '<img src="'.\XoopsBaseConfig::get('url').'/images/subject/'.$icon_image
469 469
                     . '" alt="" />&nbsp;';
470 470
             }
471 471
         }
472
-        return '<img src="' . XOOPS_URL . '/images/icons/no_posticon.gif" alt="" />&nbsp;';
472
+        return '<img src="'.XOOPS_URL.'/images/icons/no_posticon.gif" alt="" />&nbsp;';
473 473
     }
474 474
 }
Please login to merge, or discard this patch.
htdocs/modules/userrank/admin/header.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
  * @version         $Id$
21 21
  */
22 22
 
23
-require_once dirname(dirname(dirname(__DIR__))) . '/include/cp_header.php';
23
+require_once dirname(dirname(dirname(__DIR__))).'/include/cp_header.php';
24 24
 
25 25
 $xoops = Xoops::getInstance();
26 26
 XoopsLoad::load('system', 'system');
Please login to merge, or discard this patch.
htdocs/modules/userrank/xoops_version.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 // paypal
51 51
 $modversion['paypal']                  = array();
52 52
 $modversion['paypal']['business']      = '[email protected]';
53
-$modversion['paypal']['item_name']     = 'Donation : ' . _MI_USERRANK_DESC;
53
+$modversion['paypal']['item_name']     = 'Donation : '._MI_USERRANK_DESC;
54 54
 $modversion['paypal']['amount']        = 0;
55 55
 $modversion['paypal']['currency_code'] = 'USD';
56 56
 
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 $modversion['adminmenu']  = 'admin/menu.php';
75 75
 
76 76
 // Mysql file
77
-$modversion['schema']           = 'sql/schema.yml';
77
+$modversion['schema'] = 'sql/schema.yml';
78 78
 //$modversion['sqlfile']['mysql'] = 'sql/mysql.sql';
79 79
 
80 80
 // Tables created by sql file (without prefix!)
Please login to merge, or discard this patch.
htdocs/modules/userrank/preloads/preload.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
      */
35 35
     public static function eventCoreServiceLocateUserrank(Provider $provider)
36 36
     {
37
-        require dirname(__DIR__) . '/class/UserRankProvider.php';
37
+        require dirname(__DIR__).'/class/UserRankProvider.php';
38 38
         $object = new UserRankProvider();
39 39
         $provider->register($object);
40 40
     }
Please login to merge, or discard this patch.
htdocs/modules/userrank/include/install.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@
 block discarded – undo
89 89
     $tableData = Yaml::load($filedata);
90 90
 
91 91
     $count = TableLoad::countRows($table);
92
-    if ($count<1) {
92
+    if ($count < 1) {
93 93
         TableLoad::loadTableFromArray($table, $tableData);
94 94
     }
95 95
     return true;
Please login to merge, or discard this patch.
htdocs/modules/userrank/language/english/modinfo.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,8 +20,8 @@
 block discarded – undo
20 20
  * @version         $Id$
21 21
  */
22 22
 // Info module
23
-define("_MI_USERRANK_NAME","User ranks");
24
-define("_MI_USERRANK_DESC","You can add ranks for your users.");
23
+define("_MI_USERRANK_NAME", "User ranks");
24
+define("_MI_USERRANK_DESC", "You can add ranks for your users.");
25 25
 // Menu
26 26
 define("_USERRANK_MI_INDEX", "Home");
27 27
 define("_USERRANK_MI_USERRANK", "User Ranks");
Please login to merge, or discard this patch.