Passed
Push — master ( 7ec7f7...179f07 )
by Goffy
06:52
created
admin/contents.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
                 $GLOBALS['xoopsTpl']->append('contents_list', $cont);
89 89
                 unset($cont);
90 90
             }
91
-            if ( $contents_rows > $limit ) {
91
+            if ($contents_rows > $limit) {
92 92
                 include_once \XOOPS_ROOT_PATH . '/class/pagenav.php';
93 93
                 $pagenav = new \XoopsPageNav($contents_rows, $limit, $start, 'start', 'op=list&limit=' . $limit);
94 94
                 $GLOBALS['xoopsTpl']->assign('pagenav', $pagenav->renderNav());
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
         $GLOBALS['xoopsTpl']->assign('form', $form->render());
109 109
     break;
110 110
     case 'save':
111
-        if ( !$GLOBALS['xoopsSecurity']->check() ) {
111
+        if (!$GLOBALS['xoopsSecurity']->check()) {
112 112
            \redirect_header('contents.php', 3, \implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
113 113
         }
114 114
         if (isset($cont_id)) {
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
         $contentsObj->setVar('cont_header', Request::getString('cont_header'));
124 124
         // Set Var cont_text
125 125
         //fix for avoid hiding empty paragraphs in some browsers (instead of: $contentsObj->setVar('cont_weight', $_POST['cont_weight']);
126
-        $cont_text =  Request::getString('cont_text', '', 'default', 2);
126
+        $cont_text = Request::getString('cont_text', '', 'default', 2);
127 127
         $contentsObj->setVar('cont_text', \preg_replace('/<p><\/p>/', '<p>&nbsp;</p>', $cont_text));
128 128
         // Set Var cont_weight
129 129
         $contentsObj->setVar('cont_weight', Request::getInt('cont_weight'));
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
     case 'delete':
153 153
         $contentsObj = $contentsHandler->get($cont_id);
154 154
         if (1 === Request::getInt('ok')) {
155
-            if ( !$GLOBALS['xoopsSecurity']->check() ) {
155
+            if (!$GLOBALS['xoopsSecurity']->check()) {
156 156
                 \redirect_header('contents.php', 3, \implode(', ', $GLOBALS['xoopsSecurity']->getErrors()));
157 157
             }
158 158
             if ($contentsHandler->delete($contentsObj)) {
@@ -167,9 +167,9 @@  discard block
 block discarded – undo
167 167
 
168 168
     case 'order':
169 169
         $corder = Request::getArray('corder');
170
-        for ($i = 0, $iMax = \count($corder); $i < $iMax; $i++){
170
+        for ($i = 0, $iMax = \count($corder); $i < $iMax; $i++) {
171 171
             $contentsObj = $contentsHandler->get($corder[$i]);
172
-            $contentsObj->setVar('cont_weight',$i+1);
172
+            $contentsObj->setVar('cont_weight', $i + 1);
173 173
             $contentsHandler->insert($contentsObj);
174 174
         }
175 175
         break;
Please login to merge, or discard this patch.