Test Failed
Pull Request — master (#592)
by Lucio
10:17
created
extras/altsys_functions.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -23,15 +23,15 @@  discard block
 block discarded – undo
23 23
     global $xoopsModule, $xoopsConfig, $mydirname, $mydirpath, $mytrustdirname, $mytrustdirpath, $mymenu_fake_uri;
24 24
 
25 25
     $mymenu_find_paths = array(
26
-        $mydirpath . '/admin/mymenu.php',
27
-        $mydirpath . '/mymenu.php',
28
-        $mytrustdirpath . '/admin/mymenu.php',
29
-        $mytrustdirpath . '/mymenu.php');
26
+        $mydirpath.'/admin/mymenu.php',
27
+        $mydirpath.'/mymenu.php',
28
+        $mytrustdirpath.'/admin/mymenu.php',
29
+        $mytrustdirpath.'/mymenu.php');
30 30
 
31 31
     foreach ($mymenu_find_paths as $mymenu_find_path) {
32 32
         if (file_exists($mymenu_find_path)) {
33 33
             include $mymenu_find_path;
34
-            include_once __DIR__ . '/adminmenu_functions.php';
34
+            include_once __DIR__.'/adminmenu_functions.php';
35 35
             altsys_adminmenu_insert_mymenu($xoopsModule);
36 36
             altsys_adminmenu_hack_ft();
37 37
             break;
@@ -46,14 +46,14 @@  discard block
 block discarded – undo
46 46
 {
47 47
     $mylang = $GLOBALS['xoopsConfig']['language'];
48 48
 
49
-    if (file_exists(XOOPS_ROOT_PATH . '/modules/altsys/language/' . $mylang . '/' . $type . '.php')) {
50
-        include_once XOOPS_ROOT_PATH . '/modules/altsys/language/' . $mylang . '/' . $type . '.php';
51
-    } elseif (file_exists(XOOPS_TRUST_PATH . '/libs/altsys/language/' . $mylang . '/' . $type . '.php')) {
52
-        include_once XOOPS_TRUST_PATH . '/libs/altsys/language/' . $mylang . '/' . $type . '.php';
53
-    } elseif (file_exists(XOOPS_ROOT_PATH . '/modules/altsys/language/english/' . $type . '.php')) {
54
-        include_once XOOPS_ROOT_PATH . '/modules/altsys/language/english/' . $type . '.php';
55
-    } elseif (file_exists(XOOPS_TRUST_PATH . '/libs/altsys/language/english/' . $type . '.php')) {
56
-        include_once XOOPS_TRUST_PATH . '/libs/altsys/language/english/' . $type . '.php';
49
+    if (file_exists(XOOPS_ROOT_PATH.'/modules/altsys/language/'.$mylang.'/'.$type.'.php')) {
50
+        include_once XOOPS_ROOT_PATH.'/modules/altsys/language/'.$mylang.'/'.$type.'.php';
51
+    } elseif (file_exists(XOOPS_TRUST_PATH.'/libs/altsys/language/'.$mylang.'/'.$type.'.php')) {
52
+        include_once XOOPS_TRUST_PATH.'/libs/altsys/language/'.$mylang.'/'.$type.'.php';
53
+    } elseif (file_exists(XOOPS_ROOT_PATH.'/modules/altsys/language/english/'.$type.'.php')) {
54
+        include_once XOOPS_ROOT_PATH.'/modules/altsys/language/english/'.$type.'.php';
55
+    } elseif (file_exists(XOOPS_TRUST_PATH.'/libs/altsys/language/english/'.$type.'.php')) {
56
+        include_once XOOPS_TRUST_PATH.'/libs/altsys/language/english/'.$type.'.php';
57 57
     }
58 58
 }
59 59
 
@@ -98,9 +98,9 @@  discard block
 block discarded – undo
98 98
         case ALTSYS_CORE_TYPE_X20S:
99 99
         case ALTSYS_CORE_TYPE_ORE:
100 100
         case ALTSYS_CORE_TYPE_X22:
101
-            return XOOPS_URL . '/modules/system/admin.php?fct=preferences&op=showmod&mod=' . $mid;
101
+            return XOOPS_URL.'/modules/system/admin.php?fct=preferences&op=showmod&mod='.$mid;
102 102
         case ALTSYS_CORE_TYPE_XC21L:
103
-            return XOOPS_URL . '/modules/legacy/admin/index.php?action=PreferenceEdit&confmod_id=' . $mid;
103
+            return XOOPS_URL.'/modules/legacy/admin/index.php?action=PreferenceEdit&confmod_id='.$mid;
104 104
     }
105 105
 
106 106
     return null;
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
         if (substr($file, -4) !== '.php') {
131 131
             continue;
132 132
         }
133
-        @unlink(XOOPS_COMPILE_PATH . '/' . $file);
133
+        @unlink(XOOPS_COMPILE_PATH.'/'.$file);
134 134
     }
135 135
     closedir($dh);
136 136
 }
Please login to merge, or discard this patch.
extras/login.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -4,11 +4,11 @@  discard block
 block discarded – undo
4 4
 // path to your xoops main directory
5 5
 $path = '/path/to/xoops/directory';
6 6
 
7
-include $path . '/mainfile.php';
7
+include $path.'/mainfile.php';
8 8
 if (!defined('XOOPS_ROOT_PATH')) {
9 9
     exit();
10 10
 }
11
-include_once XOOPS_ROOT_PATH . '/language/' . $xoopsConfig['language'] . '/user.php';
11
+include_once XOOPS_ROOT_PATH.'/language/'.$xoopsConfig['language'].'/user.php';
12 12
 $op = (isset($_POST['op']) && $_POST['op'] === 'dologin') ? 'dologin' : 'login';
13 13
 
14 14
 $username = isset($_POST['username']) ? trim($_POST['username']) : '';
@@ -20,17 +20,17 @@  discard block
 block discarded – undo
20 20
 echo '
21 21
 <html>
22 22
   <head>
23
-    <meta http-equiv="content-type" content="text/html; charset=' . _CHARSET . '" />
24
-    <meta http-equiv="content-language" content="' . _LANGCODE . '" />
25
-    <title>' . $xoopsConfig['sitename'] . '</title>
26
-    <link rel="stylesheet" type="text/css" media="all" href="' . XOOPS_URL . '/xoops.css" />
23
+    <meta http-equiv="content-type" content="text/html; charset=' . _CHARSET.'" />
24
+    <meta http-equiv="content-language" content="' . _LANGCODE.'" />
25
+    <title>' . $xoopsConfig['sitename'].'</title>
26
+    <link rel="stylesheet" type="text/css" media="all" href="' . XOOPS_URL.'/xoops.css" />
27 27
 ';
28 28
 $style = xoops_getcss($xoopsConfig['theme_set']);
29 29
 if ($style == '') {
30 30
     $style = xoops_getcss($xoopsConfig['theme_set']);
31 31
 }
32 32
 if ($style != '') {
33
-    echo '<link rel="stylesheet" type="text/css" media="all" href="' . $style . '" />';
33
+    echo '<link rel="stylesheet" type="text/css" media="all" href="'.$style.'" />';
34 34
 }
35 35
 echo '
36 36
   </head>
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
     $user           = $member_handler->loginUser(addslashes($myts->stripSlashesGPC($username)), addslashes($myts->stripSlashesGPC($password)));
44 44
     if (is_object($user)) {
45 45
         if (0 == $user->getVar('level')) {
46
-            redirect_header(XOOPS_URL . '/index.php', 5, _US_NOACTTPADM);
46
+            redirect_header(XOOPS_URL.'/index.php', 5, _US_NOACTTPADM);
47 47
             exit();
48 48
         }
49 49
         if ($xoopsConfig['closesite'] == 1) {
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
                 }
56 56
             }
57 57
             if (!$allowed) {
58
-                redirect_header(XOOPS_URL . '/index.php', 1, _NOPERM);
58
+                redirect_header(XOOPS_URL.'/index.php', 1, _NOPERM);
59 59
                 exit();
60 60
             }
61 61
         }
@@ -66,13 +66,13 @@  discard block
 block discarded – undo
66 66
         $_SESSION['xoopsUserId']     = $user->getVar('uid');
67 67
         $_SESSION['xoopsUserGroups'] = $user->getGroups();
68 68
         if (!empty($xoopsConfig['use_ssl'])) {
69
-            xoops_confirm(array($xoopsConfig['sslpost_name'] => session_id()), XOOPS_URL . '/misc.php?action=showpopups&amp;type=ssllogin', _US_PRESSLOGIN, _LOGIN);
69
+            xoops_confirm(array($xoopsConfig['sslpost_name'] => session_id()), XOOPS_URL.'/misc.php?action=showpopups&amp;type=ssllogin', _US_PRESSLOGIN, _LOGIN);
70 70
         } else {
71 71
             echo sprintf(_US_LOGGINGU, $user->getVar('uname'));
72
-            echo '<div style="text-align:center;"><input value="' . _CLOSE . '" type="button" onclick="document.window.opener.location.reload();document.window.close();" /></div>';
72
+            echo '<div style="text-align:center;"><input value="'._CLOSE.'" type="button" onclick="document.window.opener.location.reload();document.window.close();" /></div>';
73 73
         }
74 74
     } else {
75
-        xoops_error(_US_INCORRECTLOGIN . '<br><a href="login.php">' . _BACK . '</a>');
75
+        xoops_error(_US_INCORRECTLOGIN.'<br><a href="login.php">'._BACK.'</a>');
76 76
     }
77 77
 }
78 78
 
@@ -82,16 +82,16 @@  discard block
 block discarded – undo
82 82
     <form action="login.php" method="post">
83 83
       <table class="outer" width="95%">
84 84
         <tr>
85
-          <td class="head">' . _USERNAME . '</td>
85
+          <td class="head">' . _USERNAME.'</td>
86 86
           <td class="even"><input type="text" name="username" value="" /></td>
87 87
         </tr>
88 88
         <tr>
89
-          <td class="head">' . _PASSWORD . '</td>
89
+          <td class="head">' . _PASSWORD.'</td>
90 90
           <td class="even"><input type="password" name="userpass" value="" /></td>
91 91
         </tr>
92 92
         <tr>
93 93
           <td class="head">&nbsp;</td>
94
-          <td class="even"><input type="hidden" name="op" value="dologin" /><input type="submit" name="submit" value="' . _LOGIN . '" /></td>
94
+          <td class="even"><input type="hidden" name="op" value="dologin" /><input type="submit" name="submit" value="' . _LOGIN.'" /></td>
95 95
         </tr>
96 96
       </table>
97 97
     </form>
Please login to merge, or discard this patch.
extras/mainfile.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,6 +14,6 @@
 block discarded – undo
14 14
  * Typical writable permission would be 665 (user read/write, group read/write, other read)
15 15
  * If problems persist, escalate permission to 777 (world read/write/execute) as a last resort.
16 16
  */
17
-if (! defined('XOOPS_INSTALL')) {
17
+if (!defined('XOOPS_INSTALL')) {
18 18
     header('Location: install/index.php');
19 19
 }
Please login to merge, or discard this patch.
upgrade/cnt-2.2.x-to-2.3.0/index.php 1 patch
Spacing   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
      */
31 31
     public function check_config()
32 32
     {
33
-        $sql    = 'SHOW COLUMNS FROM `' . $GLOBALS['xoopsDB']->prefix('configcategory') . "` LIKE 'confcat_modid'";
33
+        $sql    = 'SHOW COLUMNS FROM `'.$GLOBALS['xoopsDB']->prefix('configcategory')."` LIKE 'confcat_modid'";
34 34
         $result = $GLOBALS['xoopsDB']->queryF($sql);
35 35
         if (!$result) {
36 36
             return true;
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         if (!$profile_module = $module_handler->getByDirname('profile')) {
50 50
             return true;
51 51
         }
52
-        $sql    = 'SHOW COLUMNS FROM ' . $GLOBALS['xoopsDB']->prefix('users') . " LIKE 'posts'";
52
+        $sql    = 'SHOW COLUMNS FROM '.$GLOBALS['xoopsDB']->prefix('users')." LIKE 'posts'";
53 53
         $result = $GLOBALS['xoopsDB']->queryF($sql);
54 54
         if (!$result) {
55 55
             return false;
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
      */
65 65
     public function check_block()
66 66
     {
67
-        $sql    = "SHOW TABLES LIKE '" . $GLOBALS['xoopsDB']->prefix('block_instance') . "'";
67
+        $sql    = "SHOW TABLES LIKE '".$GLOBALS['xoopsDB']->prefix('block_instance')."'";
68 68
         $result = $GLOBALS['xoopsDB']->queryF($sql);
69 69
         if (!$result) {
70 70
             return true;
@@ -98,25 +98,25 @@  discard block
 block discarded – undo
98 98
         $result = true;
99 99
 
100 100
         //Set core configuration back to zero for system module
101
-        $xoopsDB->queryF('UPDATE `' . $xoopsDB->prefix('config') . '` SET conf_modid = 0 WHERE conf_modid = 1');
101
+        $xoopsDB->queryF('UPDATE `'.$xoopsDB->prefix('config').'` SET conf_modid = 0 WHERE conf_modid = 1');
102 102
 
103 103
         //Change debug modes so there can only be one active at any one time
104
-        $xoopsDB->queryF('UPDATE `' . $xoopsDB->prefix('config') . "` SET conf_formtype = 'select', conf_valuetype = 'int' WHERE conf_name = 'debug_mode'");
104
+        $xoopsDB->queryF('UPDATE `'.$xoopsDB->prefix('config')."` SET conf_formtype = 'select', conf_valuetype = 'int' WHERE conf_name = 'debug_mode'");
105 105
 
106 106
         //Reset category ID for non-system configs
107
-        $xoopsDB->queryF('UPDATE `' . $xoopsDB->prefix('config') . '` SET conf_catid = 0 WHERE conf_modid > 1 AND conf_catid > 0');
107
+        $xoopsDB->queryF('UPDATE `'.$xoopsDB->prefix('config').'` SET conf_catid = 0 WHERE conf_modid > 1 AND conf_catid > 0');
108 108
 
109 109
         // remove admin theme configuration item
110
-        $xoopsDB->queryF('DELETE FROM `' . $xoopsDB->prefix('config') . "` WHERE conf_name='theme_set_admin'");
110
+        $xoopsDB->queryF('DELETE FROM `'.$xoopsDB->prefix('config')."` WHERE conf_name='theme_set_admin'");
111 111
 
112 112
         //Drop non-System config categories
113
-        $xoopsDB->queryF('DELETE FROM `' . $xoopsDB->prefix('configcategory') . '` WHERE confcat_modid > 1');
113
+        $xoopsDB->queryF('DELETE FROM `'.$xoopsDB->prefix('configcategory').'` WHERE confcat_modid > 1');
114 114
 
115 115
         //Drop category information fields added in 2.2
116
-        $xoopsDB->queryF('ALTER TABLE `' . $xoopsDB->prefix('configcategory') . '` DROP `confcat_nameid`, DROP `confcat_description`, DROP `confcat_modid`');
116
+        $xoopsDB->queryF('ALTER TABLE `'.$xoopsDB->prefix('configcategory').'` DROP `confcat_nameid`, DROP `confcat_description`, DROP `confcat_modid`');
117 117
 
118 118
         // Re-add user configuration category
119
-        $xoopsDB->queryF('INSERT INTO `' . $xoopsDB->prefix('configcategory') . "` (confcat_id, confcat_name, confcat_order) VALUES (2, '_MD_AM_USERSETTINGS', 2)");
119
+        $xoopsDB->queryF('INSERT INTO `'.$xoopsDB->prefix('configcategory')."` (confcat_id, confcat_name, confcat_order) VALUES (2, '_MD_AM_USERSETTINGS', 2)");
120 120
 
121 121
         //Rebuild user configuration items
122 122
         //Get values from Profile module
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
             }
155 155
         }
156 156
 
157
-        $xoopsDB->queryF('INSERT INTO `' . $xoopsDB->prefix('config') . '` (conf_modid, conf_catid, conf_name, conf_title, conf_value, conf_desc, conf_formtype, conf_valuetype, conf_order) VALUES ' . " (0, 2, 'minpass', '_MD_AM_MINPASS', " . $xoopsDB->quote($profile_config_arr['minpass']) . ", '_MD_AM_MINPASSDSC', 'textbox', 'int', 1)," . " (0, 2, 'minuname', '_MD_AM_MINUNAME', " . $xoopsDB->quote($profile_config_arr['minuname']) . ", '_MD_AM_MINUNAMEDSC', 'textbox', 'int', 2)," . " (0, 2, 'new_user_notify', '_MD_AM_NEWUNOTIFY', " . $xoopsDB->quote($profile_config_arr['new_user_notify']) . ", '_MD_AM_NEWUNOTIFYDSC', 'yesno', 'int', 4)," . " (0, 2, 'new_user_notify_group', '_MD_AM_NOTIFYTO', " . $xoopsDB->quote($profile_config_arr['new_user_notify_group']) . ", '_MD_AM_NOTIFYTODSC', 'group', 'int', 6)," . " (0, 2, 'activation_type', '_MD_AM_ACTVTYPE', " . $xoopsDB->quote($profile_config_arr['activation_type']) . ", '_MD_AM_ACTVTYPEDSC', 'select', 'int', 8)," . " (0, 2, 'activation_group', '_MD_AM_ACTVGROUP', " . $xoopsDB->quote($profile_config_arr['activation_group']) . ", '_MD_AM_ACTVGROUPDSC', 'group', 'int', 10)," . " (0, 2, 'uname_test_level', '_MD_AM_UNAMELVL', " . $xoopsDB->quote($profile_config_arr['uname_test_level']) . ", '_MD_AM_UNAMELVLDSC', 'select', 'int', 12)," . " (0, 2, 'avatar_allow_upload', '_MD_AM_AVATARALLOW', " . $xoopsDB->quote($profile_config_arr['avatar_allow_upload']) . ", '_MD_AM_AVATARALWDSC', 'yesno', 'int', 14)," . " (0, 2, 'avatar_width', '_MD_AM_AVATARW', " . $xoopsDB->quote($profile_config_arr['avatar_width']) . ", '_MD_AM_AVATARWDSC', 'textbox', 'int', 16)," . " (0, 2, 'avatar_height', '_MD_AM_AVATARH', " . $xoopsDB->quote($profile_config_arr['avatar_height']) . ", '_MD_AM_AVATARHDSC', 'textbox', 'int', 18)," . " (0, 2, 'avatar_maxsize', '_MD_AM_AVATARMAX', " . $xoopsDB->quote($profile_config_arr['avatar_maxsize']) . ", '_MD_AM_AVATARMAXDSC', 'textbox', 'int', 20)," . " (0, 2, 'self_delete', '_MD_AM_SELFDELETE', " . $xoopsDB->quote($profile_config_arr['self_delete']) . ", '_MD_AM_SELFDELETEDSC', 'yesno', 'int', 22)," . " (0, 2, 'bad_unames', '_MD_AM_BADUNAMES', " . $xoopsDB->quote($profile_config_arr['bad_unames']) . ", '_MD_AM_BADUNAMESDSC', 'textarea', 'array', 24)," . " (0, 2, 'bad_emails', '_MD_AM_BADEMAILS', " . $xoopsDB->quote($profile_config_arr['bad_emails']) . ", '_MD_AM_BADEMAILSDSC', 'textarea', 'array', 26)," . " (0, 2, 'maxuname', '_MD_AM_MAXUNAME', " . $xoopsDB->quote($profile_config_arr['maxuname']) . ", '_MD_AM_MAXUNAMEDSC', 'textbox', 'int', 3)," . " (0, 2, 'avatar_minposts', '_MD_AM_AVATARMP', " . $xoopsDB->quote($profile_config_arr['avatar_minposts']) . ", '_MD_AM_AVATARMPDSC', 'textbox', 'int', 15)," . " (0, 2, 'allow_chgmail', '_MD_AM_ALLWCHGMAIL', " . $xoopsDB->quote($profile_config_arr['allow_chgmail']) . ", '_MD_AM_ALLWCHGMAILDSC', 'yesno', 'int', 3)," . " (0, 2, 'reg_dispdsclmr', '_MD_AM_DSPDSCLMR', " . $xoopsDB->quote($profile_config_arr['reg_dispdsclmr']) . ", '_MD_AM_DSPDSCLMRDSC', 'yesno', 'int', 30)," . " (0, 2, 'reg_disclaimer', '_MD_AM_REGDSCLMR', " . $xoopsDB->quote($profile_config_arr['reg_disclaimer']) . ", '_MD_AM_REGDSCLMRDSC', 'textarea', 'text', 32)," . " (0, 2, 'allow_register', '_MD_AM_ALLOWREG', " . $xoopsDB->quote($profile_config_arr['allow_register']) . ", '_MD_AM_ALLOWREGDSC', 'yesno', 'int', 0)");
157
+        $xoopsDB->queryF('INSERT INTO `'.$xoopsDB->prefix('config').'` (conf_modid, conf_catid, conf_name, conf_title, conf_value, conf_desc, conf_formtype, conf_valuetype, conf_order) VALUES '." (0, 2, 'minpass', '_MD_AM_MINPASS', ".$xoopsDB->quote($profile_config_arr['minpass']).", '_MD_AM_MINPASSDSC', 'textbox', 'int', 1),"." (0, 2, 'minuname', '_MD_AM_MINUNAME', ".$xoopsDB->quote($profile_config_arr['minuname']).", '_MD_AM_MINUNAMEDSC', 'textbox', 'int', 2),"." (0, 2, 'new_user_notify', '_MD_AM_NEWUNOTIFY', ".$xoopsDB->quote($profile_config_arr['new_user_notify']).", '_MD_AM_NEWUNOTIFYDSC', 'yesno', 'int', 4),"." (0, 2, 'new_user_notify_group', '_MD_AM_NOTIFYTO', ".$xoopsDB->quote($profile_config_arr['new_user_notify_group']).", '_MD_AM_NOTIFYTODSC', 'group', 'int', 6),"." (0, 2, 'activation_type', '_MD_AM_ACTVTYPE', ".$xoopsDB->quote($profile_config_arr['activation_type']).", '_MD_AM_ACTVTYPEDSC', 'select', 'int', 8),"." (0, 2, 'activation_group', '_MD_AM_ACTVGROUP', ".$xoopsDB->quote($profile_config_arr['activation_group']).", '_MD_AM_ACTVGROUPDSC', 'group', 'int', 10),"." (0, 2, 'uname_test_level', '_MD_AM_UNAMELVL', ".$xoopsDB->quote($profile_config_arr['uname_test_level']).", '_MD_AM_UNAMELVLDSC', 'select', 'int', 12),"." (0, 2, 'avatar_allow_upload', '_MD_AM_AVATARALLOW', ".$xoopsDB->quote($profile_config_arr['avatar_allow_upload']).", '_MD_AM_AVATARALWDSC', 'yesno', 'int', 14),"." (0, 2, 'avatar_width', '_MD_AM_AVATARW', ".$xoopsDB->quote($profile_config_arr['avatar_width']).", '_MD_AM_AVATARWDSC', 'textbox', 'int', 16),"." (0, 2, 'avatar_height', '_MD_AM_AVATARH', ".$xoopsDB->quote($profile_config_arr['avatar_height']).", '_MD_AM_AVATARHDSC', 'textbox', 'int', 18),"." (0, 2, 'avatar_maxsize', '_MD_AM_AVATARMAX', ".$xoopsDB->quote($profile_config_arr['avatar_maxsize']).", '_MD_AM_AVATARMAXDSC', 'textbox', 'int', 20),"." (0, 2, 'self_delete', '_MD_AM_SELFDELETE', ".$xoopsDB->quote($profile_config_arr['self_delete']).", '_MD_AM_SELFDELETEDSC', 'yesno', 'int', 22),"." (0, 2, 'bad_unames', '_MD_AM_BADUNAMES', ".$xoopsDB->quote($profile_config_arr['bad_unames']).", '_MD_AM_BADUNAMESDSC', 'textarea', 'array', 24),"." (0, 2, 'bad_emails', '_MD_AM_BADEMAILS', ".$xoopsDB->quote($profile_config_arr['bad_emails']).", '_MD_AM_BADEMAILSDSC', 'textarea', 'array', 26),"." (0, 2, 'maxuname', '_MD_AM_MAXUNAME', ".$xoopsDB->quote($profile_config_arr['maxuname']).", '_MD_AM_MAXUNAMEDSC', 'textbox', 'int', 3),"." (0, 2, 'avatar_minposts', '_MD_AM_AVATARMP', ".$xoopsDB->quote($profile_config_arr['avatar_minposts']).", '_MD_AM_AVATARMPDSC', 'textbox', 'int', 15),"." (0, 2, 'allow_chgmail', '_MD_AM_ALLWCHGMAIL', ".$xoopsDB->quote($profile_config_arr['allow_chgmail']).", '_MD_AM_ALLWCHGMAILDSC', 'yesno', 'int', 3),"." (0, 2, 'reg_dispdsclmr', '_MD_AM_DSPDSCLMR', ".$xoopsDB->quote($profile_config_arr['reg_dispdsclmr']).", '_MD_AM_DSPDSCLMRDSC', 'yesno', 'int', 30),"." (0, 2, 'reg_disclaimer', '_MD_AM_REGDSCLMR', ".$xoopsDB->quote($profile_config_arr['reg_disclaimer']).", '_MD_AM_REGDSCLMRDSC', 'textarea', 'text', 32),"." (0, 2, 'allow_register', '_MD_AM_ALLOWREG', ".$xoopsDB->quote($profile_config_arr['allow_register']).", '_MD_AM_ALLOWREGDSC', 'yesno', 'int', 0)");
158 158
 
159 159
         //Rebuild user configuration options
160 160
         $criteria = new CriteriaCompo(new Criteria('conf_name', "('activation_type', 'uname_test_level')", 'IN'));
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
         $configs             = $config_handler->getConfigs($criteria);
165 165
         $id_activation_type  = $configs[0]->getVar('conf_id');
166 166
         $id_uname_test_level = $configs[1]->getVar('conf_id');
167
-        $xoopsDB->queryF('INSERT INTO `' . $xoopsDB->prefix('configoption') . '` (confop_name, confop_value, conf_id) VALUES ' . " ('_MD_AM_USERACTV', '0', {$id_activation_type})," . " ('_MD_AM_AUTOACTV', '1', {$id_activation_type})," . " ('_MD_AM_ADMINACTV', '2', {$id_activation_type})," . " ('_MD_AM_STRICT', '0', {$id_uname_test_level})," . " ('_MD_AM_MEDIUM', '1', {$id_uname_test_level})," . " ('_MD_AM_LIGHT', '2', {$id_uname_test_level})");
167
+        $xoopsDB->queryF('INSERT INTO `'.$xoopsDB->prefix('configoption').'` (confop_name, confop_value, conf_id) VALUES '." ('_MD_AM_USERACTV', '0', {$id_activation_type}),"." ('_MD_AM_AUTOACTV', '1', {$id_activation_type}),"." ('_MD_AM_ADMINACTV', '2', {$id_activation_type}),"." ('_MD_AM_STRICT', '0', {$id_uname_test_level}),"." ('_MD_AM_MEDIUM', '1', {$id_uname_test_level}),"." ('_MD_AM_LIGHT', '2', {$id_uname_test_level})");
168 168
 
169 169
         return $result;
170 170
     }
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
     {
177 177
         global $xoopsDB;
178 178
         // Restore users table
179
-        $xoopsDB->queryF('ALTER TABLE `' . $xoopsDB->prefix('users') . "`
179
+        $xoopsDB->queryF('ALTER TABLE `'.$xoopsDB->prefix('users')."`
180 180
               ADD url varchar(100) NOT NULL default '',
181 181
               ADD user_regdate int(10) unsigned NOT NULL default '0',
182 182
               ADD user_icq varchar(15) NOT NULL default '',
@@ -228,15 +228,15 @@  discard block
 block discarded – undo
228 228
             'user_intrest',
229 229
             'user_mailok');
230 230
         foreach ($profile_fields as $field) {
231
-            $xoopsDB->queryF('UPDATE `' . $xoopsDB->prefix('users') . '` u, `' . $xoopsDB->prefix('user_profile') . "` p SET u.{$field} = p.{$field} WHERE u.uid=p.profileid");
231
+            $xoopsDB->queryF('UPDATE `'.$xoopsDB->prefix('users').'` u, `'.$xoopsDB->prefix('user_profile')."` p SET u.{$field} = p.{$field} WHERE u.uid=p.profileid");
232 232
         }
233 233
 
234 234
         //Set display name as real name
235
-        $xoopsDB->queryF('UPDATE `' . $xoopsDB->prefix('users') . "` SET name=uname WHERE name=''");
235
+        $xoopsDB->queryF('UPDATE `'.$xoopsDB->prefix('users')."` SET name=uname WHERE name=''");
236 236
         //Set loginname as uname
237
-        $xoopsDB->queryF('UPDATE `' . $xoopsDB->prefix('users') . '` SET uname=loginname');
237
+        $xoopsDB->queryF('UPDATE `'.$xoopsDB->prefix('users').'` SET uname=loginname');
238 238
         //Drop loginname
239
-        $xoopsDB->queryF('ALTER TABLE `' . $xoopsDB->prefix('users') . '` DROP loginname');
239
+        $xoopsDB->queryF('ALTER TABLE `'.$xoopsDB->prefix('users').'` DROP loginname');
240 240
 
241 241
         return true;
242 242
     }
@@ -268,23 +268,23 @@  discard block
 block discarded – undo
268 268
     public function apply_block()
269 269
     {
270 270
         global $xoopsDB;
271
-        $xoopsDB->queryF('UPDATE ' . $xoopsDB->prefix('block_module_link') . ' SET module_id = -1, pageid = 0 WHERE module_id < 2 AND pageid = 1');
271
+        $xoopsDB->queryF('UPDATE '.$xoopsDB->prefix('block_module_link').' SET module_id = -1, pageid = 0 WHERE module_id < 2 AND pageid = 1');
272 272
 
273 273
         //Change block module link to remove pages
274 274
         //Remove page links for module subpages
275
-        $xoopsDB->queryF('DELETE FROM ' . $xoopsDB->prefix('block_module_link') . ' WHERE pageid > 0');
275
+        $xoopsDB->queryF('DELETE FROM '.$xoopsDB->prefix('block_module_link').' WHERE pageid > 0');
276 276
 
277
-        $sql = 'ALTER TABLE `' . $xoopsDB->prefix('block_module_link') . '` DROP PRIMARY KEY';
277
+        $sql = 'ALTER TABLE `'.$xoopsDB->prefix('block_module_link').'` DROP PRIMARY KEY';
278 278
         $xoopsDB->queryF($sql);
279
-        $sql = 'ALTER TABLE `' . $xoopsDB->prefix('block_module_link') . '` DROP pageid';
279
+        $sql = 'ALTER TABLE `'.$xoopsDB->prefix('block_module_link').'` DROP pageid';
280 280
         $xoopsDB->queryF($sql);
281
-        $sql = 'ALTER IGNORE TABLE `' . $xoopsDB->prefix('block_module_link') . '` ADD PRIMARY KEY (`block_id` , `module_id`)';
281
+        $sql = 'ALTER IGNORE TABLE `'.$xoopsDB->prefix('block_module_link').'` ADD PRIMARY KEY (`block_id` , `module_id`)';
282 282
         $xoopsDB->queryF($sql);
283 283
 
284
-        $xoopsDB->queryF('RENAME TABLE `' . $xoopsDB->prefix('newblocks') . '` TO `' . $xoopsDB->prefix('newblocks_bak') . '`');
284
+        $xoopsDB->queryF('RENAME TABLE `'.$xoopsDB->prefix('newblocks').'` TO `'.$xoopsDB->prefix('newblocks_bak').'`');
285 285
 
286 286
         // Create new block table
287
-        $sql = 'CREATE TABLE ' . $xoopsDB->prefix('newblocks') . " (
287
+        $sql = 'CREATE TABLE '.$xoopsDB->prefix('newblocks')." (
288 288
               bid mediumint(8) unsigned NOT NULL auto_increment,
289 289
               mid smallint(5) unsigned NOT NULL default '0',
290 290
               func_num tinyint(3) unsigned NOT NULL default '0',
@@ -314,15 +314,15 @@  discard block
 block discarded – undo
314 314
             ";
315 315
         $xoopsDB->queryF($sql);
316 316
 
317
-        $sql    = '   SELECT MAX(instanceid) FROM ' . $xoopsDB->prefix('block_instance');
317
+        $sql    = '   SELECT MAX(instanceid) FROM '.$xoopsDB->prefix('block_instance');
318 318
         $result = $xoopsDB->query($sql);
319 319
         list($MaxInstanceId) = $xoopsDB->fetchRow($result);
320 320
 
321 321
         // Change custom block mid from 1 to 0
322
-        $sql    = 'UPDATE `' . $xoopsDB->prefix('newblocks_bak') . "` SET mid = 0 WHERE show_func = 'b_system_custom_show'";
322
+        $sql    = 'UPDATE `'.$xoopsDB->prefix('newblocks_bak')."` SET mid = 0 WHERE show_func = 'b_system_custom_show'";
323 323
         $result = $xoopsDB->queryF($sql);
324 324
 
325
-        $sql       = '   SELECT b.*, i.instanceid ' . '   FROM ' . $xoopsDB->prefix('block_instance') . ' AS i LEFT JOIN ' . $xoopsDB->prefix('newblocks_bak') . ' AS b ON b.bid = i.bid ' . '   GROUP BY b.dirname, b.bid, i.instanceid';
325
+        $sql       = '   SELECT b.*, i.instanceid '.'   FROM '.$xoopsDB->prefix('block_instance').' AS i LEFT JOIN '.$xoopsDB->prefix('newblocks_bak').' AS b ON b.bid = i.bid '.'   GROUP BY b.dirname, b.bid, i.instanceid';
326 326
         $result    = $xoopsDB->query($sql);
327 327
         $dirname   = '';
328 328
         $bid       = 0;
@@ -331,7 +331,7 @@  discard block
 block discarded – undo
331 331
             if ($row['dirname'] != $dirname) {
332 332
                 $dirname    = $row['dirname'];
333 333
                 $modversion = array();
334
-                if (!@include XOOPS_ROOT_PATH . '/modules/' . $dirname . '/xoops_version.php') {
334
+                if (!@include XOOPS_ROOT_PATH.'/modules/'.$dirname.'/xoops_version.php') {
335 335
                     continue;
336 336
                 }
337 337
             }
@@ -351,11 +351,11 @@  discard block
 block discarded – undo
351 351
             }
352 352
 
353 353
             // Copy data from block instance table and blocks table
354
-            $sql = '    INSERT INTO ' . $xoopsDB->prefix('newblocks') . '        (bid, mid, options, name, title, side, weight, visible, ' . '            func_num, ' . '            block_type, ' . '           c_type, ' . '            isactive, dirname, func_file,' . '            show_func, edit_func, template, bcachetime, last_modified)' . '    SELECT ' . '        i.instanceid, c.mid, i.options, c.name, i.title, i.side, i.weight, i.visible, ' . "        {$block_key}, " . ($isClone ? " CASE WHEN c.show_func='b_system_custom_show' THEN 'C' ELSE 'D' END," : " CASE WHEN c.show_func='b_system_custom_show' THEN 'C' WHEN c.mid = 1 THEN 'S' ELSE 'M' END,") . "        CASE WHEN c.c_type='' THEN 'H' ELSE c.c_type END," . '        c.isactive, c.dirname, c.func_file,' . '        c.show_func, c.edit_func, c.template, i.bcachetime, c.last_modified' . '    FROM ' . $xoopsDB->prefix('block_instance') . ' AS i,' . '        ' . $xoopsDB->prefix('newblocks_bak') . ' AS c' . '    WHERE i.bid = c.bid' . '        AND i.instanceid = ' . $row['instanceid'];
354
+            $sql = '    INSERT INTO '.$xoopsDB->prefix('newblocks').'        (bid, mid, options, name, title, side, weight, visible, '.'            func_num, '.'            block_type, '.'           c_type, '.'            isactive, dirname, func_file,'.'            show_func, edit_func, template, bcachetime, last_modified)'.'    SELECT '.'        i.instanceid, c.mid, i.options, c.name, i.title, i.side, i.weight, i.visible, '."        {$block_key}, ".($isClone ? " CASE WHEN c.show_func='b_system_custom_show' THEN 'C' ELSE 'D' END," : " CASE WHEN c.show_func='b_system_custom_show' THEN 'C' WHEN c.mid = 1 THEN 'S' ELSE 'M' END,")."        CASE WHEN c.c_type='' THEN 'H' ELSE c.c_type END,".'        c.isactive, c.dirname, c.func_file,'.'        c.show_func, c.edit_func, c.template, i.bcachetime, c.last_modified'.'    FROM '.$xoopsDB->prefix('block_instance').' AS i,'.'        '.$xoopsDB->prefix('newblocks_bak').' AS c'.'    WHERE i.bid = c.bid'.'        AND i.instanceid = '.$row['instanceid'];
355 355
             $xoopsDB->queryF($sql);
356 356
         }
357 357
 
358
-        $sql = '   SELECT b.* ' . '   FROM ' . $xoopsDB->prefix('newblocks_bak') . ' AS b LEFT JOIN ' . $xoopsDB->prefix('block_instance') . ' AS i ON b.bid = i.bid ' . '   WHERE i.instanceid IS NULL';
358
+        $sql = '   SELECT b.* '.'   FROM '.$xoopsDB->prefix('newblocks_bak').' AS b LEFT JOIN '.$xoopsDB->prefix('block_instance').' AS i ON b.bid = i.bid '.'   WHERE i.instanceid IS NULL';
359 359
         '   GROUP BY b.dirname, b.bid';
360 360
         $result    = $xoopsDB->query($sql);
361 361
         $dirname   = '';
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
             if ($row['dirname'] != $dirname) {
366 366
                 $dirname    = $row['dirname'];
367 367
                 $modversion = array();
368
-                if (!@include XOOPS_ROOT_PATH . '/modules/' . $dirname . '/xoops_version.php') {
368
+                if (!@include XOOPS_ROOT_PATH.'/modules/'.$dirname.'/xoops_version.php') {
369 369
                     continue;
370 370
                 }
371 371
             }
@@ -383,32 +383,32 @@  discard block
 block discarded – undo
383 383
             }
384 384
 
385 385
             // Copy data from blocks table
386
-            $sql = '    INSERT INTO ' . $xoopsDB->prefix('newblocks') . '        (bid, mid, options, name, title, side, weight, visible, ' . '            func_num, ' . '            block_type, ' . '           c_type, ' . '            isactive, dirname, func_file,' . '            show_func, edit_func, template, bcachetime, last_modified)' . '    SELECT ' . "        bid + {$MaxInstanceId}, mid, options, name, name, 0, 0, 0, " . "        {$block_key}, " . "        CASE WHEN show_func='b_system_custom_show' THEN 'C' WHEN mid = 1 THEN 'S' ELSE 'M' END," . "        CASE WHEN c_type='' THEN 'H' ELSE c_type END," . '        isactive, dirname, func_file,' . '        show_func, edit_func, template, 0, last_modified' . '    FROM ' . $xoopsDB->prefix('newblocks_bak') . '    WHERE bid = ' . $row['bid'];
386
+            $sql = '    INSERT INTO '.$xoopsDB->prefix('newblocks').'        (bid, mid, options, name, title, side, weight, visible, '.'            func_num, '.'            block_type, '.'           c_type, '.'            isactive, dirname, func_file,'.'            show_func, edit_func, template, bcachetime, last_modified)'.'    SELECT '."        bid + {$MaxInstanceId}, mid, options, name, name, 0, 0, 0, "."        {$block_key}, "."        CASE WHEN show_func='b_system_custom_show' THEN 'C' WHEN mid = 1 THEN 'S' ELSE 'M' END,"."        CASE WHEN c_type='' THEN 'H' ELSE c_type END,".'        isactive, dirname, func_file,'.'        show_func, edit_func, template, 0, last_modified'.'    FROM '.$xoopsDB->prefix('newblocks_bak').'    WHERE bid = '.$row['bid'];
387 387
             $xoopsDB->queryF($sql);
388 388
 
389 389
             // Build block-module link
390
-            $sql = '    INSERT INTO ' . $xoopsDB->prefix('block_module_link') . '        (block_id, module_id)' . '    SELECT ' . "        bid + {$MaxInstanceId}, -1" . '    FROM ' . $xoopsDB->prefix('newblocks_bak') . '    WHERE bid = ' . $row['bid'];
390
+            $sql = '    INSERT INTO '.$xoopsDB->prefix('block_module_link').'        (block_id, module_id)'.'    SELECT '."        bid + {$MaxInstanceId}, -1".'    FROM '.$xoopsDB->prefix('newblocks_bak').'    WHERE bid = '.$row['bid'];
391 391
             $xoopsDB->queryF($sql);
392 392
         }
393 393
 
394 394
         // Dealing with tables
395
-        $xoopsDB->queryF('DROP TABLE `' . $xoopsDB->prefix('block_instance') . '`;');
396
-        $xoopsDB->queryF('DROP TABLE `' . $xoopsDB->prefix('newblocks_bak') . '`;');
395
+        $xoopsDB->queryF('DROP TABLE `'.$xoopsDB->prefix('block_instance').'`;');
396
+        $xoopsDB->queryF('DROP TABLE `'.$xoopsDB->prefix('newblocks_bak').'`;');
397 397
 
398 398
         // Deal with custom blocks, convert options to type and content
399
-        $sql    = 'SELECT bid, options FROM `' . $xoopsDB->prefix('newblocks') . "` WHERE show_func='b_system_custom_show'";
399
+        $sql    = 'SELECT bid, options FROM `'.$xoopsDB->prefix('newblocks')."` WHERE show_func='b_system_custom_show'";
400 400
         $result = $xoopsDB->query($sql);
401 401
         while (false !== (list($bid, $options) = $xoopsDB->fetchRow($result))) {
402 402
             $_options = unserialize($options);
403 403
             $content  = $_options[0];
404 404
             $type     = $_options[1];
405
-            $xoopsDB->queryF('UPDATE `' . $xoopsDB->prefix('newblocks') . "` SET c_type = '{$type}', options = '', content = " . $xoopsDB->quote($content) . " WHERE bid = {$bid}");
405
+            $xoopsDB->queryF('UPDATE `'.$xoopsDB->prefix('newblocks')."` SET c_type = '{$type}', options = '', content = ".$xoopsDB->quote($content)." WHERE bid = {$bid}");
406 406
         }
407 407
 
408 408
         // Deal with block options, convert array values to "," and "|" delimited
409
-        $sql    = 'UPDATE `' . $xoopsDB->prefix('newblocks') . "` SET options = '' WHERE show_func <> 'b_system_custom_show' AND ( options = 'a:1:{i:0;s:0:\"\";}' OR options = 'a:0:{}' )";
409
+        $sql    = 'UPDATE `'.$xoopsDB->prefix('newblocks')."` SET options = '' WHERE show_func <> 'b_system_custom_show' AND ( options = 'a:1:{i:0;s:0:\"\";}' OR options = 'a:0:{}' )";
410 410
         $result = $xoopsDB->queryF($sql);
411
-        $sql    = 'SELECT bid, options FROM `' . $xoopsDB->prefix('newblocks') . "` WHERE show_func <> 'b_system_custom_show' AND options <> ''";
411
+        $sql    = 'SELECT bid, options FROM `'.$xoopsDB->prefix('newblocks')."` WHERE show_func <> 'b_system_custom_show' AND options <> ''";
412 412
         $result = $xoopsDB->query($sql);
413 413
         while (false !== (list($bid, $_options) = $xoopsDB->fetchRow($result))) {
414 414
             $options = unserialize($_options);
@@ -423,7 +423,7 @@  discard block
 block discarded – undo
423 423
                 }
424 424
             }
425 425
             $options = implode('|', $options);
426
-            $sql     = 'UPDATE `' . $xoopsDB->prefix('newblocks') . '` SET options = ' . $xoopsDB->quote($options) . " WHERE bid = {$bid}";
426
+            $sql     = 'UPDATE `'.$xoopsDB->prefix('newblocks').'` SET options = '.$xoopsDB->quote($options)." WHERE bid = {$bid}";
427 427
             $xoopsDB->queryF($sql);
428 428
         }
429 429
 
Please login to merge, or discard this patch.
upgrade/upd-2.0.15-to-2.0.16/index.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
     public function check_auth_db()
12 12
     {
13 13
         $db    = $GLOBALS['xoopsDB'];
14
-        $value = $this->getDbValue($db, 'config', 'conf_id', "`conf_name` = 'ldap_use_TLS' AND `conf_catid` = " . XOOPS_CONF_AUTH);
14
+        $value = $this->getDbValue($db, 'config', 'conf_id', "`conf_name` = 'ldap_use_TLS' AND `conf_catid` = ".XOOPS_CONF_AUTH);
15 15
 
16 16
         return (bool)$value;
17 17
     }
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
             'ldap_use_TLS' => "'_MD_AM_LDAP_USETLS', '0', '_MD_AM_LDAP_USETLS_DESC', 'yesno', 'int', 21");
41 41
         foreach ($data as $name => $values) {
42 42
             if (!$this->getDbValue($db, 'config', 'conf_id', "`conf_modid`=0 AND `conf_catid`=7 AND `conf_name`='$name'")) {
43
-                $this->query("INSERT INTO `$table` (conf_modid,conf_catid,conf_name,conf_title,conf_value,conf_desc,conf_formtype,conf_valuetype,conf_order) " . "VALUES ( 0,7,'$name',$values)");
43
+                $this->query("INSERT INTO `$table` (conf_modid,conf_catid,conf_name,conf_title,conf_value,conf_desc,conf_formtype,conf_valuetype,conf_order) "."VALUES ( 0,7,'$name',$values)");
44 44
             }
45 45
         }
46 46
 
Please login to merge, or discard this patch.
upgrade/upd-2.5.5-to-2.5.6/index.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
     public function __construct()
21 21
     {
22 22
         parent::__construct(basename(__DIR__));
23
-        $this->tasks = array('com_user', 'com_email',  'com_url');
23
+        $this->tasks = array('com_user', 'com_email', 'com_url');
24 24
     }
25 25
 
26 26
     /**
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
      */
30 30
     public function check_com_user()
31 31
     {
32
-        $result = $GLOBALS['xoopsDB']->queryF('SHOW COLUMNS FROM ' . $GLOBALS['xoopsDB']->prefix('xoopscomments') . " LIKE 'com_user'");
32
+        $result = $GLOBALS['xoopsDB']->queryF('SHOW COLUMNS FROM '.$GLOBALS['xoopsDB']->prefix('xoopscomments')." LIKE 'com_user'");
33 33
 
34 34
         return ($GLOBALS['xoopsDB']->getRowsNum($result) > 0);
35 35
 
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
      */
42 42
     public function check_com_email()
43 43
     {
44
-        $result = $GLOBALS['xoopsDB']->queryF('SHOW COLUMNS FROM ' . $GLOBALS['xoopsDB']->prefix('xoopscomments') . " LIKE 'com_email'");
44
+        $result = $GLOBALS['xoopsDB']->queryF('SHOW COLUMNS FROM '.$GLOBALS['xoopsDB']->prefix('xoopscomments')." LIKE 'com_email'");
45 45
 
46 46
         return ($GLOBALS['xoopsDB']->getRowsNum($result) > 0);
47 47
 
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
      */
54 54
     public function check_com_url()
55 55
     {
56
-        $result = $GLOBALS['xoopsDB']->queryF('SHOW COLUMNS FROM ' . $GLOBALS['xoopsDB']->prefix('xoopscomments') . " LIKE 'com_url'");
56
+        $result = $GLOBALS['xoopsDB']->queryF('SHOW COLUMNS FROM '.$GLOBALS['xoopsDB']->prefix('xoopscomments')." LIKE 'com_url'");
57 57
 
58 58
         return ($GLOBALS['xoopsDB']->getRowsNum($result) > 0);
59 59
 
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
      */
66 66
     public function apply_com_user()
67 67
     {
68
-        $sql = 'ALTER TABLE ' . $GLOBALS['xoopsDB']->prefix('xoopscomments') . ' ADD `com_user` VARCHAR( 60 ) NOT NULL AFTER `com_uid`, ADD INDEX ( `com_user` )';
68
+        $sql = 'ALTER TABLE '.$GLOBALS['xoopsDB']->prefix('xoopscomments').' ADD `com_user` VARCHAR( 60 ) NOT NULL AFTER `com_uid`, ADD INDEX ( `com_user` )';
69 69
         if (!$GLOBALS['xoopsDB']->queryF($sql)) {
70 70
             return false;
71 71
         }
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
      */
79 79
     public function apply_com_email()
80 80
     {
81
-        $sql = 'ALTER TABLE ' . $GLOBALS['xoopsDB']->prefix('xoopscomments') . ' ADD `com_email` VARCHAR( 60 ) NOT NULL AFTER `com_user`, ADD INDEX ( `com_email` )';
81
+        $sql = 'ALTER TABLE '.$GLOBALS['xoopsDB']->prefix('xoopscomments').' ADD `com_email` VARCHAR( 60 ) NOT NULL AFTER `com_user`, ADD INDEX ( `com_email` )';
82 82
         if (!$GLOBALS['xoopsDB']->queryF($sql)) {
83 83
             return false;
84 84
         }
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 
95 95
         //$this->query( "ALTER TABLE `xoopscomments` ADD `com_user` VARCHAR( 60 ) NOT NULL AFTER `com_uid`, ADD INDEX ( `com_url` )" );
96 96
 
97
-        $sql = 'ALTER TABLE ' . $GLOBALS['xoopsDB']->prefix('xoopscomments') . ' ADD `com_url` VARCHAR( 60 ) NOT NULL AFTER `com_email` ';
97
+        $sql = 'ALTER TABLE '.$GLOBALS['xoopsDB']->prefix('xoopscomments').' ADD `com_url` VARCHAR( 60 ) NOT NULL AFTER `com_email` ';
98 98
         if (!$GLOBALS['xoopsDB']->queryF($sql)) {
99 99
             return false;
100 100
         }
Please login to merge, or discard this patch.
upgrade/upd-2.5.7-to-2.5.8/index.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
             $row = $db->fetchRow($result);
65 65
             if ($row) {
66 66
                 $columnLength = $row[0];
67
-                return (int) $columnLength;
67
+                return (int)$columnLength;
68 68
             }
69 69
         }
70 70
         return 0;
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
      */
78 78
     public function check_users_pass()
79 79
     {
80
-        return (bool) ($this->getColumnLength('users', 'pass') >= 255);
80
+        return (bool)($this->getColumnLength('users', 'pass') >= 255);
81 81
     }
82 82
 
83 83
     /**
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
      */
107 107
     public function check_com_ip()
108 108
     {
109
-        return (bool) ($this->getColumnLength('xoopscomments', 'com_ip') >= 45);
109
+        return (bool)($this->getColumnLength('xoopscomments', 'com_ip') >= 45);
110 110
     }
111 111
 
112 112
     /**
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
      */
128 128
     public function check_sess_ip()
129 129
     {
130
-        return (bool) ($this->getColumnLength('session', 'sess_ip') >= 45);
130
+        return (bool)($this->getColumnLength('session', 'sess_ip') >= 45);
131 131
     }
132 132
 
133 133
     /**
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
      */
149 149
     public function check_online_ip()
150 150
     {
151
-        return (bool) ($this->getColumnLength('online', 'online_ip') >= 45);
151
+        return (bool)($this->getColumnLength('online', 'online_ip') >= 45);
152 152
     }
153 153
 
154 154
     /**
Please login to merge, or discard this patch.
upgrade/upd-2.3.0-to-2.3.1/index.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
             'user_sig' => 'users',
55 55
             'bio' => 'users');
56 56
         foreach ($fields as $field => $table) {
57
-            $sql = 'SHOW COLUMNS FROM `' . $GLOBALS['xoopsDB']->prefix($table) . "` LIKE '{$field}'";
57
+            $sql = 'SHOW COLUMNS FROM `'.$GLOBALS['xoopsDB']->prefix($table)."` LIKE '{$field}'";
58 58
             if (!$result = $GLOBALS['xoopsDB']->queryF($sql)) {
59 59
                 return false;
60 60
             }
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
     {
76 76
         $allowWebChanges                     = $GLOBALS['xoopsDB']->allowWebChanges;
77 77
         $GLOBALS['xoopsDB']->allowWebChanges = true;
78
-        $result                              = $GLOBALS['xoopsDB']->queryFromFile(__DIR__ . '/mysql.structure.sql');
78
+        $result                              = $GLOBALS['xoopsDB']->queryFromFile(__DIR__.'/mysql.structure.sql');
79 79
         $GLOBALS['xoopsDB']->allowWebChanges = $allowWebChanges;
80 80
 
81 81
         return $result;
Please login to merge, or discard this patch.
upgrade/upd-2.5.4-to-2.5.5/index.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
         $tables['groups_users_link'] = array('uid');
26 26
 
27 27
         foreach ($tables as $table => $keys) {
28
-            $sql = 'SHOW KEYS FROM `' . $GLOBALS['xoopsDB']->prefix($table) . '`';
28
+            $sql = 'SHOW KEYS FROM `'.$GLOBALS['xoopsDB']->prefix($table).'`';
29 29
             if (!$result = $GLOBALS['xoopsDB']->queryF($sql)) {
30 30
                 continue;
31 31
             }
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
         $tables['groups_users_link'] = array('uid');
54 54
 
55 55
         foreach ($tables as $table => $keys) {
56
-            $sql = 'SHOW KEYS FROM `' . $GLOBALS['xoopsDB']->prefix($table) . '`';
56
+            $sql = 'SHOW KEYS FROM `'.$GLOBALS['xoopsDB']->prefix($table).'`';
57 57
             if (!$result = $GLOBALS['xoopsDB']->queryF($sql)) {
58 58
                 continue;
59 59
             }
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
             }
64 64
             foreach ($keys as $key) {
65 65
                 if (!in_array($key, $existing_keys)) {
66
-                    $sql = 'ALTER TABLE `' . $GLOBALS['xoopsDB']->prefix($table) . "` ADD INDEX `{$key}` (`{$key}`)";
66
+                    $sql = 'ALTER TABLE `'.$GLOBALS['xoopsDB']->prefix($table)."` ADD INDEX `{$key}` (`{$key}`)";
67 67
                     if (!$result = $GLOBALS['xoopsDB']->queryF($sql)) {
68 68
                         return false;
69 69
                     }
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
      */
82 82
     public function check_imptotal()
83 83
     {
84
-        $sql = 'SELECT `imptotal` FROM `' . $GLOBALS['xoopsDB']->prefix('banner') . '` WHERE `bid` = 1';
84
+        $sql = 'SELECT `imptotal` FROM `'.$GLOBALS['xoopsDB']->prefix('banner').'` WHERE `bid` = 1';
85 85
         if ($result = $GLOBALS['xoopsDB']->queryF($sql)) {
86 86
             $fieldInfo = mysqli_fetch_field_direct($result, 0);
87 87
             $length = $fieldInfo->length;
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
      */
99 99
     public function apply_imptotal()
100 100
     {
101
-        $sql = 'ALTER TABLE `' . $GLOBALS['xoopsDB']->prefix('banner') . "` CHANGE `imptotal` `imptotal` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0'";
101
+        $sql = 'ALTER TABLE `'.$GLOBALS['xoopsDB']->prefix('banner')."` CHANGE `imptotal` `imptotal` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0'";
102 102
         if (!$result = $GLOBALS['xoopsDB']->queryF($sql)) {
103 103
             return false;
104 104
         }
Please login to merge, or discard this patch.