Completed
Pull Request — master (#3788)
by Craig
01:31
created
src/lib/legacy/viewplugins/function.sortlink.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
 
58 58
     // defines the CSS class and revert the order for current field
59 59
     if ($params['currentsort'] == $params['sort']) {
60
-        $cssclass = 'z-order-'.strtolower($sortdir);
60
+        $cssclass = 'z-order-' . strtolower($sortdir);
61 61
         // reverse the direction
62 62
         $params['sortdir'] = ($sortdir == 'ASC') ? 'DESC' : 'ASC';
63 63
     } else {
Please login to merge, or discard this patch.
src/lib/legacy/viewplugins/function.selector_user_category.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
 
49 49
     $userCats = ModUtil::apiFunc('ZikulaCategoriesModule', 'user', 'getusercategories', ['returnCategory' => 1, 'relative' => $relative]);
50 50
     $html = CategoryUtil::getSelector_Categories($userCats, $field, $selectedValue, $name, $defaultValue, $defaultText,
51
-                                                  $submit, $displayPath, $doReplaceRootCat, $multipleSize);
51
+                                                    $submit, $displayPath, $doReplaceRootCat, $multipleSize);
52 52
 
53 53
     if ($editLink && $allowUserEdit && UserUtil::isLoggedIn() && SecurityUtil::checkPermission('ZikulaCategoriesModule::', "$category[id]::", ACCESS_EDIT)) {
54 54
         $url = ModUtil::url('ZikulaCategoriesModule', 'user', 'edituser');
Please login to merge, or discard this patch.
src/lib/legacy/viewplugins/modifier.profilelinkbyuid.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
         return $uid;
41 41
     }
42 42
 
43
-    $uid        = (float)$uid;
43
+    $uid = (float)$uid;
44 44
 
45 45
     $profileModule = System::getVar('profilemodule', '');
46 46
 
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
             // truncate the user name to $maxLength chars
68 68
             $length     = strlen($userDisplayName);
69 69
             $truncEnd   = ($maxLength > $length) ? $length : $maxLength;
70
-            $show  = DataUtil::formatForDisplay(substr($userDisplayName, 0, $truncEnd));
70
+            $show = DataUtil::formatForDisplay(substr($userDisplayName, 0, $truncEnd));
71 71
         } else {
72 72
             $show = DataUtil::formatForDisplay($userDisplayName);
73 73
         }
Please login to merge, or discard this patch.
src/lib/legacy/viewplugins/function.selector_module.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,5 +39,5 @@
 block discarded – undo
39 39
     $multipleSize  = isset($params['multipleSize']) ? $params['multipleSize'] : 1;
40 40
 
41 41
     return HtmlUtil::getSelector_Module($name, $selectedValue, $defaultValue, $defaultText, $allValue, $allText,
42
-                                           $submit, $disabled, $multipleSize, $field);
42
+                                            $submit, $disabled, $multipleSize, $field);
43 43
 }
Please login to merge, or discard this patch.
src/lib/legacy/viewplugins/zikula.process_cached_inserts.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
 function smarty_core_process_cached_inserts($params, &$smarty)
19 19
 {
20 20
     preg_match_all('!'.$smarty->_smarty_md5.'{insert_cache (.*)}'.$smarty->_smarty_md5.'!Uis',
21
-                   $params['results'], $match);
21
+                    $params['results'], $match);
22 22
     list($cached_inserts, $insert_args) = $match;
23 23
 
24 24
     for ($i = 0, $for_max = count($cached_inserts); $i < $for_max; $i++) {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
  */
18 18
 function smarty_core_process_cached_inserts($params, &$smarty)
19 19
 {
20
-    preg_match_all('!'.$smarty->_smarty_md5.'{insert_cache (.*)}'.$smarty->_smarty_md5.'!Uis',
20
+    preg_match_all('!' . $smarty->_smarty_md5 . '{insert_cache (.*)}' . $smarty->_smarty_md5 . '!Uis',
21 21
                    $params['results'], $match);
22 22
     list($cached_inserts, $insert_args) = $match;
23 23
 
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
             require_once SMARTY_CORE_DIR . 'core.get_microtime.php';
66 66
             $smarty->_smarty_debug_info[] = [
67 67
                 'type'      => 'insert',
68
-                'filename'  => 'insert_'.$name,
68
+                'filename'  => 'insert_' . $name,
69 69
                 'depth'     => $smarty->_inclusion_depth,
70 70
                 'exec_time' => smarty_core_get_microtime($_params, $smarty) - $debug_start_time
71 71
             ];
Please login to merge, or discard this patch.
src/lib/legacy/viewplugins/function.userlinks.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
         $links .= "<a href=\"" . DataUtil::formatForDisplay(ModUtil::url('ZikulaUsersModule', 'user', 'logout')) . '">'  . __('Log out') . "</a> $end";
45 45
     } else {
46 46
         $links = "$start <a href=\"" . DataUtil::formatForDisplay(ModUtil::url('ZikulaUsersModule', 'user', 'register')) . '">' . __('Register new account') . "</a> $seperator "
47
-               . "<a href=\"" . DataUtil::formatForDisplay(ModUtil::url('ZikulaUsersModule', 'user', 'login')) . '">' . __('Login') . "</a> $end";
47
+                . "<a href=\"" . DataUtil::formatForDisplay(ModUtil::url('ZikulaUsersModule', 'user', 'login')) . '">' . __('Login') . "</a> $end";
48 48
     }
49 49
 
50 50
     return DataUtil::formatForDisplayHTML($links);
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
         } else {
42 42
             $links .= "<a href=\"" . DataUtil::formatForDisplay(ModUtil::url('ZikulaUsersModule', 'user', 'index')) . '">' . __('Your Account') . "</a> $seperator ";
43 43
         }
44
-        $links .= "<a href=\"" . DataUtil::formatForDisplay(ModUtil::url('ZikulaUsersModule', 'user', 'logout')) . '">'  . __('Log out') . "</a> $end";
44
+        $links .= "<a href=\"" . DataUtil::formatForDisplay(ModUtil::url('ZikulaUsersModule', 'user', 'logout')) . '">' . __('Log out') . "</a> $end";
45 45
     } else {
46 46
         $links = "$start <a href=\"" . DataUtil::formatForDisplay(ModUtil::url('ZikulaUsersModule', 'user', 'register')) . '">' . __('Register new account') . "</a> $seperator "
47 47
                . "<a href=\"" . DataUtil::formatForDisplay(ModUtil::url('ZikulaUsersModule', 'user', 'login')) . '">' . __('Login') . "</a> $end";
Please login to merge, or discard this patch.
src/lib/legacy/viewplugins/outputfilter.admintitle.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -36,14 +36,14 @@  discard block
 block discarded – undo
36 36
     if ($header3 && isset($header3[1]) && $header3[1]) {
37 37
         $titleargs[] = $header = strip_tags($header3[1]);
38 38
         // put its value on any z-adminpage-func element
39
-        $source = preg_replace('/z-admin-pagefunc">(.*?)</', 'z-adminpage-func">'.$header.'<', $source, 1);
39
+        $source = preg_replace('/z-admin-pagefunc">(.*?)</', 'z-adminpage-func">' . $header . '<', $source, 1);
40 40
     }
41 41
 
42 42
     // checks for header level 2
43 43
     if ($header2 && isset($header2[1]) && $header2[1]) {
44 44
         $titleargs[] = $header = strip_tags($header2[1]);
45 45
         // put its value on any z-adminpage-func element
46
-        $source = preg_replace('/z-admin-pagemodule">(.*?)</', 'z-admin-pagemodule">'.$header.'<', $source, 1);
46
+        $source = preg_replace('/z-admin-pagemodule">(.*?)</', 'z-admin-pagemodule">' . $header . '<', $source, 1);
47 47
     }
48 48
 
49 49
     if (!empty($titleargs)) {
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
         $titleargs[] = System::getVar('sitename');
52 52
 
53 53
         $title  = implode(' - ', $titleargs);
54
-        $source = preg_replace('/<title>(.*?)<\/title>/', '<title>'.$title.'</title>', $source, 1);
54
+        $source = preg_replace('/<title>(.*?)<\/title>/', '<title>' . $title . '</title>', $source, 1);
55 55
     }
56 56
 
57 57
     // return the modified page source
Please login to merge, or discard this patch.
src/lib/legacy/viewplugins/function.ajaxheader.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -72,9 +72,9 @@  discard block
 block discarded – undo
72 72
         if (is_readable('javascript/ajax/lightbox.js')) {
73 73
             $scripts[] = 'javascript/ajax/lightbox.js';
74 74
             if (isset($params['assign'])) {
75
-                $return = '<link rel="stylesheet" href="'.$basePath.'javascript/ajax/lightbox/lightbox.css" type="text/css" media="screen" />';
75
+                $return = '<link rel="stylesheet" href="' . $basePath . 'javascript/ajax/lightbox/lightbox.css" type="text/css" media="screen" />';
76 76
             } else {
77
-                PageUtil::addVar('stylesheet', $basePath.'javascript/ajax/lightbox/lightbox.css');
77
+                PageUtil::addVar('stylesheet', $basePath . 'javascript/ajax/lightbox/lightbox.css');
78 78
             }
79 79
         } else {
80 80
             $imageviewer = true;
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
     if ($imageviewer) {
84 84
         $scripts[] = 'zikula.imageviewer';
85 85
         if (isset($params['assign'])) {
86
-            $return = '<link rel="stylesheet" href="'.$basePath.'javascript/helpers/ImageViewer/ImageViewer.css" type="text/css" media="screen" />';
86
+            $return = '<link rel="stylesheet" href="' . $basePath . 'javascript/helpers/ImageViewer/ImageViewer.css" type="text/css" media="screen" />';
87 87
         }
88 88
     }
89 89
 
Please login to merge, or discard this patch.
src/lib/legacy/viewplugins/outputfilter.shorturls.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,9 +28,9 @@
 block discarded – undo
28 28
 
29 29
     $baseUrl = System::getBaseUrl();
30 30
 
31
-    $prefix = '[(<[^>]*?)[\'"](?:'.$baseUrl.'|'.$baseUrl.')?(?:[./]{0,2})'; // Match local URLs in HTML tags, removes / and ./
31
+    $prefix = '[(<[^>]*?)[\'"](?:' . $baseUrl . '|' . $baseUrl . ')?(?:[./]{0,2})'; // Match local URLs in HTML tags, removes / and ./
32 32
     $in = ['[<([^>]+)\s(src|href|background|action)\s*=\s*((["\'])?)(?!http)(?!skype:)(?!xmpp:)(?!icq:)(?!mailto:)(?!tel:)(?!javascript:)(?!bitcoin:)(?!geo:)(?!im:)(?!irc:)(?!ircs:)(?!sms:)(?!ssh:)(?!urn:)(?!wtai:)(?!smsto:)(?!sms:)(?!sip:)(?!magnet:)(?!webcal:)(?!data:)(?![/"\'\s#]+)]Ui'];
33
-    $out = ['<$1 $2=$3'.$baseUrl];
33
+    $out = ['<$1 $2=$3' . $baseUrl];
34 34
 
35 35
     // perform the replacement
36 36
     $source = preg_replace($in, $out, $source);
Please login to merge, or discard this patch.