Completed
Pull Request — master (#616)
by Richard
13:56
created
xoops_lib/smarty/xoops_plugins/modifier.debug_print_var.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -27,29 +27,29 @@
 block discarded – undo
27 27
 {
28 28
     $_replace = array("\n"=>'<i>&#92;n</i>', "\r"=>'<i>&#92;r</i>', "\t"=>'<i>&#92;t</i>');
29 29
     if (is_array($var)) {
30
-        $results = "<b>Array (" . count($var) . ")</b>";
30
+        $results = "<b>Array (".count($var).")</b>";
31 31
         foreach ($var as $curr_key => $curr_val) {
32 32
             $return = smarty_modifier_debug_print_var($curr_val, $depth + 1, $length);
33
-            $results .= "<br>" . str_repeat('&nbsp;', $depth * 2) . "<b>" . strtr($curr_key, $_replace) . "</b> =&gt; {$return}";
33
+            $results .= "<br>".str_repeat('&nbsp;', $depth * 2)."<b>".strtr($curr_key, $_replace)."</b> =&gt; {$return}";
34 34
         }
35 35
     } else if (is_object($var)) {
36 36
         $object_vars = get_object_vars($var);
37
-        $results = "<b>" . get_class($var) . " Object (" . count($object_vars) . ")</b>";
37
+        $results = "<b>".get_class($var)." Object (".count($object_vars).")</b>";
38 38
         foreach ($object_vars as $curr_key => $curr_val) {
39 39
             if (is_object($curr_val)) {
40
-                $return ='[object ' . get_class($curr_val) . ']';
40
+                $return = '[object '.get_class($curr_val).']';
41 41
             } else {
42 42
                 $return = smarty_modifier_debug_print_var($curr_val, $depth + 1, $length);
43 43
             }
44
-            $results .= "<br>" . str_repeat('&nbsp;', $depth * 2) . "<b>{$curr_key}</b> =&gt; {$return}";
44
+            $results .= "<br>".str_repeat('&nbsp;', $depth * 2)."<b>{$curr_key}</b> =&gt; {$return}";
45 45
         }
46 46
     } else if (is_resource($var)) {
47
-        $results = '<i>' . (string)$var . '</i>';
47
+        $results = '<i>'.(string)$var.'</i>';
48 48
     } else if (empty($var) && $var != "0") {
49 49
         $results = '<i>empty</i>';
50 50
     } else {
51 51
         if (strlen($var) > $length) {
52
-            $results = substr($var, 0, $length - 3) . '...';
52
+            $results = substr($var, 0, $length - 3).'...';
53 53
         } else {
54 54
             $results = $var;
55 55
         }
Please login to merge, or discard this patch.
xoops_lib/smarty/xoops_plugins/compiler.xoAppUrl.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
     $url = trim($arg, " '\"\t\n\r\0\x0B");
34 34
 
35 35
     if (substr($url, 0, 1) === '/') {
36
-        $url = 'www' . $url;
36
+        $url = 'www'.$url;
37 37
     }
38
-    return "<?php echo '" . addslashes(htmlspecialchars($xoops->url($url))) . "'; ?>";
38
+    return "<?php echo '".addslashes(htmlspecialchars($xoops->url($url)))."'; ?>";
39 39
 }
Please login to merge, or discard this patch.
xoops_lib/smarty/xoops_plugins/compiler.xoAdminIcons.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
         $icons = 'default';
29 29
     }
30 30
 
31
-    if (XoopsLoad::fileExists($xoops->path('modules/system/images/icons/' . $icons . '/index.html'))) {
32
-        $url = $xoops->url('modules/system/images/icons/' . $icons . '/' . $ico);
31
+    if (XoopsLoad::fileExists($xoops->path('modules/system/images/icons/'.$icons.'/index.html'))) {
32
+        $url = $xoops->url('modules/system/images/icons/'.$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.
xoops_lib/smarty/xoops_plugins/function.xoPageNav.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,14 +30,14 @@
 block discarded – undo
30 30
 
31 31
     //TODO Remove this hardocded strings
32 32
     if ($currentPage > 1) {
33
-        $str .= '<a href="' . $xoops->url(str_replace( '%s', $offset - $pageSize, $url)) . '">Previous</a>';
33
+        $str .= '<a href="'.$xoops->url(str_replace('%s', $offset - $pageSize, $url)).'">Previous</a>';
34 34
     }
35 35
     for ($i = $minPage; $i <= $maxPage; ++$i) {
36 36
         $tgt = htmlspecialchars($xoops->url(str_replace('%s', ($i - 1) * $pageSize, $url)), ENT_QUOTES);
37 37
         $str .= "<a href='$tgt'>$i</a>";
38 38
     }
39 39
     if ($currentPage < $lastPage) {
40
-        $str .= '<a href="' . $xoops->url(str_replace('%s', $offset + $pageSize, $url)) . '">Next</a>';
40
+        $str .= '<a href="'.$xoops->url(str_replace('%s', $offset + $pageSize, $url)).'">Next</a>';
41 41
     }
42 42
     $class = @!empty($class) ? htmlspecialchars($class, ENT_QUOTES) : 'pagenav';
43 43
 
Please login to merge, or discard this patch.
xoops_lib/smarty/xoops_plugins/resource.db.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -106,12 +106,12 @@
 block discarded – undo
106 106
                 break;
107 107
         }
108 108
         // First, check for an overloaded version within the theme folder
109
-        $filepath = $directory . "/{$theme}/modules/{$module}/{$path}{$tpl_name}";
109
+        $filepath = $directory."/{$theme}/modules/{$module}/{$path}{$tpl_name}";
110 110
         if (!file_exists($filepath)) {
111 111
             // If no custom version exists, get the tpl from its default location
112
-            $filepath = \XoopsBaseConfig::get('root-path') . "/modules/{$module}/templates/{$path}{$tpl_name}";
112
+            $filepath = \XoopsBaseConfig::get('root-path')."/modules/{$module}/templates/{$path}{$tpl_name}";
113 113
             if (!file_exists($filepath)) {
114
-                return $cache[$tpl_name] = $tplobj ;
114
+                return $cache[$tpl_name] = $tplobj;
115 115
             }
116 116
         }
117 117
         return $cache[$tpl_name] = $filepath;
Please login to merge, or discard this patch.
xoops_lib/smarty/xoops_plugins/compiler.xoAdminNav.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -27,12 +27,12 @@
 block discarded – undo
27 27
     }
28 28
 
29 29
     $url = '';
30
-    if (XoopsLoad::fileExists($xoops->path('modules/system/images/breadcrumb/' . $icons . '/index.html'))) {
31
-        $url = $xoops->url('modules/system/images/breadcrumb/' . $icons . '/' . $argStr);
30
+    if (XoopsLoad::fileExists($xoops->path('modules/system/images/breadcrumb/'.$icons.'/index.html'))) {
31
+        $url = $xoops->url('modules/system/images/breadcrumb/'.$icons.'/'.$argStr);
32 32
     } else {
33
-        if (XoopsLoad::fileExists($xoops->path('modules/system/images/breadcrumb/default/' . $argStr))) {
34
-            $url = $xoops->url('modules/system/images/icons/default/' . $argStr);
33
+        if (XoopsLoad::fileExists($xoops->path('modules/system/images/breadcrumb/default/'.$argStr))) {
34
+            $url = $xoops->url('modules/system/images/icons/default/'.$argStr);
35 35
         }
36 36
     }
37
-    return "\necho '" . addslashes($url) . "';";
37
+    return "\necho '".addslashes($url)."';";
38 38
 }
Please login to merge, or discard this patch.
xoops_lib/smarty/xoops_plugins/block.assets.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
 
53 53
         $output = strtolower($params['output']);
54 54
 
55
-        $debug = isset($params['debug'])? (boolean)$params['debug'] : false;
55
+        $debug = isset($params['debug']) ? (boolean)$params['debug'] : false;
56 56
         if ($debug) {
57 57
             $xoops->assets()->setDebug();
58 58
         }
Please login to merge, or discard this patch.
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.