Passed
Pull Request — master (#610)
by Richard
14:27
created
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.
htdocs/modules/userrank/language/english/admin.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -19,29 +19,29 @@
 block discarded – undo
19 19
  * @author          Cointin Maxime (AKA Kraven30)
20 20
  * @version         $Id$
21 21
  */
22
-define("_AM_USERRANK_ACTION","Action");
23
-define("_AM_USERRANK_ADD","Add a new rank");
24
-define("_AM_USERRANK_DELETE","Delete rank");
25
-define("_AM_USERRANK_EDIT","Edit rank");
26
-define("_AM_USERRANK_IMAGE","Image");
27
-define("_AM_USERRANK_IMAGE_PATH","Files exist in: %s");
28
-define("_AM_USERRANK_LIST","List of ranks");
29
-define("_AM_USERRANK_MAXPOST","Max. Posts");
30
-define("_AM_USERRANK_MINPOST","Min. Posts");
31
-define("_AM_USERRANK_OFF","Special rank");
32
-define("_AM_USERRANK_ON","Does not special rank");
33
-define("_AM_USERRANK_SAVE","User rank saved Successfully!");
34
-define("_AM_USERRANK_SPECIAL","Special Ranks");
35
-define("_AM_USERRANK_SPECIAL_CAN","(Special ranks can be assigned to users irrespective of the number of user posts)");
36
-define("_AM_USERRANK_SUREDEL","Are you sure you want to delete this ranking?");
37
-define("_AM_USERRANK_TITLE","Title");
38
-define("_AM_USERRANK_UPLOAD","Upload");
39
-define("_AM_USERRANK_ERROR_POST","You need a positive integer");
22
+define("_AM_USERRANK_ACTION", "Action");
23
+define("_AM_USERRANK_ADD", "Add a new rank");
24
+define("_AM_USERRANK_DELETE", "Delete rank");
25
+define("_AM_USERRANK_EDIT", "Edit rank");
26
+define("_AM_USERRANK_IMAGE", "Image");
27
+define("_AM_USERRANK_IMAGE_PATH", "Files exist in: %s");
28
+define("_AM_USERRANK_LIST", "List of ranks");
29
+define("_AM_USERRANK_MAXPOST", "Max. Posts");
30
+define("_AM_USERRANK_MINPOST", "Min. Posts");
31
+define("_AM_USERRANK_OFF", "Special rank");
32
+define("_AM_USERRANK_ON", "Does not special rank");
33
+define("_AM_USERRANK_SAVE", "User rank saved Successfully!");
34
+define("_AM_USERRANK_SPECIAL", "Special Ranks");
35
+define("_AM_USERRANK_SPECIAL_CAN", "(Special ranks can be assigned to users irrespective of the number of user posts)");
36
+define("_AM_USERRANK_SUREDEL", "Are you sure you want to delete this ranking?");
37
+define("_AM_USERRANK_TITLE", "Title");
38
+define("_AM_USERRANK_UPLOAD", "Upload");
39
+define("_AM_USERRANK_ERROR_POST", "You need a positive integer");
40 40
 
41 41
 // Info
42
-define("_AM_USERRANK_NBTOTAL","There are %s ranks in our database");
43
-define("_AM_USERRANK_NBSPECIAL","There are %s special rank");
42
+define("_AM_USERRANK_NBTOTAL", "There are %s ranks in our database");
43
+define("_AM_USERRANK_NBSPECIAL", "There are %s special rank");
44 44
 // Tips
45
-define("_AM_USERRANK_TIPS","<ul><li>Add, update or delete user rank</li></ul>");
46
-define("_AM_USERRANK_TIPS_FORM1","<ul><li>Authorized mime types: %s</li>");
47
-define("_AM_USERRANK_TIPS_FORM2","<li>Max uploaded files size: %s KB</li></ul>");
45
+define("_AM_USERRANK_TIPS", "<ul><li>Add, update or delete user rank</li></ul>");
46
+define("_AM_USERRANK_TIPS_FORM1", "<ul><li>Authorized mime types: %s</li>");
47
+define("_AM_USERRANK_TIPS_FORM2", "<li>Max uploaded files size: %s KB</li></ul>");
Please login to merge, or discard this patch.
htdocs/modules/userrank/class/form/ranks.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,9 +54,9 @@
 block discarded – undo
54 54
         $imageselect_img = new Xoops\Form\Select($imgpath_img, 'rank_image', $blank_img);
55 55
         $imageselect_img->addOption($blank_img, $blank_img);
56 56
         \Xoops\Core\Lists\ImageFile::setOptionsArray($imageselect_img, $xoops->path('uploads/ranks'));
57
-        $imageselect_img->setExtra("onchange='showImgSelected(\"xo-ranks-img\", \"rank_image\", \"ranks\", \"\", \"" . \XoopsBaseConfig::get('uploads-url') . "\")'");
57
+        $imageselect_img->setExtra("onchange='showImgSelected(\"xo-ranks-img\", \"rank_image\", \"ranks\", \"\", \"".\XoopsBaseConfig::get('uploads-url')."\")'");
58 58
         $imgtray_img->addElement($imageselect_img, false);
59
-        $imgtray_img->addElement(new Xoops\Form\Label('', "<br /><img src='" . \XoopsBaseConfig::get('uploads-url') . "/ranks/" . $blank_img . "' name='image_img' id='xo-ranks-img' alt='' />"));
59
+        $imgtray_img->addElement(new Xoops\Form\Label('', "<br /><img src='".\XoopsBaseConfig::get('uploads-url')."/ranks/".$blank_img."' name='image_img' id='xo-ranks-img' alt='' />"));
60 60
 
61 61
         $fileseltray_img = new Xoops\Form\ElementTray('<br />', '<br /><br />');
62 62
         $fileseltray_img->addElement(new Xoops\Form\File(_AM_USERRANK_UPLOAD, 'rank_image'), false);
Please login to merge, or discard this patch.
htdocs/modules/avatars/admin/avatar_custom.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -172,7 +172,7 @@
 block discarded – undo
172 172
                 // Delete file
173 173
                 $file = $obj->getVar('avatar_file');
174 174
                 if ($file !== 'avatars/blank.gif') {
175
-					$fullname = $xoops_upload_path . '/' . $file;
175
+                    $fullname = $xoops_upload_path . '/' . $file;
176 176
                     if (is_file($fullname)) {
177 177
                         chmod($fullname, 0777);
178 178
                         unlink($fullname);
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
  * @author          Mage Grégory (AKA Mage)
22 22
  * @version         $Id$
23 23
  */
24
-include __DIR__ . '/header.php';
24
+include __DIR__.'/header.php';
25 25
 
26 26
 // Get main instance
27 27
 $xoops = Xoops::getInstance();
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
             $xoops->redirect('avatar_custom.php', 3, implode('<br />', $xoops->security()->getErrors()));
116 116
         }
117 117
         $uploader_avatars_img =
118
-            new XoopsMediaUploader($xoops_upload_path . '/avatars', $mimetypes, $upload_size, $width, $height);
118
+            new XoopsMediaUploader($xoops_upload_path.'/avatars', $mimetypes, $upload_size, $width, $height);
119 119
         // Get avatar id
120 120
         $avatar_id = Request::getInt('avatar_id', 0);
121 121
         if ($avatar_id > 0) {
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
         $error_msg = '';
127 127
         $obj->setVars($_POST);
128 128
         if (preg_match('/^\d+$/', $_POST["avatar_weight"]) == false) {
129
-            $error_msg .= XoopsLocale::E_YOU_NEED_A_POSITIVE_INTEGER . '<br />';
129
+            $error_msg .= XoopsLocale::E_YOU_NEED_A_POSITIVE_INTEGER.'<br />';
130 130
             $obj->setVar("avatar_weight", 0);
131 131
         } else {
132 132
             $obj->setVar("avatar_weight", Request::getInt('avatar_weight', 0));
@@ -140,11 +140,11 @@  discard block
 block discarded – undo
140 140
                 $obj->setVar('avatar_file', 'avatars/blank.gif');
141 141
             } else {
142 142
                 $obj->setVar('avatar_mimetype', $uploader_avatars_img->getMediaType());
143
-                $obj->setVar('avatar_file', 'avatars/' . $uploader_avatars_img->getSavedFileName());
143
+                $obj->setVar('avatar_file', 'avatars/'.$uploader_avatars_img->getSavedFileName());
144 144
             }
145 145
         } else {
146 146
             $file = Request::getString('avatar_file', 'blank.gif');
147
-            $obj->setVar('avatar_file', 'avatars/' . $file);
147
+            $obj->setVar('avatar_file', 'avatars/'.$file);
148 148
         }
149 149
         if ($error_msg == '') {
150 150
             if ($avatar_Handler->insert($obj)) {
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
                 // Delete file
173 173
                 $file = $obj->getVar('avatar_file');
174 174
                 if ($file !== 'avatars/blank.gif') {
175
-					$fullname = $xoops_upload_path . '/' . $file;
175
+					$fullname = $xoops_upload_path.'/'.$file;
176 176
                     if (is_file($fullname)) {
177 177
                         chmod($fullname, 0777);
178 178
                         unlink($fullname);
@@ -194,10 +194,10 @@  discard block
 block discarded – undo
194 194
             if ($avatar_id > 0) {
195 195
                 // Define Stylesheet
196 196
                 $xoops->theme()->addStylesheet('modules/system/css/admin.css');
197
-                $msg = '<div class="spacer"><img src="' . $xoops_upload_url . '/'
197
+                $msg = '<div class="spacer"><img src="'.$xoops_upload_url.'/'
198 198
                     . $obj->getVar('avatar_file', 's')
199 199
                     . '" alt="" /></div><div class="txtcenter bold">'
200
-                    . $obj->getVar('avatar_name', 's') . '</div>'
200
+                    . $obj->getVar('avatar_name', 's').'</div>'
201 201
                     . XoopsLocale::Q_ARE_YOU_SURE_YOU_WANT_TO_DELETE_THIS_ITEM;
202 202
                 // Display message
203 203
                 echo $xoops->confirm(
Please login to merge, or discard this patch.
htdocs/modules/avatars/admin/avatar_system.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 10
 */
11 11
 
12
- use Xmf\Request;
12
+    use Xmf\Request;
13 13
 
14 14
 /**
15 15
  * avatars module
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
                 // Delete file
180 180
                 $file = $obj->getVar('avatar_file');
181 181
                 if ($file !== 'avatars/blank.gif') {
182
-					$fullname = $xoops_upload_path . '/' . $file;
182
+                    $fullname = $xoops_upload_path . '/' . $file;
183 183
                     if (is_file($fullname)) {
184 184
                         chmod($fullname, 0777);
185 185
                         unlink($fullname);
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
  * @author          Mage Grégory (AKA Mage)
22 22
  * @version         $Id$
23 23
  */
24
-include __DIR__ . '/header.php';
24
+include __DIR__.'/header.php';
25 25
 // Get main instance
26 26
 $xoops = Xoops::getInstance();
27 27
 $helper = Avatars::getInstance();
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
             $xoops->redirect('avatar_system.php', 3, implode('<br />', $xoops->security()->getErrors()));
123 123
         }
124 124
         $uploader_avatars_img =
125
-            new XoopsMediaUploader($xoops_upload_path . '/avatars', $mimetypes, $upload_size, $width, $height);
125
+            new XoopsMediaUploader($xoops_upload_path.'/avatars', $mimetypes, $upload_size, $width, $height);
126 126
         // Get avatar id
127 127
         $avatar_id = Request::getInt('avatar_id', 0);
128 128
         if ($avatar_id > 0) {
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
         $error_msg = '';
134 134
         $obj->setVars($_POST);
135 135
         if (preg_match('/^\d+$/', $_POST["avatar_weight"]) == false) {
136
-            $error_msg .= XoopsLocale::E_YOU_NEED_A_POSITIVE_INTEGER . '<br />';
136
+            $error_msg .= XoopsLocale::E_YOU_NEED_A_POSITIVE_INTEGER.'<br />';
137 137
             $obj->setVar("avatar_weight", 0);
138 138
         } else {
139 139
             $obj->setVar("avatar_weight", Request::getInt('avatar_weight', 0));
@@ -147,11 +147,11 @@  discard block
 block discarded – undo
147 147
                 $obj->setVar('avatar_file', 'avatars/blank.gif');
148 148
             } else {
149 149
                 $obj->setVar('avatar_mimetype', $uploader_avatars_img->getMediaType());
150
-                $obj->setVar('avatar_file', 'avatars/' . $uploader_avatars_img->getSavedFileName());
150
+                $obj->setVar('avatar_file', 'avatars/'.$uploader_avatars_img->getSavedFileName());
151 151
             }
152 152
         } else {
153 153
             $file = Request::getString('avatar_file', 'blank.gif');
154
-            $obj->setVar('avatar_file', 'avatars/' . $file);
154
+            $obj->setVar('avatar_file', 'avatars/'.$file);
155 155
         }
156 156
         if ($error_msg == '') {
157 157
             if ($avatar_Handler->insert($obj)) {
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
                 // Delete file
180 180
                 $file = $obj->getVar('avatar_file');
181 181
                 if ($file !== 'avatars/blank.gif') {
182
-					$fullname = $xoops_upload_path . '/' . $file;
182
+					$fullname = $xoops_upload_path.'/'.$file;
183 183
                     if (is_file($fullname)) {
184 184
                         chmod($fullname, 0777);
185 185
                         unlink($fullname);
@@ -201,10 +201,10 @@  discard block
 block discarded – undo
201 201
             if ($avatar_id > 0) {
202 202
                 // Define Stylesheet
203 203
                 $xoops->theme()->addStylesheet('modules/system/css/admin.css');
204
-                $msg = '<div class="spacer"><img src="' . $xoops_upload_url . '/'
204
+                $msg = '<div class="spacer"><img src="'.$xoops_upload_url.'/'
205 205
                     . $obj->getVar('avatar_file', 's')
206 206
                     . '" alt="" /></div><div class="txtcenter bold">'
207
-                    . $obj->getVar('avatar_name', 's') . '</div>'
207
+                    . $obj->getVar('avatar_name', 's').'</div>'
208 208
                     . XoopsLocale::Q_ARE_YOU_SURE_YOU_WANT_TO_DELETE_THIS_ITEM;
209 209
                 // Display message
210 210
                 echo $xoops->confirm(
Please login to merge, or discard this patch.
htdocs/modules/avatars/admin/index.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
  * @author          Mage Grégory (AKA Mage)
20 20
  * @version         $Id$
21 21
  */
22
-include __DIR__ . '/header.php';
22
+include __DIR__.'/header.php';
23 23
 // Get avatars handler
24 24
 $xoops = Xoops::getInstance();
25 25
 $helper = Avatars::getInstance();
@@ -51,20 +51,20 @@  discard block
 block discarded – undo
51 51
 // total avatars custom
52 52
 $avatars_total_c = $avatars_notdisplay_c + $avatars_display_c;
53 53
 // folder path
54
-$folder_path = \XoopsBaseConfig::get('root-path') . '/uploads/avatars';
54
+$folder_path = \XoopsBaseConfig::get('root-path').'/uploads/avatars';
55 55
 
56 56
 $admin_page = new \Xoops\Module\Admin();
57 57
 $admin_page->displayNavigation('index.php');
58 58
 
59 59
 $admin_page->addInfoBox(AvatarsLocale::SYSTEM, 'avatar_system');
60 60
 $admin_page->addInfoBoxLine(sprintf(AvatarsLocale::NBTOTAL_S, $avatars_total_s), 'avatar_system');
61
-$admin_page->addInfoBoxLine(sprintf(AvatarsLocale::NBDISPLAY_S, '<span class="green">' . $avatars_display_s . '</span>'), 'avatar_system');
62
-$admin_page->addInfoBoxLine(sprintf(AvatarsLocale::NBNOTDISPLAY_S, '<span class="red">' . $avatars_notdisplay_s . '</span>'), 'avatar_system');
61
+$admin_page->addInfoBoxLine(sprintf(AvatarsLocale::NBDISPLAY_S, '<span class="green">'.$avatars_display_s.'</span>'), 'avatar_system');
62
+$admin_page->addInfoBoxLine(sprintf(AvatarsLocale::NBNOTDISPLAY_S, '<span class="red">'.$avatars_notdisplay_s.'</span>'), 'avatar_system');
63 63
 
64 64
 $admin_page->addInfoBox(AvatarsLocale::CUSTOM, 'avatar_custom');
65 65
 $admin_page->addInfoBoxLine(sprintf(AvatarsLocale::NBTOTAL_C, $avatars_total_c), 'avatar_custom');
66
-$admin_page->addInfoBoxLine(sprintf(AvatarsLocale::NBDISPLAY_C, '<span class="green">' . $avatars_display_c . '</span>'), 'avatar_custom');
67
-$admin_page->addInfoBoxLine(sprintf(AvatarsLocale::NBNOTDISPLAY_C, '<span class="red">' . $avatars_notdisplay_c . '</span>'), 'avatar_custom');
66
+$admin_page->addInfoBoxLine(sprintf(AvatarsLocale::NBDISPLAY_C, '<span class="green">'.$avatars_display_c.'</span>'), 'avatar_custom');
67
+$admin_page->addInfoBoxLine(sprintf(AvatarsLocale::NBNOTDISPLAY_C, '<span class="red">'.$avatars_notdisplay_c.'</span>'), 'avatar_custom');
68 68
 
69 69
 $admin_page->addConfigBoxLine($folder_path, 'folder');
70 70
 $admin_page->addConfigBoxLine(array($folder_path, '777'), 'chmod');
Please login to merge, or discard this patch.
htdocs/modules/avatars/admin/header.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,4 +19,4 @@
 block discarded – undo
19 19
  * @author          Mage Grégory (AKA Mage)
20 20
  * @version         $Id$
21 21
  */
22
-require_once dirname(dirname(dirname(__DIR__))) . '/include/cp_header.php';
22
+require_once dirname(dirname(dirname(__DIR__))).'/include/cp_header.php';
Please login to merge, or discard this patch.
htdocs/modules/avatars/xoops_version.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
 // paypal
44 44
 $modversion['paypal'] = array(
45 45
     'business'      => '[email protected]',
46
-    'item_name'     => 'Donation : ' . AvatarsLocale::MODULE_DESC,
46
+    'item_name'     => 'Donation : '.AvatarsLocale::MODULE_DESC,
47 47
     'amount'        => 0,
48 48
     'currency_code' => 'USD',
49 49
 );
Please login to merge, or discard this patch.