Completed
Push — master ( 3a6ebc...3a5a05 )
by Michael
04:13
created
html/modules/altsys/include/Legacy_AltsysAdminRenderSystem.class.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (! defined('XOOPS_TRUST_PATH')) {
4
-    die('set XOOPS_TRUST_PATH into mainfile.php') ;
3
+if (!defined('XOOPS_TRUST_PATH')) {
4
+    die('set XOOPS_TRUST_PATH into mainfile.php');
5 5
 }
6 6
 
7
-$mydirname = basename(dirname(__DIR__)) ;
8
-$mydirpath = dirname(__DIR__) ;
7
+$mydirname = basename(dirname(__DIR__));
8
+$mydirpath = dirname(__DIR__);
9 9
 // require $mydirpath.'/mytrustdirname.php' ; // set $mytrustdirname
10
-$mytrustdirname = 'altsys' ;
10
+$mytrustdirname = 'altsys';
11 11
 
12
-require XOOPS_TRUST_PATH.'/libs/'.$mytrustdirname.'/include/Legacy_AltsysAdminRenderSystem.class.php' ;
12
+require XOOPS_TRUST_PATH.'/libs/'.$mytrustdirname.'/include/Legacy_AltsysAdminRenderSystem.class.php';
Please login to merge, or discard this patch.
html/modules/altsys/preload/AltsysPreload.class.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (! defined('XOOPS_TRUST_PATH')) {
4
-    die('set XOOPS_TRUST_PATH into mainfile.php') ;
3
+if (!defined('XOOPS_TRUST_PATH')) {
4
+    die('set XOOPS_TRUST_PATH into mainfile.php');
5 5
 }
6 6
 
7
-$mydirname = basename(dirname(__DIR__)) ;
8
-$mydirpath = dirname(__DIR__) ;
7
+$mydirname = basename(dirname(__DIR__));
8
+$mydirpath = dirname(__DIR__);
9 9
 // require $mydirpath.'/mytrustdirname.php' ; // set $mytrustdirname
10
-$mytrustdirname = 'altsys' ;
10
+$mytrustdirname = 'altsys';
11 11
 
12
-require XOOPS_TRUST_PATH.'/libs/'.$mytrustdirname.'/preload.php' ;
12
+require XOOPS_TRUST_PATH.'/libs/'.$mytrustdirname.'/preload.php';
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/preload.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -2,13 +2,13 @@
 block discarded – undo
2 2
 if (!defined('XOOPS_ROOT_PATH')) {
3 3
     exit();
4 4
 }
5
-$root =& XCube_Root::getSingleton();
5
+$root = & XCube_Root::getSingleton();
6 6
 //admin page
7 7
 if ($root->mController->_mStrategy) {
8 8
     if (strtolower(get_class($root->mController->_mStrategy)) == strtolower('Legacy_AdminControllerStrategy')) {
9
-        include_once __DIR__.'/include/altsys_functions.php' ;
9
+        include_once __DIR__.'/include/altsys_functions.php';
10 10
         // language file (modinfo.php)
11
-        altsys_include_language_file('modinfo') ;
11
+        altsys_include_language_file('modinfo');
12 12
     }
13 13
 }
14 14
 // load altsys newly gticket class for other modules
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/myblocksadmin.php 1 patch
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -5,56 +5,56 @@  discard block
 block discarded – undo
5 5
 //                       GIJOE <http://www.peak.ne.jp/>                      //
6 6
 // ------------------------------------------------------------------------- //
7 7
 
8
-require_once __DIR__.'/class/AltsysBreadcrumbs.class.php' ;
9
-require_once __DIR__.'/include/gtickets.php' ;
10
-include_once __DIR__.'/include/altsys_functions.php' ;
11
-include_once __DIR__.'/include/mygrouppermform.php' ;
12
-include_once XOOPS_ROOT_PATH.'/class/xoopsblock.php' ;
8
+require_once __DIR__.'/class/AltsysBreadcrumbs.class.php';
9
+require_once __DIR__.'/include/gtickets.php';
10
+include_once __DIR__.'/include/altsys_functions.php';
11
+include_once __DIR__.'/include/mygrouppermform.php';
12
+include_once XOOPS_ROOT_PATH.'/class/xoopsblock.php';
13 13
 
14 14
 // language file
15
-altsys_include_language_file('myblocksadmin') ;
15
+altsys_include_language_file('myblocksadmin');
16 16
 
17 17
 // fork by core types
18 18
 switch (altsys_get_core_type()) {
19 19
     case ALTSYS_CORE_TYPE_X22 :
20
-        include_once __DIR__.'/class/MyBlocksAdminForX22.class.php' ;
21
-        $myba =& MyBlocksAdminForX22::getInstance() ;
22
-        break ;
20
+        include_once __DIR__.'/class/MyBlocksAdminForX22.class.php';
21
+        $myba = & MyBlocksAdminForX22::getInstance();
22
+        break;
23 23
     case ALTSYS_CORE_TYPE_X25 :
24
-        include_once __DIR__.'/class/MyBlocksAdminForX25.class.php' ;
25
-        $myba =& MyBlocksAdminForX25::getInstance() ;
26
-        break ;
24
+        include_once __DIR__.'/class/MyBlocksAdminForX25.class.php';
25
+        $myba = & MyBlocksAdminForX25::getInstance();
26
+        break;
27 27
     case ALTSYS_CORE_TYPE_XCL21 :
28
-        include_once __DIR__.'/class/MyBlocksAdminForXCL21.class.php' ;
29
-        $myba =& MyBlocksAdminForXCL21::getInstance() ;
30
-        break ;
28
+        include_once __DIR__.'/class/MyBlocksAdminForXCL21.class.php';
29
+        $myba = & MyBlocksAdminForXCL21::getInstance();
30
+        break;
31 31
     case ALTSYS_CORE_TYPE_ICMS :
32
-        include_once __DIR__.'/class/MyBlocksAdminForICMS.class.php' ;
33
-        $myba =& MyBlocksAdminForICMS::getInstance() ;
34
-        break ;
32
+        include_once __DIR__.'/class/MyBlocksAdminForICMS.class.php';
33
+        $myba = & MyBlocksAdminForICMS::getInstance();
34
+        break;
35 35
     case ALTSYS_CORE_TYPE_X20S :
36 36
     case ALTSYS_CORE_TYPE_X23P :
37
-        include_once __DIR__.'/class/MyBlocksAdminForX20S.class.php' ;
38
-        $myba =& MyBlocksAdminForX20S::getInstance() ;
39
-        break ;
37
+        include_once __DIR__.'/class/MyBlocksAdminForX20S.class.php';
38
+        $myba = & MyBlocksAdminForX20S::getInstance();
39
+        break;
40 40
     default :
41
-        include_once __DIR__.'/class/MyBlocksAdmin.class.php' ;
42
-        $myba =& MyBlocksAdmin::getInstance() ;
43
-        break ;
41
+        include_once __DIR__.'/class/MyBlocksAdmin.class.php';
42
+        $myba = & MyBlocksAdmin::getInstance();
43
+        break;
44 44
 }
45 45
 // permission
46
-$myba->checkPermission() ;
46
+$myba->checkPermission();
47 47
 
48 48
 // set parameters target_mid , target_dirname etc.
49
-$myba->init($xoopsModule) ;
49
+$myba->init($xoopsModule);
50 50
 
51 51
 
52 52
 //
53 53
 // transaction stage
54 54
 //
55 55
 
56
-if (! empty($_POST)) {
57
-    $myba->processPost() ;
56
+if (!empty($_POST)) {
57
+    $myba->processPost();
58 58
 }
59 59
 
60 60
 //
@@ -62,12 +62,12 @@  discard block
 block discarded – undo
62 62
 //
63 63
 
64 64
 // header
65
-xoops_cp_header() ;
65
+xoops_cp_header();
66 66
 
67 67
 // mymenu
68
-altsys_include_mymenu() ;
68
+altsys_include_mymenu();
69 69
 
70
-$myba->processGet() ;
70
+$myba->processGet();
71 71
 
72 72
 // footer
73
-xoops_cp_footer() ;
73
+xoops_cp_footer();
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/controllers.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -5,9 +5,9 @@  discard block
 block discarded – undo
5 5
 //$langman->read( 'modinfo.php' , 'altsys' , 'altsys' ) ;
6 6
 
7 7
 if (file_exists(__DIR__.'/language/'.$GLOBALS['xoopsConfig']['language'].'/modinfo.php')) {
8
-    include_once __DIR__.'/language/'.$GLOBALS['xoopsConfig']['language'].'/modinfo.php' ;
8
+    include_once __DIR__.'/language/'.$GLOBALS['xoopsConfig']['language'].'/modinfo.php';
9 9
 } elseif (file_exists(__DIR__.'/language/english/modinfo.php')) {
10
-    include_once __DIR__.'/language/english/modinfo.php' ;
10
+    include_once __DIR__.'/language/english/modinfo.php';
11 11
 }
12 12
 
13 13
 $controllers = array(
@@ -20,4 +20,4 @@  discard block
 block discarded – undo
20 20
     'mytplsform',
21 21
     'put_templates',
22 22
     'mylangadmin'
23
-) ;
23
+);
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/class/MyBlocksAdminForX25.class.php 2 patches
Switch Indentation   +61 added lines, -61 removed lines patch added patch discarded remove patch
@@ -47,42 +47,42 @@  discard block
 block discarded – undo
47 47
         $scoln = 'disabled';
48 48
     } else {
49 49
         switch ($side) {
50
-        case XOOPS_SIDEBLOCK_LEFT :
51
-            $ssel0 = " checked='checked'";
52
-            $scol0 = 'selected';
53
-            break ;
54
-        case XOOPS_SIDEBLOCK_RIGHT :
55
-            $ssel1 = " checked='checked'";
56
-            $scol1 = 'selected';
57
-            break ;
58
-        case XOOPS_CENTERBLOCK_LEFT :
59
-            $ssel3 = " checked='checked'";
60
-            $scol3 = 'selected';
61
-            break ;
62
-        case XOOPS_CENTERBLOCK_RIGHT :
63
-            $ssel4 = " checked='checked'";
64
-            $scol4 = 'selected';
65
-            break ;
66
-        case XOOPS_CENTERBLOCK_CENTER :
67
-            $ssel5 = " checked='checked'";
68
-            $scol5 = 'selected';
69
-            break ;
70
-        case XOOPS_CENTERBLOCK_BOTTOMLEFT :
71
-            $ssel7 = " checked='checked'";
72
-            $scol7 = 'selected';
73
-            break ;
74
-        case XOOPS_CENTERBLOCK_BOTTOMRIGHT :
75
-            $ssel8 = " checked='checked'";
76
-            $scol8 = 'selected';
77
-            break ;
78
-        case XOOPS_CENTERBLOCK_BOTTOM :
79
-            $ssel9 = " checked='checked'";
80
-            $scol9 = 'selected';
81
-            break ;
82
-        default :
83
-            $value4extra_side = $side ;
84
-            $stextbox = 'selected';
85
-            break ;
50
+            case XOOPS_SIDEBLOCK_LEFT :
51
+                $ssel0 = " checked='checked'";
52
+                $scol0 = 'selected';
53
+                break ;
54
+            case XOOPS_SIDEBLOCK_RIGHT :
55
+                $ssel1 = " checked='checked'";
56
+                $scol1 = 'selected';
57
+                break ;
58
+            case XOOPS_CENTERBLOCK_LEFT :
59
+                $ssel3 = " checked='checked'";
60
+                $scol3 = 'selected';
61
+                break ;
62
+            case XOOPS_CENTERBLOCK_RIGHT :
63
+                $ssel4 = " checked='checked'";
64
+                $scol4 = 'selected';
65
+                break ;
66
+            case XOOPS_CENTERBLOCK_CENTER :
67
+                $ssel5 = " checked='checked'";
68
+                $scol5 = 'selected';
69
+                break ;
70
+            case XOOPS_CENTERBLOCK_BOTTOMLEFT :
71
+                $ssel7 = " checked='checked'";
72
+                $scol7 = 'selected';
73
+                break ;
74
+            case XOOPS_CENTERBLOCK_BOTTOMRIGHT :
75
+                $ssel8 = " checked='checked'";
76
+                $scol8 = 'selected';
77
+                break ;
78
+            case XOOPS_CENTERBLOCK_BOTTOM :
79
+                $ssel9 = " checked='checked'";
80
+                $scol9 = 'selected';
81
+                break ;
82
+            default :
83
+                $value4extra_side = $side ;
84
+                $stextbox = 'selected';
85
+                break ;
86 86
     }
87 87
     }
88 88
 
@@ -166,31 +166,31 @@  discard block
 block discarded – undo
166 166
         }
167 167
 
168 168
         switch ($mode) {
169
-        case 'clone' :
170
-            $form_title = _MD_A_MYBLOCKSADMIN_CLONEFORM ;
171
-            $button_value = _MD_A_MYBLOCKSADMIN_BTN_CLONE ;
172
-            $next_op = 'clone_ok' ;
173
-            // breadcrumbs
174
-            $breadcrumbsObj =& AltsysBreadcrumbs::getInstance() ;
175
-            $breadcrumbsObj->appendPath('', _MD_A_MYBLOCKSADMIN_CLONEFORM) ;
176
-            break ;
177
-        case 'new' :
178
-            $form_title = _MD_A_MYBLOCKSADMIN_NEWFORM ;
179
-            $button_value = _MD_A_MYBLOCKSADMIN_BTN_NEW ;
180
-            $next_op = 'new_ok' ;
181
-            // breadcrumbs
182
-            $breadcrumbsObj =& AltsysBreadcrumbs::getInstance() ;
183
-            $breadcrumbsObj->appendPath('', _MD_A_MYBLOCKSADMIN_NEWFORM) ;
184
-            break ;
185
-        case 'edit' :
186
-        default :
187
-            $form_title = _MD_A_MYBLOCKSADMIN_EDITFORM ;
188
-            $button_value = _MD_A_MYBLOCKSADMIN_BTN_EDIT ;
189
-            $next_op = 'edit_ok' ;
190
-            // breadcrumbs
191
-            $breadcrumbsObj =& AltsysBreadcrumbs::getInstance() ;
192
-            $breadcrumbsObj->appendPath('', _MD_A_MYBLOCKSADMIN_EDITFORM) ;
193
-            break ;
169
+            case 'clone' :
170
+                $form_title = _MD_A_MYBLOCKSADMIN_CLONEFORM ;
171
+                $button_value = _MD_A_MYBLOCKSADMIN_BTN_CLONE ;
172
+                $next_op = 'clone_ok' ;
173
+                // breadcrumbs
174
+                $breadcrumbsObj =& AltsysBreadcrumbs::getInstance() ;
175
+                $breadcrumbsObj->appendPath('', _MD_A_MYBLOCKSADMIN_CLONEFORM) ;
176
+                break ;
177
+            case 'new' :
178
+                $form_title = _MD_A_MYBLOCKSADMIN_NEWFORM ;
179
+                $button_value = _MD_A_MYBLOCKSADMIN_BTN_NEW ;
180
+                $next_op = 'new_ok' ;
181
+                // breadcrumbs
182
+                $breadcrumbsObj =& AltsysBreadcrumbs::getInstance() ;
183
+                $breadcrumbsObj->appendPath('', _MD_A_MYBLOCKSADMIN_NEWFORM) ;
184
+                break ;
185
+            case 'edit' :
186
+            default :
187
+                $form_title = _MD_A_MYBLOCKSADMIN_EDITFORM ;
188
+                $button_value = _MD_A_MYBLOCKSADMIN_BTN_EDIT ;
189
+                $next_op = 'edit_ok' ;
190
+                // breadcrumbs
191
+                $breadcrumbsObj =& AltsysBreadcrumbs::getInstance() ;
192
+                $breadcrumbsObj->appendPath('', _MD_A_MYBLOCKSADMIN_EDITFORM) ;
193
+                break ;
194 194
     }
195 195
 
196 196
         $is_custom = in_array($block->getVar('block_type'), array( 'C', 'E' )) ? true : false ;
Please login to merge, or discard this patch.
Spacing   +103 added lines, -103 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-require_once __DIR__.'/MyBlocksAdmin.class.php' ;
3
+require_once __DIR__.'/MyBlocksAdmin.class.php';
4 4
 
5 5
 class MyBlocksAdminForX25 extends MyBlocksAdmin
6 6
 {
@@ -12,9 +12,9 @@  discard block
 block discarded – undo
12 12
 
13 13
     public function construct()
14 14
     {
15
-        parent::construct() ;
15
+        parent::construct();
16 16
 
17
-        @include_once XOOPS_ROOT_PATH.'/modules/system/language/'.$this->lang.'/admin/blocksadmin.php' ;
17
+        @include_once XOOPS_ROOT_PATH.'/modules/system/language/'.$this->lang.'/admin/blocksadmin.php';
18 18
     }
19 19
 
20 20
 //HACK by domifara for php5.3+
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
     static $instance;
25 25
     if (!isset($instance)) {
26 26
         $instance = new MyBlocksAdminForX25();
27
-        $instance->construct() ;
27
+        $instance->construct();
28 28
     }
29 29
     return $instance;
30 30
 }
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
     $sseln = $ssel0 = $ssel1 = $ssel3 = $ssel4 = $ssel5 = $ssel7 = $ssel8 = $ssel9 = '';
41 41
     $scoln = $scol0 = $scol1 = $scol3 = $scol4 = $scol5 = $scol7 = $scol8 = $scol9 = 'unselected';
42 42
     $stextbox = 'unselected';
43
-    $value4extra_side = '' ;
43
+    $value4extra_side = '';
44 44
 
45 45
     if ($visible != 1) {
46 46
         $sseln = " checked='checked'";
@@ -50,39 +50,39 @@  discard block
 block discarded – undo
50 50
         case XOOPS_SIDEBLOCK_LEFT :
51 51
             $ssel0 = " checked='checked'";
52 52
             $scol0 = 'selected';
53
-            break ;
53
+            break;
54 54
         case XOOPS_SIDEBLOCK_RIGHT :
55 55
             $ssel1 = " checked='checked'";
56 56
             $scol1 = 'selected';
57
-            break ;
57
+            break;
58 58
         case XOOPS_CENTERBLOCK_LEFT :
59 59
             $ssel3 = " checked='checked'";
60 60
             $scol3 = 'selected';
61
-            break ;
61
+            break;
62 62
         case XOOPS_CENTERBLOCK_RIGHT :
63 63
             $ssel4 = " checked='checked'";
64 64
             $scol4 = 'selected';
65
-            break ;
65
+            break;
66 66
         case XOOPS_CENTERBLOCK_CENTER :
67 67
             $ssel5 = " checked='checked'";
68 68
             $scol5 = 'selected';
69
-            break ;
69
+            break;
70 70
         case XOOPS_CENTERBLOCK_BOTTOMLEFT :
71 71
             $ssel7 = " checked='checked'";
72 72
             $scol7 = 'selected';
73
-            break ;
73
+            break;
74 74
         case XOOPS_CENTERBLOCK_BOTTOMRIGHT :
75 75
             $ssel8 = " checked='checked'";
76 76
             $scol8 = 'selected';
77
-            break ;
77
+            break;
78 78
         case XOOPS_CENTERBLOCK_BOTTOM :
79 79
             $ssel9 = " checked='checked'";
80 80
             $scol9 = 'selected';
81
-            break ;
81
+            break;
82 82
         default :
83
-            $value4extra_side = $side ;
83
+            $value4extra_side = $side;
84 84
             $stextbox = 'selected';
85
-            break ;
85
+            break;
86 86
     }
87 87
     }
88 88
 
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 				<div class='blockposition $scoln'>
144 144
 					<input type='radio' name='sides[$bid]' value='-1' class='blockposition' $sseln onclick='document.getElementById(\"extra_side_$bid\").value=-1;' />
145 145
 				</div>
146
-                <div style='float:"._GLOBAL_LEFT.";'>"._NONE . '</div>
146
+                <div style='float:"._GLOBAL_LEFT.";'>"._NONE.'</div>
147 147
 			</td>
148 148
 		</tr>
149 149
 	</table>
@@ -155,53 +155,53 @@  discard block
 block discarded – undo
155 155
         $bid = (int)$bid;
156 156
 
157 157
 //HACK by domifara
158
-    $block = new XoopsBlock($bid) ;
158
+    $block = new XoopsBlock($bid);
159 159
 
160
-        if (! $block->getVar('bid')) {
160
+        if (!$block->getVar('bid')) {
161 161
             // new defaults
162
-        $bid = 0 ;
163
-            $mode = 'new' ;
164
-            $block->setVar('mid', 0) ;
165
-            $block->setVar('block_type', 'C') ;
162
+        $bid = 0;
163
+            $mode = 'new';
164
+            $block->setVar('mid', 0);
165
+            $block->setVar('block_type', 'C');
166 166
         }
167 167
 
168 168
         switch ($mode) {
169 169
         case 'clone' :
170
-            $form_title = _MD_A_MYBLOCKSADMIN_CLONEFORM ;
171
-            $button_value = _MD_A_MYBLOCKSADMIN_BTN_CLONE ;
172
-            $next_op = 'clone_ok' ;
170
+            $form_title = _MD_A_MYBLOCKSADMIN_CLONEFORM;
171
+            $button_value = _MD_A_MYBLOCKSADMIN_BTN_CLONE;
172
+            $next_op = 'clone_ok';
173 173
             // breadcrumbs
174
-            $breadcrumbsObj =& AltsysBreadcrumbs::getInstance() ;
175
-            $breadcrumbsObj->appendPath('', _MD_A_MYBLOCKSADMIN_CLONEFORM) ;
176
-            break ;
174
+            $breadcrumbsObj = & AltsysBreadcrumbs::getInstance();
175
+            $breadcrumbsObj->appendPath('', _MD_A_MYBLOCKSADMIN_CLONEFORM);
176
+            break;
177 177
         case 'new' :
178
-            $form_title = _MD_A_MYBLOCKSADMIN_NEWFORM ;
179
-            $button_value = _MD_A_MYBLOCKSADMIN_BTN_NEW ;
180
-            $next_op = 'new_ok' ;
178
+            $form_title = _MD_A_MYBLOCKSADMIN_NEWFORM;
179
+            $button_value = _MD_A_MYBLOCKSADMIN_BTN_NEW;
180
+            $next_op = 'new_ok';
181 181
             // breadcrumbs
182
-            $breadcrumbsObj =& AltsysBreadcrumbs::getInstance() ;
183
-            $breadcrumbsObj->appendPath('', _MD_A_MYBLOCKSADMIN_NEWFORM) ;
184
-            break ;
182
+            $breadcrumbsObj = & AltsysBreadcrumbs::getInstance();
183
+            $breadcrumbsObj->appendPath('', _MD_A_MYBLOCKSADMIN_NEWFORM);
184
+            break;
185 185
         case 'edit' :
186 186
         default :
187
-            $form_title = _MD_A_MYBLOCKSADMIN_EDITFORM ;
188
-            $button_value = _MD_A_MYBLOCKSADMIN_BTN_EDIT ;
189
-            $next_op = 'edit_ok' ;
187
+            $form_title = _MD_A_MYBLOCKSADMIN_EDITFORM;
188
+            $button_value = _MD_A_MYBLOCKSADMIN_BTN_EDIT;
189
+            $next_op = 'edit_ok';
190 190
             // breadcrumbs
191
-            $breadcrumbsObj =& AltsysBreadcrumbs::getInstance() ;
192
-            $breadcrumbsObj->appendPath('', _MD_A_MYBLOCKSADMIN_EDITFORM) ;
193
-            break ;
191
+            $breadcrumbsObj = & AltsysBreadcrumbs::getInstance();
192
+            $breadcrumbsObj->appendPath('', _MD_A_MYBLOCKSADMIN_EDITFORM);
193
+            break;
194 194
     }
195 195
 
196
-        $is_custom = in_array($block->getVar('block_type'), array( 'C', 'E' )) ? true : false ;
197
-        $block_template =& $block->getVar('template', 'n') ;
198
-        $block_template_tplset = '' ;
196
+        $is_custom = in_array($block->getVar('block_type'), array('C', 'E')) ? true : false;
197
+        $block_template = & $block->getVar('template', 'n');
198
+        $block_template_tplset = '';
199 199
 
200
-        if (! $is_custom && $block_template) {
200
+        if (!$is_custom && $block_template) {
201 201
             // find template of the block
202 202
         $tplfile_handler = xoops_gethandler('tplfile');
203
-            $found_templates = $tplfile_handler->find($GLOBALS['xoopsConfig']['template_set'], 'block', null, null, $block_template) ;
204
-            $block_template_tplset = count($found_templates) > 0 ? $GLOBALS['xoopsConfig']['template_set'] : 'default' ;
203
+            $found_templates = $tplfile_handler->find($GLOBALS['xoopsConfig']['template_set'], 'block', null, null, $block_template);
204
+            $block_template_tplset = count($found_templates) > 0 ? $GLOBALS['xoopsConfig']['template_set'] : 'default';
205 205
         }
206 206
 //HACK by domifara
207 207
 /*
@@ -210,41 +210,41 @@  discard block
 block discarded – undo
210 210
     }
211 211
 */
212 212
     $block_data = $this->preview_request + array(
213
-        'bid' => $bid ,
214
-        'name' => $block->getVar('name', 'n') ,
215
-        'title' => $block->getVar('title', 'n') ,
213
+        'bid' => $bid,
214
+        'name' => $block->getVar('name', 'n'),
215
+        'title' => $block->getVar('title', 'n'),
216 216
             'weight' => (int)$block->getVar('weight'),
217 217
             'bcachetime' => (int)$block->getVar('bcachetime'),
218 218
             'side' => (int)$block->getVar('side'),
219 219
             'visible' => (int)$block->getVar('visible'),
220
-        'template' => $block_template ,
221
-        'template_tplset' => $block_template_tplset ,
222
-        'options' => $block->getVar('options') ,
223
-        'content' => $block->getVar('content', 'n') ,
224
-        'is_custom' => $is_custom ,
225
-        'type' => $block->getVar('block_type') ,
220
+        'template' => $block_template,
221
+        'template_tplset' => $block_template_tplset,
222
+        'options' => $block->getVar('options'),
223
+        'content' => $block->getVar('content', 'n'),
224
+        'is_custom' => $is_custom,
225
+        'type' => $block->getVar('block_type'),
226 226
         'ctype' => $block->getVar('c_type')
227
-    ) ;
227
+    );
228 228
 
229 229
         $block4assign = array(
230
-        'name_raw' => $block_data['name'] ,
231
-        'title_raw' => $block_data['title'] ,
232
-        'content_raw' => $block_data['content'] ,
233
-        'cell_position' => $this->renderCell4BlockPosition($block_data) ,
234
-        'cell_module_link' => $this->renderCell4BlockModuleLink($block_data) ,
235
-        'cell_group_perm' =>  $this->renderCell4BlockReadGroupPerm($block_data) ,
236
-        'cell_options' => $this->renderCell4BlockOptions($block_data) ,
230
+        'name_raw' => $block_data['name'],
231
+        'title_raw' => $block_data['title'],
232
+        'content_raw' => $block_data['content'],
233
+        'cell_position' => $this->renderCell4BlockPosition($block_data),
234
+        'cell_module_link' => $this->renderCell4BlockModuleLink($block_data),
235
+        'cell_group_perm' =>  $this->renderCell4BlockReadGroupPerm($block_data),
236
+        'cell_options' => $this->renderCell4BlockOptions($block_data),
237 237
         'content_preview' => $this->previewContent($block_data)
238
-    ) + $block_data ;
238
+    ) + $block_data;
239 239
 
240 240
     // display
241
-    require_once XOOPS_TRUST_PATH.'/libs/altsys/class/D3Tpl.class.php' ;
242
-        $tpl = new D3Tpl() ;
241
+    require_once XOOPS_TRUST_PATH.'/libs/altsys/class/D3Tpl.class.php';
242
+        $tpl = new D3Tpl();
243 243
 //dhtml
244 244
     include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
245 245
 
246
-        if ($block_data['ctype']=='H' || empty($block_data['ctype'])) {
247
-            $editor_configs=array();
246
+        if ($block_data['ctype'] == 'H' || empty($block_data['ctype'])) {
247
+            $editor_configs = array();
248 248
             $editor_configs['name']   = 'content_block';
249 249
             $editor_configs['value']  = $block_data['content'];
250 250
             $editor_configs['rows']   = 20;
@@ -254,12 +254,12 @@  discard block
 block discarded – undo
254 254
             $editor_configs['editor'] = xoops_getModuleOption('blocks_editor', 'system');
255 255
             $form                     = new XoopsFormEditor('', 'textarea_content', $editor_configs);
256 256
             $rendered = $form->render();
257
-            $tpl->assign('altsys_x25_dhtmltextarea', $rendered) ;
257
+            $tpl->assign('altsys_x25_dhtmltextarea', $rendered);
258 258
         } else {
259 259
             $form = new XoopsFormDhtmlTextArea('', 'textarea_content', $block_data['content'], 80, 20);
260 260
             $rendered = $form->render();
261
-            $rendered = '<div id="textarea_content_bbcode_buttons_pre" style="display:block;">'.str_replace(array( '<textarea', '</textarea><br />' ), array( '</div><textarea', '</textarea><div id="textarea_content_bbcode_buttons_post" style="display:block;">' ), $rendered) . '</div>' ;
262
-            $tpl->assign('altsys_x25_dhtmltextarea', $rendered) ;
261
+            $rendered = '<div id="textarea_content_bbcode_buttons_pre" style="display:block;">'.str_replace(array('<textarea', '</textarea><br />'), array('</div><textarea', '</textarea><div id="textarea_content_bbcode_buttons_post" style="display:block;">'), $rendered).'</div>';
262
+            $tpl->assign('altsys_x25_dhtmltextarea', $rendered);
263 263
         }
264 264
 
265 265
         $tpl->assign(array(
@@ -274,91 +274,91 @@  discard block
 block discarded – undo
274 274
         'submit_button' => $button_value,
275 275
         'common_fck_installed' => file_exists(XOOPS_ROOT_PATH.'/common/fckeditor/fckeditor.js'),
276 276
         'gticket_hidden' => $GLOBALS['xoopsGTicket']->getTicketHtml(__LINE__, 1800, 'myblocksadmin')
277
-    )) ;
277
+    ));
278 278
 //HACK by domifara
279
-    $tpl->display('db:altsys_main_myblocksadmin_edit_4x25.html') ;
279
+    $tpl->display('db:altsys_main_myblocksadmin_edit_4x25.html');
280 280
 
281
-        return ;
281
+        return;
282 282
     }
283 283
     public function fetchRequest4Block($bid)
284 284
     {
285 285
         $bid = (int)$bid;
286
-        (method_exists('MyTextSanitizer', 'sGetInstance') and $myts =& MyTextSanitizer::sGetInstance()) || $myts = MyTextSanitizer::getInstance() ;
286
+        (method_exists('MyTextSanitizer', 'sGetInstance') and $myts = & MyTextSanitizer::sGetInstance()) || $myts = MyTextSanitizer::getInstance();
287 287
 
288 288
         if (@$_POST['extra_sides'][$bid] > 0) {
289 289
             $_POST['sides'][$bid] = (int)$_POST['extra_sides'][$bid];
290 290
         }
291 291
 
292 292
         if (@$_POST['sides'][$bid] < 0) {
293
-            $visible = 0 ;
294
-            $_POST['sides'][$bid] = -1 ;
293
+            $visible = 0;
294
+            $_POST['sides'][$bid] = -1;
295 295
         } else {
296
-            $visible = 1 ;
296
+            $visible = 1;
297 297
         }
298 298
 
299 299
         return array(
300
-        'bid' => $bid ,
300
+        'bid' => $bid,
301 301
             'side' => (int)(@$_POST['sides'][$bid]),
302 302
             'weight' => (int)(@$_POST['weights'][$bid]),
303
-        'visible' => $visible ,
304
-        'title' => $myts->stripSlashesGPC(@$_POST['titles'][$bid]) ,
305
-        'content' => $myts->stripSlashesGPC(@$_POST['textarea_content']) ,
306
-        'ctype' => preg_replace('/[^A-Z]/', '', @$_POST['ctypes'][$bid]) ,
303
+        'visible' => $visible,
304
+        'title' => $myts->stripSlashesGPC(@$_POST['titles'][$bid]),
305
+        'content' => $myts->stripSlashesGPC(@$_POST['textarea_content']),
306
+        'ctype' => preg_replace('/[^A-Z]/', '', @$_POST['ctypes'][$bid]),
307 307
             'bcachetime' => (int)(@$_POST['bcachetimes'][$bid]),
308
-        'bmodule' => is_array(@$_POST['bmodules'][$bid]) ? $_POST['bmodules'][$bid] : array( 0 ) ,
309
-        'bgroup' => is_array(@$_POST['bgroups'][$bid]) ? $_POST['bgroups'][$bid] : array() ,
308
+        'bmodule' => is_array(@$_POST['bmodules'][$bid]) ? $_POST['bmodules'][$bid] : array(0),
309
+        'bgroup' => is_array(@$_POST['bgroups'][$bid]) ? $_POST['bgroups'][$bid] : array(),
310 310
         'options' => is_array(@$_POST['options'][$bid]) ? $_POST['options'][$bid] : array()
311
-    ) ;
311
+    );
312 312
     }
313 313
 
314 314
     public function previewContent($block_data)
315 315
     {
316 316
         $bid = (int)$block_data['bid'];
317 317
 
318
-        if (! $block_data['is_custom']) {
319
-            return '' ;
318
+        if (!$block_data['is_custom']) {
319
+            return '';
320 320
         }
321 321
         if (empty($this->preview_request)) {
322
-            return '' ;
322
+            return '';
323 323
         }
324 324
 
325 325
 //HACK by domifara
326 326
 //TODO : need no hook block at this
327
-    $block = new XoopsBlock($bid) ;
327
+    $block = new XoopsBlock($bid);
328 328
 
329 329
         if ($block->getVar('mid')) {
330
-            return '' ;
330
+            return '';
331 331
         }
332 332
 
333
-        $block->setVar('title', $block_data['title']) ;
334
-        $block->setVar('content', $block_data['content']) ;
333
+        $block->setVar('title', $block_data['title']);
334
+        $block->setVar('content', $block_data['content']);
335 335
 
336
-        restore_error_handler() ;
337
-        $original_level = error_reporting(E_ALL) ;
336
+        restore_error_handler();
337
+        $original_level = error_reporting(E_ALL);
338 338
 
339 339
 //	$ret = $block->getContent( 'S' , $block_data['ctype'] ) ;
340 340
 
341 341
     $c_type = $block_data['ctype'];
342 342
         if ($c_type == 'H') {
343
-            $ret = str_replace('{X_SITEURL}', XOOPS_URL . '/', $block->getVar('content', 'N'));
343
+            $ret = str_replace('{X_SITEURL}', XOOPS_URL.'/', $block->getVar('content', 'N'));
344 344
         } elseif ($c_type == 'P') {
345 345
             ob_start();
346 346
             echo eval($block->getVar('content', 'N'));
347 347
             $content = ob_get_contents();
348 348
             ob_end_clean();
349
-            $ret = str_replace('{X_SITEURL}', XOOPS_URL . '/', $content);
349
+            $ret = str_replace('{X_SITEURL}', XOOPS_URL.'/', $content);
350 350
         } elseif ($c_type == 'S') {
351
-            (method_exists('MyTextSanitizer', 'sGetInstance') and $myts =& MyTextSanitizer::sGetInstance()) || $myts = MyTextSanitizer::getInstance();
352
-            $content = str_replace('{X_SITEURL}', XOOPS_URL . '/', $block->getVar('content', 'N'));
351
+            (method_exists('MyTextSanitizer', 'sGetInstance') and $myts = & MyTextSanitizer::sGetInstance()) || $myts = MyTextSanitizer::getInstance();
352
+            $content = str_replace('{X_SITEURL}', XOOPS_URL.'/', $block->getVar('content', 'N'));
353 353
             $ret = $myts->displayTarea($content, 1, 1);
354 354
         } else {
355
-            (method_exists('MyTextSanitizer', 'sGetInstance') and $myts =& MyTextSanitizer::sGetInstance()) || $myts = MyTextSanitizer::getInstance();
356
-            $content = str_replace('{X_SITEURL}', XOOPS_URL . '/', $block->getVar('content', 'N'));
355
+            (method_exists('MyTextSanitizer', 'sGetInstance') and $myts = & MyTextSanitizer::sGetInstance()) || $myts = MyTextSanitizer::getInstance();
356
+            $content = str_replace('{X_SITEURL}', XOOPS_URL.'/', $block->getVar('content', 'N'));
357 357
             $ret = $myts->displayTarea($content, 1, 0);
358 358
         }
359 359
 
360
-        error_reporting($original_level) ;
360
+        error_reporting($original_level);
361 361
 
362
-        return $ret ;
362
+        return $ret;
363 363
     }
364 364
 }
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/class/AltsysBreadcrumbs.class.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
 class AltsysBreadcrumbs
5 5
 {
6 6
 
7
-    public $paths = array() ;
7
+    public $paths = array();
8 8
 
9 9
     public function __construct()
10 10
     {
@@ -13,29 +13,29 @@  discard block
 block discarded – undo
13 13
 //function &getInstance()
14 14
 public static function &getInstance()
15 15
 {
16
-    static $instance ;
17
-    if (! isset($instance)) {
18
-        $instance = new AltsysBreadcrumbs() ;
16
+    static $instance;
17
+    if (!isset($instance)) {
18
+        $instance = new AltsysBreadcrumbs();
19 19
     }
20
-    return $instance ;
20
+    return $instance;
21 21
 }
22 22
 
23 23
     public function getXoopsBreadcrumbs()
24 24
     {
25
-        $ret = array() ;
25
+        $ret = array();
26 26
         foreach ($this->paths as $val) {
27 27
             // delayed language constant
28 28
         if (substr($val['name'], 0, 1) == '_' && defined($val['name'])) {
29 29
             $ret[] = array(
30
-                'url' => $val['url'] ,
30
+                'url' => $val['url'],
31 31
                 'name' => constant($val['name'])
32
-            ) ;
32
+            );
33 33
         } else {
34
-            $ret[] = $val ;
34
+            $ret[] = $val;
35 35
         }
36 36
         }
37
-        unset($ret[count($ret) - 1 ]['url']) ;
38
-        return $ret ;
37
+        unset($ret[count($ret) - 1]['url']);
38
+        return $ret;
39 39
     }
40 40
 
41 41
 // all data should be escaped
@@ -44,19 +44,19 @@  discard block
 block discarded – undo
44 44
     if (is_array($url_or_path)) {
45 45
         if (empty($url_or_path['name'])) {
46 46
             // multiple paths
47
-            $this->paths = array_merge($this->paths, $url_or_path) ;
47
+            $this->paths = array_merge($this->paths, $url_or_path);
48 48
         } else {
49 49
             // array format (just a path)
50
-            $this->paths[] = $url_or_path ;
50
+            $this->paths[] = $url_or_path;
51 51
         }
52 52
     } else {
53 53
         // separate format
54
-        $this->paths[] = array( 'url' => $url_or_path , 'name' => $name ) ;
54
+        $this->paths[] = array('url' => $url_or_path, 'name' => $name);
55 55
     }
56 56
 }
57 57
 
58 58
     public function hasPaths()
59 59
     {
60
-        return ! empty($this->paths) ;
60
+        return !empty($this->paths);
61 61
     }
62 62
 }
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/class/MyBlocksAdminForX22.class.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-require_once __DIR__.'/MyBlocksAdmin.class.php' ;
3
+require_once __DIR__.'/MyBlocksAdmin.class.php';
4 4
 
5 5
 class MyBlocksAdminForX22 extends MyBlocksAdmin
6 6
 {
@@ -12,9 +12,9 @@  discard block
 block discarded – undo
12 12
 
13 13
     public function construct()
14 14
     {
15
-        parent::construct() ;
15
+        parent::construct();
16 16
 
17
-        @include_once XOOPS_ROOT_PATH.'/modules/system/language/'.$this->lang.'/admin/blocksadmin.php' ;
17
+        @include_once XOOPS_ROOT_PATH.'/modules/system/language/'.$this->lang.'/admin/blocksadmin.php';
18 18
     }
19 19
 
20 20
 //HACK by domifara for php5.3+
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
     static $instance;
25 25
     if (!isset($instance)) {
26 26
         $instance = new MyBlocksAdminForX22();
27
-        $instance->construct() ;
27
+        $instance->construct();
28 28
     }
29 29
     return $instance;
30 30
 }
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/admin_menu.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -1,35 +1,35 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (! defined('XOOPS_ROOT_PATH')) {
4
-    exit ;
3
+if (!defined('XOOPS_ROOT_PATH')) {
4
+    exit;
5 5
 }
6 6
 
7 7
 $adminmenu = array(
8 8
     array(
9
-        'title' => _MI_ALTSYS_MENU_CUSTOMBLOCKS ,
9
+        'title' => _MI_ALTSYS_MENU_CUSTOMBLOCKS,
10 10
         'link' => 'admin/index.php?mode=admin&lib=altsys&page=myblocksadmin&dirname=__CustomBlocks__'
11
-    ) ,
11
+    ),
12 12
     array(
13
-        'title' => _MI_ALTSYS_MENU_NEWCUSTOMBLOCK ,
14
-        'link' => 'admin/index.php?mode=admin&lib=altsys&page=myblocksadmin&dirname=__CustomBlocks__&op=edit' ,
13
+        'title' => _MI_ALTSYS_MENU_NEWCUSTOMBLOCK,
14
+        'link' => 'admin/index.php?mode=admin&lib=altsys&page=myblocksadmin&dirname=__CustomBlocks__&op=edit',
15 15
         'show' => false
16
-    ) ,
16
+    ),
17 17
     array(
18
-        'title' => _MI_ALTSYS_MENU_MYBLOCKSADMIN ,
18
+        'title' => _MI_ALTSYS_MENU_MYBLOCKSADMIN,
19 19
         'link' => 'admin/index.php?mode=admin&lib=altsys&page=myblocksadmin'
20
-    ) ,
20
+    ),
21 21
     array(
22
-        'title' => _MI_ALTSYS_MENU_MYTPLSADMIN ,
22
+        'title' => _MI_ALTSYS_MENU_MYTPLSADMIN,
23 23
         'link' => 'admin/index.php?mode=admin&lib=altsys&page=mytplsadmin'
24
-    ) ,
24
+    ),
25 25
     array(
26
-        'title' => _MI_ALTSYS_MENU_COMPILEHOOKADMIN ,
26
+        'title' => _MI_ALTSYS_MENU_COMPILEHOOKADMIN,
27 27
         'link' => 'admin/index.php?mode=admin&lib=altsys&page=compilehookadmin'
28
-    ) ,
28
+    ),
29 29
     array(
30
-        'title' => _MI_ALTSYS_MENU_MYLANGADMIN ,
30
+        'title' => _MI_ALTSYS_MENU_MYLANGADMIN,
31 31
         'link' => 'admin/index.php?mode=admin&lib=altsys&page=mylangadmin'
32
-    ) ,
32
+    ),
33 33
 /*  array(
34 34
         'title' => _MI_ALTSYS_MENU_MYAVATAR ,
35 35
         'link' => 'index.php?mode=admin&lib=altsys&page=myavatar' ,
@@ -38,11 +38,11 @@  discard block
 block discarded – undo
38 38
         'title' => _MI_ALTSYS_MENU_MYSMILEY ,
39 39
         'link' => 'index.php?mode=admin&lib=altsys&page=mysmiley' ,
40 40
     ) ,*/
41
-) ;
41
+);
42 42
 
43 43
 $adminmenu4altsys = array(
44 44
     array(
45
-        'title' => 'ALTSYS '._PREFERENCES ,
45
+        'title' => 'ALTSYS '._PREFERENCES,
46 46
         'link' => 'admin/index.php?mode=admin&lib=altsys&page=mypreferences'
47 47
     )
48
-) ;
48
+);
Please login to merge, or discard this patch.