Completed
Pull Request — master (#622)
by Richard
29:20 queued 24s
created
xoops_lib/smarty/xoops_plugins/function.xoMemberInfo.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,10 +65,10 @@
 block discarded – undo
65 65
             $member_info = array();
66 66
         }
67 67
         foreach ($infos as $info) {
68
-            if (!array_key_exists($info, $member_info) && @$_SESSION['xoops_member_info'][$info . '_expire'] < $time) {
68
+            if (!array_key_exists($info, $member_info) && @$_SESSION['xoops_member_info'][$info.'_expire'] < $time) {
69 69
                 $member_info[$info] = $xoops->user->getVar($info, 'E');
70 70
                 $_SESSION['xoops_member_info'][$info] = $member_info[$info];
71
-                $_SESSION['xoops_member_info'][$info . '_expire'] = $time + 60;
71
+                $_SESSION['xoops_member_info'][$info.'_expire'] = $time + 60;
72 72
             }
73 73
         }
74 74
     }
Please login to merge, or discard this patch.
xoops_lib/smarty/xoops_plugins/block.noshortcodes.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
 function smarty_block_noshortcodes($params, $content, $template, &$repeat)
27 27
 {
28 28
     // only output on the closing tag
29
-    if(!$repeat){
29
+    if (!$repeat) {
30 30
         if (isset($content)) {
31 31
             $ts = \Xoops\Core\Text\Sanitizer::getInstance();
32 32
             return $ts->escapeShortCodes($content);
Please login to merge, or discard this patch.
xoops_lib/smarty/xoops_plugins/outputfilter.shortcodes.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
     $shortcodes = \Xoops\Core\Text\Sanitizer::getInstance()->getShortCodes();
8 8
     $shortcodes->addShortcode(
9 9
         'nosc42',
10
-        function ($attributes, $content, $tagName) {
10
+        function($attributes, $content, $tagName) {
11 11
             return base64_decode($content);
12 12
         }
13 13
     );
@@ -17,13 +17,13 @@  discard block
 block discarded – undo
17 17
 
18 18
     $text = preg_replace_callback(
19 19
         $scPattern,
20
-        function ($innerMatches) {
21
-            return '[nosc42]' . base64_encode($innerMatches[1]) . '[/nosc42]';
20
+        function($innerMatches) {
21
+            return '[nosc42]'.base64_encode($innerMatches[1]).'[/nosc42]';
22 22
         },
23 23
         $output
24 24
     );
25
-    if ($text===null) {
26
-        trigger_error('preg_last_error=' . preg_last_error(), E_USER_WARNING);
25
+    if ($text === null) {
26
+        trigger_error('preg_last_error='.preg_last_error(), E_USER_WARNING);
27 27
         return $output;
28 28
     }
29 29
 
Please login to merge, or discard this patch.
xoops_lib/smarty/xoops_plugins/compiler.xoModuleIconsBookmarks.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -22,13 +22,13 @@
 block discarded – undo
22 22
     $xoops = Xoops::getInstance();
23 23
 
24 24
     if (XoopsLoad::fileExists($xoops->path('media/xoops/images/icons/bookmarks/index.html'))) {
25
-        $url = $xoops->url('media/xoops/images/icons/bookmarks/' . $argStr);
25
+        $url = $xoops->url('media/xoops/images/icons/bookmarks/'.$argStr);
26 26
     } else {
27
-        if (XoopsLoad::fileExists($xoops->path('modules/system/images/icons/default/' . $argStr))) {
28
-            $url = $xoops->url('modules/system/images/icons/default/' . $argStr);
27
+        if (XoopsLoad::fileExists($xoops->path('modules/system/images/icons/default/'.$argStr))) {
28
+            $url = $xoops->url('modules/system/images/icons/default/'.$argStr);
29 29
         } else {
30 30
             $url = $xoops->url('modules/system/images/icons/default/xoops/xoops.png');
31 31
         }
32 32
     }
33
-    return "\necho '" . addslashes($url) . "';";
33
+    return "\necho '".addslashes($url)."';";
34 34
 }
Please login to merge, or discard this patch.
xoops_lib/smarty/xoops_plugins/compiler.xoModuleIcons16.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,13 +24,13 @@
 block discarded – undo
24 24
     $ico = trim($arg, " '\"\t\n\r\0\x0B");
25 25
 
26 26
     if (XoopsLoad::fileExists($xoops->path('media/xoops/images/icons/16/index.html'))) {
27
-        $url = $xoops->url('media/xoops/images/icons/16/' . $ico);
27
+        $url = $xoops->url('media/xoops/images/icons/16/'.$ico);
28 28
     } else {
29
-        if (XoopsLoad::fileExists($xoops->path('modules/system/images/icons/default/' . $ico))) {
30
-            $url = $xoops->url('modules/system/images/icons/default/' . $ico);
29
+        if (XoopsLoad::fileExists($xoops->path('modules/system/images/icons/default/'.$ico))) {
30
+            $url = $xoops->url('modules/system/images/icons/default/'.$ico);
31 31
         } else {
32 32
             $url = $xoops->url('modules/system/images/icons/default/xoops/xoops2.png');
33 33
         }
34 34
     }
35
-    return "<?php echo '" . addslashes($url) . "'; ?>";
35
+    return "<?php echo '".addslashes($url)."'; ?>";
36 36
 }
Please login to merge, or discard this patch.
xoops_lib/smarty/xoops_plugins/function.xoops_link.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
             $urlstr = "$urlstr&{$var['name']}={$var['value']}";
74 74
         }
75 75
         if (strlen($urlstr) > 0) {
76
-            $urlstr = '?' . substr($urlstr, 1);
76
+            $urlstr = '?'.substr($urlstr, 1);
77 77
         }
78 78
     }
79 79
 
@@ -94,8 +94,8 @@  discard block
 block discarded – undo
94 94
     }
95 95
     // Now, return entire link URL :-)
96 96
     if (empty($module)) {
97
-        echo $xoops->url($page . $urlstr);
97
+        echo $xoops->url($page.$urlstr);
98 98
     } else {
99
-        echo $xoops->url("modules/{$module}/{$page}" . $urlstr);
99
+        echo $xoops->url("modules/{$module}/{$page}".$urlstr);
100 100
     }
101 101
 }
Please login to merge, or discard this patch.
xoops_lib/smarty/xoops_plugins/compiler.xoModuleIcons32.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -28,14 +28,14 @@
 block discarded – undo
28 28
     $arg = reset($params);
29 29
     $ico = trim($arg, " '\"\t\n\r\0\x0B");
30 30
 
31
-    if (XoopsLoad::fileExists($xoops->path('media/xoops/images/icons/32/' . $icons . '/index.html'))) {
32
-        $url = $xoops->url('media/xoops/images/icons/32/' . $icons . '/' . $ico);
31
+    if (XoopsLoad::fileExists($xoops->path('media/xoops/images/icons/32/'.$icons.'/index.html'))) {
32
+        $url = $xoops->url('media/xoops/images/icons/32/'.$icons.'/'.$ico);
33 33
     } else {
34
-        if (XoopsLoad::fileExists($xoops->path('modules/system/images/icons/default/' . $ico))) {
35
-            $url = $xoops->url('modules/system/images/icons/default/' . $ico);
34
+        if (XoopsLoad::fileExists($xoops->path('modules/system/images/icons/default/'.$ico))) {
35
+            $url = $xoops->url('modules/system/images/icons/default/'.$ico);
36 36
         } else {
37 37
             $url = $xoops->url('modules/system/images/icons/default/xoops/xoops.png');
38 38
         }
39 39
     }
40
-    return "<?php echo '" . addslashes($url) . "'; ?>";
40
+    return "<?php echo '".addslashes($url)."'; ?>";
41 41
 }
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
@@ -5,11 +5,11 @@  discard block
 block discarded – undo
5 5
 //todo, check this file
6 6
 $path = '/path/to/xoops/directory';
7 7
 
8
-include $path . '/mainfile.php';
8
+include $path.'/mainfile.php';
9 9
 if (!defined('XOOPS_ROOT_PATH')) {
10 10
     exit();
11 11
 }
12
-include_once XOOPS_ROOT_PATH . '/language/' . $xoopsConfig['language'] . '/user.php';
12
+include_once XOOPS_ROOT_PATH.'/language/'.$xoopsConfig['language'].'/user.php';
13 13
 $op = (isset($_POST['op']) && $_POST['op'] == 'dologin') ? 'dologin' : 'login';
14 14
 
15 15
 $username = isset($_POST['username']) ? trim($_POST['username']) : '';
@@ -21,17 +21,17 @@  discard block
 block discarded – undo
21 21
 echo '
22 22
 <html>
23 23
   <head>
24
-    <meta http-equiv="content-type" content="text/html; charset=' . XoopsLocale::getCharset() . '" />
25
-    <meta http-equiv="content-language" content="' . XoopsLocale::getLangCode() . '" />
26
-    <title>' . $xoopsConfig['sitename'] . '</title>
27
-    <link rel="stylesheet" type="text/css" media="all" href="' . XOOPS_URL . '/xoops.css" />
24
+    <meta http-equiv="content-type" content="text/html; charset=' . XoopsLocale::getCharset().'" />
25
+    <meta http-equiv="content-language" content="' . XoopsLocale::getLangCode().'" />
26
+    <title>' . $xoopsConfig['sitename'].'</title>
27
+    <link rel="stylesheet" type="text/css" media="all" href="' . XOOPS_URL.'/xoops.css" />
28 28
 ';
29 29
 $style = xoops_getcss($xoopsConfig['theme_set']);
30 30
 if ($style == '') {
31 31
     $style = xoops_getcss($xoopsConfig['theme_set']);
32 32
 }
33 33
 if ($style != '') {
34
-    echo '<link rel="stylesheet" type="text/css" media="all" href="' . $style . '" />';
34
+    echo '<link rel="stylesheet" type="text/css" media="all" href="'.$style.'" />';
35 35
 }
36 36
 echo '
37 37
   </head>
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
     $user = $member_handler->loginUser($username, $password);
45 45
     if (is_object($user)) {
46 46
         if (0 == $user->getVar('level')) {
47
-            redirect_header(XOOPS_URL . '/index.php', 5, XoopsLocale::E_SELECTED_USER_DEACTIVATED_OR_NOT_ACTIVE);
47
+            redirect_header(XOOPS_URL.'/index.php', 5, XoopsLocale::E_SELECTED_USER_DEACTIVATED_OR_NOT_ACTIVE);
48 48
             exit();
49 49
         }
50 50
         if ($xoopsConfig['closesite'] == 1) {
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
                 }
57 57
             }
58 58
             if (!$allowed) {
59
-                redirect_header(XOOPS_URL . '/index.php', 1, XoopsLocale::E_NO_ACCESS_PERMISSION);
59
+                redirect_header(XOOPS_URL.'/index.php', 1, XoopsLocale::E_NO_ACCESS_PERMISSION);
60 60
                 exit();
61 61
             }
62 62
         }
@@ -67,13 +67,13 @@  discard block
 block discarded – undo
67 67
         $_SESSION['xoopsUserId'] = $user->getVar('uid');
68 68
         $_SESSION['xoopsUserGroups'] = $user->getGroups();
69 69
         if (!empty($xoopsConfig['use_ssl'])) {
70
-            xoops_confirm(array($xoopsConfig['sslpost_name'] => session_id()), XOOPS_URL . '/misc.php?action=showpopups&amp;type=ssllogin', XoopsLocale::PRESS_BUTTON_BELLOW_TO_LOGIN, XoopsLocale::A_LOGIN);
70
+            xoops_confirm(array($xoopsConfig['sslpost_name'] => session_id()), XOOPS_URL.'/misc.php?action=showpopups&amp;type=ssllogin', XoopsLocale::PRESS_BUTTON_BELLOW_TO_LOGIN, XoopsLocale::A_LOGIN);
71 71
         } else {
72 72
             echo sprintf(XoopsLocale::SF_THANK_YOU_FOR_LOGGING_IN, $user->getVar('uname'));
73
-            echo '<div style="text-align:center;"><input value="' . XoopsLocale::A_CLOSE . '" type="button" onclick="document.window.opener.location.reload();document.window.close();" /></div>';
73
+            echo '<div style="text-align:center;"><input value="'.XoopsLocale::A_CLOSE.'" type="button" onclick="document.window.opener.location.reload();document.window.close();" /></div>';
74 74
         }
75 75
     } else {
76
-        xoops_error(XoopsLocale::E_INCORRECT_LOGIN . '<br /><a href="login.php">' . XoopsLocale::GO_BACK . '</a>');
76
+        xoops_error(XoopsLocale::E_INCORRECT_LOGIN.'<br /><a href="login.php">'.XoopsLocale::GO_BACK.'</a>');
77 77
     }
78 78
 }
79 79
 
@@ -83,16 +83,16 @@  discard block
 block discarded – undo
83 83
     <form action="login.php" method="post">
84 84
       <table class="outer" width="95%">
85 85
         <tr>
86
-          <td class="head">' . XoopsLocale::C_USERNAME . '</td>
86
+          <td class="head">' . XoopsLocale::C_USERNAME.'</td>
87 87
           <td class="even"><input type="text" name="username" value="" /></td>
88 88
         </tr>
89 89
         <tr>
90
-          <td class="head">' . XoopsLocale::C_PASSWORD . '</td>
90
+          <td class="head">' . XoopsLocale::C_PASSWORD.'</td>
91 91
           <td class="even"><input type="password" name="userpass" value="" /></td>
92 92
         </tr>
93 93
         <tr>
94 94
           <td class="head">&nbsp;</td>
95
-          <td class="even"><input type="hidden" name="op" value="dologin" /><input type="submit" name="submit" value="' . XoopsLocale::A_LOGIN . '" /></td>
95
+          <td class="even"><input type="hidden" name="op" value="dologin" /><input type="submit" name="submit" value="' . XoopsLocale::A_LOGIN.'" /></td>
96 96
         </tr>
97 97
       </table>
98 98
     </form>
Please login to merge, or discard this patch.
extras/altsys_functions.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -25,14 +25,14 @@  discard block
 block discarded – undo
25 25
     global $xoopsModule, $xoopsConfig, $mydirname, $mydirpath, $mytrustdirname, $mytrustdirpath, $mymenu_fake_uri;
26 26
 
27 27
     $mymenu_find_paths = array(
28
-        $mydirpath . '/admin/mymenu.php', $mydirpath . '/mymenu.php', $mytrustdirpath . '/admin/mymenu.php',
29
-        $mytrustdirpath . '/mymenu.php',
28
+        $mydirpath.'/admin/mymenu.php', $mydirpath.'/mymenu.php', $mytrustdirpath.'/admin/mymenu.php',
29
+        $mytrustdirpath.'/mymenu.php',
30 30
     );
31 31
 
32 32
     foreach ($mymenu_find_paths as $mymenu_find_path) {
33 33
         if (file_exists($mymenu_find_path)) {
34 34
             include $mymenu_find_path;
35
-            include_once dirname(__FILE__) . '/adminmenu_functions.php';
35
+            include_once dirname(__FILE__).'/adminmenu_functions.php';
36 36
             altsys_adminmenu_insert_mymenu($xoopsModule);
37 37
             altsys_adminmenu_hack_ft();
38 38
             break;
@@ -45,17 +45,17 @@  discard block
 block discarded – undo
45 45
 {
46 46
     $mylang = Xoops::getInstance()->getConfig('language');
47 47
 
48
-    if (file_exists(XOOPS_ROOT_PATH . '/modules/altsys/language/' . $mylang . '/' . $type . '.php')) {
49
-        include_once XOOPS_ROOT_PATH . '/modules/altsys/language/' . $mylang . '/' . $type . '.php';
48
+    if (file_exists(XOOPS_ROOT_PATH.'/modules/altsys/language/'.$mylang.'/'.$type.'.php')) {
49
+        include_once XOOPS_ROOT_PATH.'/modules/altsys/language/'.$mylang.'/'.$type.'.php';
50 50
     } else {
51
-        if (file_exists(XOOPS_TRUST_PATH . '/libs/altsys/language/' . $mylang . '/' . $type . '.php')) {
52
-            include_once XOOPS_TRUST_PATH . '/libs/altsys/language/' . $mylang . '/' . $type . '.php';
51
+        if (file_exists(XOOPS_TRUST_PATH.'/libs/altsys/language/'.$mylang.'/'.$type.'.php')) {
52
+            include_once XOOPS_TRUST_PATH.'/libs/altsys/language/'.$mylang.'/'.$type.'.php';
53 53
         } else {
54
-            if (file_exists(XOOPS_ROOT_PATH . '/modules/altsys/language/english/' . $type . '.php')) {
55
-                include_once XOOPS_ROOT_PATH . '/modules/altsys/language/english/' . $type . '.php';
54
+            if (file_exists(XOOPS_ROOT_PATH.'/modules/altsys/language/english/'.$type.'.php')) {
55
+                include_once XOOPS_ROOT_PATH.'/modules/altsys/language/english/'.$type.'.php';
56 56
             } else {
57
-                if (file_exists(XOOPS_TRUST_PATH . '/libs/altsys/language/english/' . $type . '.php')) {
58
-                    include_once XOOPS_TRUST_PATH . '/libs/altsys/language/english/' . $type . '.php';
57
+                if (file_exists(XOOPS_TRUST_PATH.'/libs/altsys/language/english/'.$type.'.php')) {
58
+                    include_once XOOPS_TRUST_PATH.'/libs/altsys/language/english/'.$type.'.php';
59 59
                 }
60 60
             }
61 61
         }
@@ -103,9 +103,9 @@  discard block
 block discarded – undo
103 103
         case ALTSYS_CORE_TYPE_X20S :
104 104
         case ALTSYS_CORE_TYPE_ORE :
105 105
         case ALTSYS_CORE_TYPE_X22 :
106
-            return XOOPS_URL . '/modules/system/admin.php?fct=preferences&op=showmod&mod=' . $mid;
106
+            return XOOPS_URL.'/modules/system/admin.php?fct=preferences&op=showmod&mod='.$mid;
107 107
         case ALTSYS_CORE_TYPE_XC21L :
108
-            return XOOPS_URL . '/modules/legacy/admin/index.php?action=PreferenceEdit&confmod_id=' . $mid;
108
+            return XOOPS_URL.'/modules/legacy/admin/index.php?action=PreferenceEdit&confmod_id='.$mid;
109 109
     }
110 110
 }
111 111
 
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
         if (substr($file, -4) != '.php') {
133 133
             continue;
134 134
         }
135
-        @unlink(XOOPS_COMPILE_PATH . '/' . $file);
135
+        @unlink(XOOPS_COMPILE_PATH.'/'.$file);
136 136
     }
137 137
     closedir($dh);
138 138
 }
Please login to merge, or discard this patch.