Passed
Pull Request — master (#610)
by Richard
14:27
created
upgrade/upd-2.3.3-to-2.4.0/index.php 2 patches
Indentation   -2 removed lines patch added patch discarded remove patch
@@ -29,7 +29,6 @@  discard block
 block discarded – undo
29 29
 
30 30
     /**
31 31
      * Check if keys already exist
32
-
33 32
      */
34 33
     function check_keys()
35 34
     {
@@ -61,7 +60,6 @@  discard block
 block discarded – undo
61 60
 
62 61
     /**
63 62
      * Apply keys that are missing
64
-
65 63
      */
66 64
     function apply_keys()
67 65
     {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
         $tables['xoopscomments'] = array('com_status');
43 43
 
44 44
         foreach ($tables as $table => $keys) {
45
-            $sql = "SHOW KEYS FROM `" . $xoops->db()->prefix($table) . "`";
45
+            $sql = "SHOW KEYS FROM `".$xoops->db()->prefix($table)."`";
46 46
             if (!$result = $xoops->db()->queryF($sql)) {
47 47
                 continue;
48 48
             }
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
         $tables['xoopscomments'] = array('com_status');
75 75
 
76 76
         foreach ($tables as $table => $keys) {
77
-            $sql = "SHOW KEYS FROM `" . $xoops->db()->prefix($table) . "`";
77
+            $sql = "SHOW KEYS FROM `".$xoops->db()->prefix($table)."`";
78 78
             if (!$result = $xoops->db()->queryF($sql)) {
79 79
                 continue;
80 80
             }
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
             }
85 85
             foreach ($keys as $key) {
86 86
                 if (!in_array($key, $existing_keys)) {
87
-                    $sql = "ALTER TABLE `" . $xoops->db()->prefix($table) . "` ADD INDEX `{$key}` (`{$key}`)";
87
+                    $sql = "ALTER TABLE `".$xoops->db()->prefix($table)."` ADD INDEX `{$key}` (`{$key}`)";
88 88
                     if (!$result = $xoops->db()->queryF($sql)) {
89 89
                         return false;
90 90
                     }
Please login to merge, or discard this patch.
upgrade/upd-2.3.0-to-2.3.1/index.php 2 patches
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,6 @@
 block discarded – undo
33 33
 
34 34
     /**
35 35
      * Check if field type already fixed for mysql strict mode
36
-
37 36
      */
38 37
     function check_field()
39 38
     {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
             "user_sig"       => "users", "bio" => "users",
48 48
         );
49 49
         foreach ($fields as $field => $table) {
50
-            $sql = "SHOW COLUMNS FROM `" . $db->prefix($table) . "` LIKE '{$field}'";
50
+            $sql = "SHOW COLUMNS FROM `".$db->prefix($table)."` LIKE '{$field}'";
51 51
             if (!$result = $db->queryF($sql)) {
52 52
                 return false;
53 53
             }
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
         $db = $xoops->db();
70 70
         $allowWebChanges = $db->allowWebChanges;
71 71
         $db->allowWebChanges = true;
72
-        $result = $db->queryFromFile(dirname(__FILE__) . "/mysql.structure.sql");
72
+        $result = $db->queryFromFile(dirname(__FILE__)."/mysql.structure.sql");
73 73
         $db->allowWebChanges = $allowWebChanges;
74 74
         return $result;
75 75
     }
Please login to merge, or discard this patch.
upgrade/language.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -118,8 +118,8 @@  discard block
 block discarded – undo
118 118
         if (strpos($expr, '[-_]') === FALSE) {
119 119
             $expr = str_replace('|', '([-_][[:alpha:]]{2,3})?|', $expr);
120 120
         }
121
-        if (($envType == 1 && eregi('^(' . $expr . ')(;q=[0-9]\\.[0-9])?$', $str))
122
-            || ($envType == 2 && eregi('(\(|\[|;[[:space:]])(' . $expr . ')(;|\]|\))', $str))) {
121
+        if (($envType == 1 && eregi('^('.$expr.')(;q=[0-9]\\.[0-9])?$', $str))
122
+            || ($envType == 2 && eregi('(\(|\[|;[[:space:]])('.$expr.')(;|\]|\))', $str))) {
123 123
             $lang = $key;
124 124
             break;
125 125
         }
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
     }
141 141
 
142 142
     $lang = '';
143
-    $xoops_lang ='';
143
+    $xoops_lang = '';
144 144
     // 1. try to findout user's language by checking its HTTP_ACCEPT_LANGUAGE
145 145
     // variable
146 146
     if (empty($lang) && !empty($HTTP_ACCEPT_LANGUAGE)) {
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
         reset($accepted);
150 150
         for ($i = 0; $i < $acceptedCnt; $i++) {
151 151
             $lang = xoops_analyzeLanguage($accepted[$i], 1);
152
-            if(strncasecmp($lang,'en',2)){
152
+            if (strncasecmp($lang, 'en', 2)) {
153 153
                 break;
154 154
             }
155 155
         }
Please login to merge, or discard this patch.
htdocs/userinfo.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
  * @version         $Id$
23 23
  */
24 24
 
25
-include __DIR__ . '/mainfile.php';
25
+include __DIR__.'/mainfile.php';
26 26
 
27 27
 $xoops_url = \XoopsBaseConfig::get('url');
28 28
 $xoops = Xoops::getInstance();
@@ -83,9 +83,9 @@  discard block
 block discarded – undo
83 83
 // Let extensions add navigation button(s)
84 84
 //$xoops->events()->triggerEvent('core.userinfo.button', array($thisUser, &$btn));
85 85
 $response = $xoops->service("Avatar")->getAvatarEditUrl($thisUser);
86
-$link=$response->getValue();
86
+$link = $response->getValue();
87 87
 if (!empty($link)) {
88
-    $btn[] = array( 'link' => $link, 'title' => XoopsLocale::AVATAR, 'icon' => 'glyphicon glyphicon-user');
88
+    $btn[] = array('link' => $link, 'title' => XoopsLocale::AVATAR, 'icon' => 'glyphicon glyphicon-user');
89 89
     $xoops->tpl()->assign('btn', $btn);
90 90
 }
91 91
 
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 } else {
105 105
     $xoops->tpl()->assign(
106 106
         'user_websiteurl',
107
-        '<a href="' . $thisUser->getVar('url', 'E') . '" rel="external">' . $thisUser->getVar('url') . '</a>'
107
+        '<a href="'.$thisUser->getVar('url', 'E').'" rel="external">'.$thisUser->getVar('url').'</a>'
108 108
     );
109 109
 }
110 110
 $xoops->tpl()->assign('lang_email', XoopsLocale::EMAIL);
@@ -156,9 +156,9 @@  discard block
 block discarded – undo
156 156
 if ($xoops->isUser()) {
157 157
     $xoops->tpl()->assign(
158 158
         'user_pmlink',
159
-        "<a class=\"btn btn-default\" href=\"javascript:openWithSelfMain('" . $xoops_url . "/pmlite.php?send2=1&amp;to_userid="
160
-        . $thisUser->getVar('uid') . "', 'pmlite', 450, 380);\"><span class=\"glyphicon glyphicon-send\" "
161
-        . 'title="' . sprintf(XoopsLocale::F_SEND_PRIVATE_MESSAGE_TO, $thisUser->getVar('uname')) . '"></span></a>'
159
+        "<a class=\"btn btn-default\" href=\"javascript:openWithSelfMain('".$xoops_url."/pmlite.php?send2=1&amp;to_userid="
160
+        . $thisUser->getVar('uid')."', 'pmlite', 450, 380);\"><span class=\"glyphicon glyphicon-send\" "
161
+        . 'title="'.sprintf(XoopsLocale::F_SEND_PRIVATE_MESSAGE_TO, $thisUser->getVar('uname')).'"></span></a>'
162 162
     );
163 163
 } else {
164 164
     $xoops->tpl()->assign('user_pmlink', '');
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
     if (isset($userrank['image']) && $userrank['image']) {
169 169
         $xoops->tpl()->assign(
170 170
             'user_rankimage',
171
-            '<img src="' . $userrank['image'] . '" alt="' . $userrank['title']. '" />'
171
+            '<img src="'.$userrank['image'].'" alt="'.$userrank['title'].'" />'
172 172
         );
173 173
     }
174 174
     $xoops->tpl()->assign('user_ranktitle', $userrank['title']);
@@ -200,14 +200,14 @@  discard block
 block discarded – undo
200 200
                 foreach ($results as $k => $result) {
201 201
                     if (isset($result['image']) && $result['image'] != '') {
202 202
                         $results[$k]['image']
203
-                            = $xoops->url('modules/' . $modules[$i]->getVar('dirname') . '/' . $result['image']);
203
+                            = $xoops->url('modules/'.$modules[$i]->getVar('dirname').'/'.$result['image']);
204 204
                     } else {
205 205
                         $results[$k]['image'] = $xoops->url('images/icons/posticon2.gif');
206 206
                     }
207 207
 
208 208
                     if (!preg_match("/^http[s]*:\/\//i", $result['link'])) {
209 209
                         $results[$k]['link']
210
-                            = $xoops->url("modules/" . $modules[$i]->getVar('dirname') . "/" . $result['link']);
210
+                            = $xoops->url("modules/".$modules[$i]->getVar('dirname')."/".$result['link']);
211 211
                     }
212 212
 
213 213
                     $results[$k]['title'] = $myts->htmlSpecialChars($result['title']);
@@ -222,8 +222,8 @@  discard block
 block discarded – undo
222 222
                 }
223 223
                 if ($count == 5) {
224 224
                     $showall_link = '<a href="search.php?action=showallbyuser&amp;mid='
225
-                        . $modules[$i]->getVar('mid') . '&amp;uid=' . $thisUser->getVar('uid')
226
-                        . '">' . XoopsLocale::SHOW_ALL . '</a>';
225
+                        . $modules[$i]->getVar('mid').'&amp;uid='.$thisUser->getVar('uid')
226
+                        . '">'.XoopsLocale::SHOW_ALL.'</a>';
227 227
                 } else {
228 228
                     $showall_link = '';
229 229
                 }
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
                     'modules',
232 232
                     array(
233 233
                         'name' => $modules[$i]->getVar('name'),
234
-                        'image' => $xoops->url('modules/' . $modules[$i]->getVar('dirname') . '/icons/logo_large.png'),
234
+                        'image' => $xoops->url('modules/'.$modules[$i]->getVar('dirname').'/icons/logo_large.png'),
235 235
                         'result' => $results,
236 236
                         'showall_link' => $showall_link
237 237
                     )
Please login to merge, or discard this patch.
htdocs/imagemanager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
  * @version         $Id$
20 20
  */
21 21
 
22
-include __DIR__ . '/mainfile.php';
22
+include __DIR__.'/mainfile.php';
23 23
 
24 24
 $xoops = \Xoops::getInstance();
25 25
 $xoops->events()->triggerEvent('core.imagemanager');
Please login to merge, or discard this patch.
htdocs/edituser.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 
21 21
 use Xmf\Request;
22 22
 
23
-include __DIR__ . '/mainfile.php';
23
+include __DIR__.'/mainfile.php';
24 24
 
25 25
 $xoops = Xoops::getInstance();
26 26
 $xoops->events()->triggerEvent('core.edituser.start');
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
         $xoops->redirect(
42 42
             'index.php',
43 43
             3,
44
-            XoopsLocale::E_NO_ACTION_PERMISSION . "<br />" . implode('<br />', $xoops->security()->getErrors())
44
+            XoopsLocale::E_NO_ACTION_PERMISSION."<br />".implode('<br />', $xoops->security()->getErrors())
45 45
         );
46 46
         exit();
47 47
     }
@@ -51,10 +51,10 @@  discard block
 block discarded – undo
51 51
         exit();
52 52
     }
53 53
     $errors = array();
54
-    $email='';
54
+    $email = '';
55 55
     if ($xoops->getConfig('allow_chgmail') == 1) {
56 56
         $email = Request::getString('email', '');
57
-        if ($email == '' || ! $xoops->checkEmail($email)) {
57
+        if ($email == '' || !$xoops->checkEmail($email)) {
58 58
             $errors[] = XoopsLocale::E_INVALID_EMAIL;
59 59
         }
60 60
     }
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
         $xoops->header();
73 73
         echo '<div>';
74 74
         foreach ($errors as $er) {
75
-            echo '<span class="red bold">' . $er . '</span><br />';
75
+            echo '<span class="red bold">'.$er.'</span><br />';
76 76
         }
77 77
         echo '</div><br />';
78 78
         $op = 'editprofile';
@@ -105,12 +105,12 @@  discard block
 block discarded – undo
105 105
         $edituser->setVar('user_occ', Request::getString('user_occ', ''));
106 106
         $edituser->setVar('user_intrest', Request::getString('user_intrest', ''));
107 107
         $edituser->setVar('user_mailok', Request::getBool('user_mailok', 0));
108
-        if (! $member_handler->insertUser($edituser)) {
108
+        if (!$member_handler->insertUser($edituser)) {
109 109
             $xoops->header();
110 110
             echo $edituser->getHtmlErrors();
111 111
             $xoops->footer();
112 112
         } else {
113
-            $xoops->redirect('userinfo.php?uid=' . $uid, 1, XoopsLocale::S_YOUR_PROFILE_UPDATED);
113
+            $xoops->redirect('userinfo.php?uid='.$uid, 1, XoopsLocale::S_YOUR_PROFILE_UPDATED);
114 114
         }
115 115
         exit();
116 116
     }
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
     $pwd_text = new Xoops\Form\Password('', 'password');
182 182
     $pwd_text2 = new Xoops\Form\Password('', 'vpass');
183 183
     $pwd_tray = new Xoops\Form\ElementTray(
184
-        XoopsLocale::PASSWORD . '<br />' . XoopsLocale::TYPE_NEW_PASSWORD_TWICE_TO_CHANGE_IT
184
+        XoopsLocale::PASSWORD.'<br />'.XoopsLocale::TYPE_NEW_PASSWORD_TWICE_TO_CHANGE_IT
185 185
     );
186 186
     $pwd_tray->addElement($pwd_text);
187 187
     $pwd_tray->addElement($pwd_text2);
Please login to merge, or discard this patch.
htdocs/pda.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -19,27 +19,27 @@
 block discarded – undo
19 19
  * @version         $Id$
20 20
  */
21 21
 
22
-include __DIR__ . '/mainfile.php';
22
+include __DIR__.'/mainfile.php';
23 23
 $xoops_url = \XoopsBaseConfig::get('url');
24 24
 
25 25
 header("Content-Type: text/html");
26
-echo "<html><head><title>" . htmlspecialchars($xoops->getConfig('sitename')) . "</title>
26
+echo "<html><head><title>".htmlspecialchars($xoops->getConfig('sitename'))."</title>
27 27
       <meta name='HandheldFriendly' content='True' />
28 28
       <meta name='PalmComputingPlatform' content='True' />
29 29
       </head>
30 30
       <body>";
31 31
 
32
-$sql = "SELECT storyid, title FROM " . $xoopsDB->prefix("stories") . " WHERE published>0 AND published<" . time() . " ORDER BY published DESC";
32
+$sql = "SELECT storyid, title FROM ".$xoopsDB->prefix("stories")." WHERE published>0 AND published<".time()." ORDER BY published DESC";
33 33
 $result = $xoopsDB->query($sql, 10, 0);
34 34
 //TODO Remove this hardcoded string
35 35
 if (!$result) {
36 36
     echo "An error occured";
37 37
 } else {
38
-    echo "<img src='images/logo.gif' alt='" . htmlspecialchars($xoops->getConfig('sitename'), ENT_QUOTES) . "' border='0' /><br />";
39
-    echo "<h2>" . htmlspecialchars($xoops->getConfig('slogan')) . "</h2>";
38
+    echo "<img src='images/logo.gif' alt='".htmlspecialchars($xoops->getConfig('sitename'), ENT_QUOTES)."' border='0' /><br />";
39
+    echo "<h2>".htmlspecialchars($xoops->getConfig('slogan'))."</h2>";
40 40
     echo "<div>";
41 41
     while (false !== (list ($storyid, $title) = $xoopsDB->fetchRow($result))) {
42
-        echo "<a href='" . $xoops_url . "/modules/news/print.php?storyid={$storyid}'>" . htmlspecialchars($title) . "</a><br />";
42
+        echo "<a href='".$xoops_url."/modules/news/print.php?storyid={$storyid}'>".htmlspecialchars($title)."</a><br />";
43 43
     }
44 44
     echo "</div>";
45 45
 }
Please login to merge, or discard this patch.
htdocs/install/locale/en_US/install.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -29,8 +29,8 @@  discard block
 block discarded – undo
29 29
 define("RECOMMENDED_EXTENSIONS", "Recommended extensions");
30 30
 define("RECOMMENDED", "Recommended");
31 31
 define("CURRENT", "Current");
32
-define("COMPOSER","Composer");
33
-define("COMPOSER_ENVIRONMENT",'Composer required. <a href="http://getcomposer.org/" target="_blank">http://getcomposer.org/</a>');
32
+define("COMPOSER", "Composer");
33
+define("COMPOSER_ENVIRONMENT", 'Composer required. <a href="http://getcomposer.org/" target="_blank">http://getcomposer.org/</a>');
34 34
 
35 35
 define("RECOMMENDED_EXTENSIONS_MSG", "These extensions are not required for normal use, but may be necessary to exploit
36 36
     some specific features (like the multi-language or RSS support). Thus, it is recommended to have them installed.");
@@ -73,9 +73,9 @@  discard block
 block discarded – undo
73 73
 define("XOOPS_ROOT_PATH_HELP", "Physical path to the XOOPS documents (served) directory WITHOUT trailing slash");
74 74
 
75 75
 define("XOOPS_LIB_PATH_LABEL", "XOOPS library directory");
76
-define("XOOPS_LIB_PATH_HELP", "Physical path to the XOOPS library directory WITHOUT trailing slash, for forward compatibility. Locate the folder out of " . XOOPS_ROOT_PATH_LABEL . " to make it secure.");
76
+define("XOOPS_LIB_PATH_HELP", "Physical path to the XOOPS library directory WITHOUT trailing slash, for forward compatibility. Locate the folder out of ".XOOPS_ROOT_PATH_LABEL." to make it secure.");
77 77
 define("XOOPS_DATA_PATH_LABEL", "XOOPS datafiles directory");
78
-define("XOOPS_DATA_PATH_HELP", "Physical path to the XOOPS datafiles (writable) directory WITHOUT trailing slash, for forward compatibility. Locate the folder out of " . XOOPS_ROOT_PATH_LABEL . " to make it secure.");
78
+define("XOOPS_DATA_PATH_HELP", "Physical path to the XOOPS datafiles (writable) directory WITHOUT trailing slash, for forward compatibility. Locate the folder out of ".XOOPS_ROOT_PATH_LABEL." to make it secure.");
79 79
 
80 80
 define("XOOPS_URL_LABEL", "Website location (URL)"); // L56
81 81
 define("XOOPS_URL_HELP", "Main URL that will be used to access your XOOPS installation"); // L58
@@ -159,8 +159,8 @@  discard block
 block discarded – undo
159 159
 define("ERR_READ_MAINFILE", "Could not open mainfile.php for reading");
160 160
 
161 161
 define("ERR_COPY_SECURE", "Could not copy into secure.php the distribution file: ");
162
-define("ERR_READ_SECURE","Could not open secure.php for reading");
163
-define("ERR_WRITE_SECURE","Could not write into secure.php. Please check the file permission and try again.");
162
+define("ERR_READ_SECURE", "Could not open secure.php for reading");
163
+define("ERR_WRITE_SECURE", "Could not write into secure.php. Please check the file permission and try again.");
164 164
 
165 165
 define("ERR_INVALID_DBCHARSET", "The charset '%s' is not supported.");
166 166
 define("ERR_INVALID_DBCOLLATION", "The collation '%s' is not supported.");
Please login to merge, or discard this patch.
htdocs/install/page_langselect.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
  * @version     $Id$
26 26
  */
27 27
 
28
-require_once __DIR__ . '/include/common.inc.php';
28
+require_once __DIR__.'/include/common.inc.php';
29 29
 
30 30
 /* @var $wizard XoopsInstallWizard */
31 31
 $wizard = $_SESSION['wizard'];
@@ -57,4 +57,4 @@  discard block
 block discarded – undo
57 57
 $_SESSION['pageHasHelp'] = false;
58 58
 $_SESSION['pageHasForm'] = true;
59 59
 $_SESSION['content'] = $content;
60
-include XOOPS_INSTALL_PATH . '/include/install_tpl.php';
60
+include XOOPS_INSTALL_PATH.'/include/install_tpl.php';
Please login to merge, or discard this patch.