Completed
Branch master (0881bb)
by Michael
04:14
created
xoops_trust_path/libs/altsys/blocks.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,21 +1,21 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-$mytrustdirname = basename(dirname(__FILE__)) ;
4
-$mytrustdirpath = dirname(__FILE__) ;
3
+$mytrustdirname = basename(dirname(__FILE__));
4
+$mytrustdirpath = dirname(__FILE__);
5 5
 
6 6
 // language files
7
-$language = empty($GLOBALS['xoopsConfig']['language']) ? 'english' : $GLOBALS['xoopsConfig']['language'] ;
7
+$language = empty($GLOBALS['xoopsConfig']['language']) ? 'english' : $GLOBALS['xoopsConfig']['language'];
8 8
 if (file_exists("$mydirpath/language/$language/blocks.php")) {
9 9
     // user customized language file (already read by class/xoopsblock.php etc)
10 10
     // include_once "$mydirpath/language/$language/blocks.php" ;
11 11
 } elseif (file_exists("$mytrustdirpath/language/$language/blocks_common.php")) {
12 12
     // default language file
13
-    include_once "$mytrustdirpath/language/$language/blocks_common.php" ;
14
-    include "$mytrustdirpath/language/$language/blocks_each.php" ;
13
+    include_once "$mytrustdirpath/language/$language/blocks_common.php";
14
+    include "$mytrustdirpath/language/$language/blocks_each.php";
15 15
 } else {
16 16
     // fallback english
17
-    include_once "$mytrustdirpath/language/english/blocks_common.php" ;
18
-    include "$mytrustdirpath/language/english/blocks_each.php" ;
17
+    include_once "$mytrustdirpath/language/english/blocks_common.php";
18
+    include "$mytrustdirpath/language/english/blocks_each.php";
19 19
 }
20 20
 
21
-require_once "$mytrustdirpath/blocks/block_functions.php" ;
21
+require_once "$mytrustdirpath/blocks/block_functions.php";
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 dirname(__FILE__).'/class/AltsysBreadcrumbs.class.php' ;
9
-require_once dirname(__FILE__).'/include/gtickets.php' ;
10
-include_once dirname(__FILE__).'/include/altsys_functions.php' ;
11
-include_once dirname(__FILE__).'/include/mygrouppermform.php' ;
12
-include_once XOOPS_ROOT_PATH.'/class/xoopsblock.php' ;
8
+require_once dirname(__FILE__).'/class/AltsysBreadcrumbs.class.php';
9
+require_once dirname(__FILE__).'/include/gtickets.php';
10
+include_once dirname(__FILE__).'/include/altsys_functions.php';
11
+include_once dirname(__FILE__).'/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 dirname(__FILE__).'/class/MyBlocksAdminForX22.class.php' ;
21
-        $myba =& MyBlocksAdminForX22::getInstance() ;
22
-        break ;
20
+        include_once dirname(__FILE__).'/class/MyBlocksAdminForX22.class.php';
21
+        $myba = & MyBlocksAdminForX22::getInstance();
22
+        break;
23 23
     case ALTSYS_CORE_TYPE_X25 :
24
-        include_once dirname(__FILE__).'/class/MyBlocksAdminForX25.class.php' ;
25
-        $myba =& MyBlocksAdminForX25::getInstance() ;
26
-        break ;
24
+        include_once dirname(__FILE__).'/class/MyBlocksAdminForX25.class.php';
25
+        $myba = & MyBlocksAdminForX25::getInstance();
26
+        break;
27 27
     case ALTSYS_CORE_TYPE_XCL21 :
28
-        include_once dirname(__FILE__).'/class/MyBlocksAdminForXCL21.class.php' ;
29
-        $myba =& MyBlocksAdminForXCL21::getInstance() ;
30
-        break ;
28
+        include_once dirname(__FILE__).'/class/MyBlocksAdminForXCL21.class.php';
29
+        $myba = & MyBlocksAdminForXCL21::getInstance();
30
+        break;
31 31
     case ALTSYS_CORE_TYPE_ICMS :
32
-        include_once dirname(__FILE__).'/class/MyBlocksAdminForICMS.class.php' ;
33
-        $myba =& MyBlocksAdminForICMS::getInstance() ;
34
-        break ;
32
+        include_once dirname(__FILE__).'/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 dirname(__FILE__).'/class/MyBlocksAdminForX20S.class.php' ;
38
-        $myba =& MyBlocksAdminForX20S::getInstance() ;
39
-        break ;
37
+        include_once dirname(__FILE__).'/class/MyBlocksAdminForX20S.class.php';
38
+        $myba = & MyBlocksAdminForX20S::getInstance();
39
+        break;
40 40
     default :
41
-        include_once dirname(__FILE__).'/class/MyBlocksAdmin.class.php' ;
42
-        $myba =& MyBlocksAdmin::getInstance() ;
43
-        break ;
41
+        include_once dirname(__FILE__).'/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/class/MyBlocksAdminForX25.class.php 1 patch
Spacing   +124 added lines, -124 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 dirname(__FILE__).'/MyBlocksAdmin.class.php' ;
3
+require_once dirname(__FILE__).'/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
 }
@@ -33,14 +33,14 @@  discard block
 block discarded – undo
33 33
 // visible and side
34 34
 public function renderCell4BlockPosition($block_data)
35 35
 {
36
-    $bid = intval($block_data['bid']) ;
37
-    $side = intval($block_data['side']) ;
38
-    $visible = intval($block_data['visible']) ;
36
+    $bid = intval($block_data['bid']);
37
+    $side = intval($block_data['side']);
38
+    $visible = intval($block_data['visible']);
39 39
 
40 40
     $sseln = $ssel0 = $ssel1 = $ssel3 = $ssel4 = $ssel5 = $ssel7 = $ssel8 = $ssel9 = "";
41 41
     $scoln = $scol0 = $scol1 = $scol3 = $scol4 = $scol5 = $scol7 = $scol8 = $scol9 = "unselected";
42
-    $stextbox = "unselected" ;
43
-    $value4extra_side = '' ;
42
+    $stextbox = "unselected";
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 ;
84
-            $stextbox = "selected" ;
85
-            break ;
83
+            $value4extra_side = $side;
84
+            $stextbox = "selected";
85
+            break;
86 86
     }
87 87
     }
88 88
 
@@ -152,56 +152,56 @@  discard block
 block discarded – undo
152 152
 
153 153
     public function form_edit($bid, $mode = 'edit')
154 154
     {
155
-        $bid = intval($bid) ;
155
+        $bid = intval($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
-        $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' ;
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';
205 205
         }
206 206
 //HACK by domifara
207 207
 /*
@@ -210,56 +210,56 @@  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') ,
216
-        'weight' => intval($block->getVar('weight')) ,
217
-        'bcachetime' => intval($block->getVar('bcachetime')) ,
218
-        'side' => intval($block->getVar('side')) ,
219
-        'visible' => intval($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') ,
226
-        'ctype' => $block->getVar('c_type') ,
227
-    ) ;
213
+        'bid' => $bid,
214
+        'name' => $block->getVar('name', 'n'),
215
+        'title' => $block->getVar('title', 'n'),
216
+        'weight' => intval($block->getVar('weight')),
217
+        'bcachetime' => intval($block->getVar('bcachetime')),
218
+        'side' => intval($block->getVar('side')),
219
+        'visible' => intval($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'),
226
+        'ctype' => $block->getVar('c_type'),
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) ,
237
-        'content_preview' => $this->previewContent($block_data) ,
238
-    ) + $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
+        'content_preview' => $this->previewContent($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();
248
-            $editor_configs["name"] ="content_block";
246
+        if ($block_data['ctype'] == 'H' || empty($block_data['ctype'])) {
247
+            $editor_configs = array();
248
+            $editor_configs["name"] = "content_block";
249 249
             $editor_configs["value"] = $block_data['content'];
250 250
             $editor_configs["rows"] = 20;
251 251
             $editor_configs["cols"] = 100;
252 252
             $editor_configs["width"] = "100%";
253 253
             $editor_configs["height"] = "400px";
254 254
             $editor_configs["editor"] = xoops_getModuleOption('blocks_editor', 'system');
255
-            $form= new XoopsFormEditor('', "textarea_content", $editor_configs);
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
-        $bid = intval($bid) ;
286
-        (method_exists('MyTextSanitizer', 'sGetInstance') and $myts =& MyTextSanitizer::sGetInstance()) || $myts =& MyTextSanitizer::getInstance() ;
285
+        $bid = intval($bid);
286
+        (method_exists('MyTextSanitizer', 'sGetInstance') and $myts = & MyTextSanitizer::sGetInstance()) || $myts = & MyTextSanitizer::getInstance();
287 287
 
288 288
         if (@$_POST['extra_sides'][$bid] > 0) {
289
-            $_POST['sides'][$bid] = intval($_POST['extra_sides'][$bid]) ;
289
+            $_POST['sides'][$bid] = intval($_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 ,
301
-        'side' => intval(@$_POST['sides'][$bid]) ,
302
-        'weight' => intval(@$_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]) ,
307
-        'bcachetime' => intval(@$_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() ,
310
-        'options' => is_array(@$_POST['options'][$bid]) ? $_POST['options'][$bid] : array() ,
311
-    ) ;
300
+        'bid' => $bid,
301
+        'side' => intval(@$_POST['sides'][$bid]),
302
+        'weight' => intval(@$_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]),
307
+        'bcachetime' => intval(@$_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(),
310
+        'options' => is_array(@$_POST['options'][$bid]) ? $_POST['options'][$bid] : array(),
311
+    );
312 312
     }
313 313
 
314 314
     public function previewContent($block_data)
315 315
     {
316
-        $bid = intval($block_data['bid']) ;
316
+        $bid = intval($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/MyBlocksAdminForICMS.class.php 1 patch
Spacing   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-require_once dirname(__FILE__).'/MyBlocksAdmin.class.php' ;
3
+require_once dirname(__FILE__).'/MyBlocksAdmin.class.php';
4 4
 
5 5
 class MyBlocksAdminForICMS extends MyBlocksAdmin
6 6
 {
7 7
 
8
-    public $block_positions = array() ;
8
+    public $block_positions = array();
9 9
 
10 10
     public function MyBlocksAadminForICMS()
11 11
     {
@@ -14,14 +14,14 @@  discard block
 block discarded – undo
14 14
 
15 15
     public function construct()
16 16
     {
17
-        parent::construct() ;
17
+        parent::construct();
18 18
 
19
-        @include_once XOOPS_ROOT_PATH.'/modules/system/language/'.$this->lang.'/admin/blocksadmin.php' ;
20
-        $result = $this->db->query("SELECT id,pname,title FROM ".$this->db->prefix("block_positions")) ;
19
+        @include_once XOOPS_ROOT_PATH.'/modules/system/language/'.$this->lang.'/admin/blocksadmin.php';
20
+        $result = $this->db->query("SELECT id,pname,title FROM ".$this->db->prefix("block_positions"));
21 21
         while (list($id, $pname, $title) = $this->db->fetchRow($result)) {
22
-            $this->block_positions[ $id ] = defined($title) ? constant($title) : $title ;
22
+            $this->block_positions[$id] = defined($title) ? constant($title) : $title;
23 23
         }
24
-        $this->block_positions[ -1 ] = _NONE ;
24
+        $this->block_positions[ -1] = _NONE;
25 25
     }
26 26
 
27 27
 //HACK by domifara for php5.3+
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
     static $instance;
32 32
     if (!isset($instance)) {
33 33
         $instance = new MyBlocksAdminForICMS();
34
-        $instance->construct() ;
34
+        $instance->construct();
35 35
     }
36 36
     return $instance;
37 37
 }
@@ -41,28 +41,28 @@  discard block
 block discarded – undo
41 41
 // link blocks - modules - pages
42 42
 public function renderCell4BlockModuleLink($block_data)
43 43
 {
44
-    $bid = intval($block_data['bid']) ;
44
+    $bid = intval($block_data['bid']);
45 45
 
46 46
     // get selected targets
47 47
     if (is_array(@$block_data['bmodule'])) {
48 48
         // bmodule origined from request (preview etc.)
49
-        $selected_pages = $block_data['bmodule'] ;
49
+        $selected_pages = $block_data['bmodule'];
50 50
     } else {
51 51
         // origined from the table of `block_module_link`
52
-        $result = $this->db->query("SELECT module_id,page_id FROM ".$this->db->prefix('block_module_link')." WHERE block_id='$bid'") ;
52
+        $result = $this->db->query("SELECT module_id,page_id FROM ".$this->db->prefix('block_module_link')." WHERE block_id='$bid'");
53 53
         $selected_pages = array();
54 54
         while (list($mid, $pid) = $this->db->fetchRow($result)) {
55
-            $selected_pages[] = intval($mid) . '-' . intval($pid) ;
55
+            $selected_pages[] = intval($mid).'-'.intval($pid);
56 56
         }
57 57
     }
58 58
 
59
-    $page_handler =& xoops_gethandler('page');
59
+    $page_handler = & xoops_gethandler('page');
60 60
     $ret = "
61 61
 				<select name='bmodules[$bid][]' size='5' multiple='multiple'>
62 62
 					".$page_handler->getPageSelOptions($selected_pages)."
63 63
 				</select>" ;
64 64
 
65
-    return $ret ;
65
+    return $ret;
66 66
 }
67 67
 
68 68
 
@@ -94,68 +94,68 @@  discard block
 block discarded – undo
94 94
 // private
95 95
 public function renderRadio4BlockPosition($target_side, $block_data)
96 96
 {
97
-    $bid = intval($block_data['bid']) ;
98
-    $visible = intval($block_data['visible']) ;
99
-    $current_side = $visible ? intval($block_data['side']) : -1 ;
97
+    $bid = intval($block_data['bid']);
98
+    $visible = intval($block_data['visible']);
99
+    $current_side = $visible ? intval($block_data['side']) : -1;
100 100
 
101
-    $label4disp = htmlspecialchars($this->block_positions[ $target_side ], ENT_QUOTES) ;
101
+    $label4disp = htmlspecialchars($this->block_positions[$target_side], ENT_QUOTES);
102 102
 
103 103
     if ($current_side == $target_side) {
104
-        $checked = "checked='checked'" ;
105
-        $divstyle = $target_side == -1 ? "disabled" : "selected" ;
104
+        $checked = "checked='checked'";
105
+        $divstyle = $target_side == -1 ? "disabled" : "selected";
106 106
     } else {
107
-        $checked = "" ;
108
-        $divstyle = "unselected" ;
107
+        $checked = "";
108
+        $divstyle = "unselected";
109 109
     }
110 110
 
111
-    return "<div class='blockposition $divstyle' title='$label4disp'><input type='radio' name='sides[$bid]' value='$target_side' class='blockposition' $checked /></div>" ;
111
+    return "<div class='blockposition $divstyle' title='$label4disp'><input type='radio' name='sides[$bid]' value='$target_side' class='blockposition' $checked /></div>";
112 112
 }
113 113
 
114 114
 
115 115
 // private
116 116
 public function renderRadio4BlockPositions($block_data, $skip_sides = array())
117 117
 {
118
-    $bid = intval($block_data['bid']) ;
119
-    $visible = intval($block_data['visible']) ;
120
-    $current_side = $visible ? intval($block_data['side']) : -1 ;
118
+    $bid = intval($block_data['bid']);
119
+    $visible = intval($block_data['visible']);
120
+    $current_side = $visible ? intval($block_data['side']) : -1;
121 121
 
122
-    $ret = '' ;
122
+    $ret = '';
123 123
     foreach ($this->block_positions as $target_side => $label) {
124 124
         if (in_array($target_side, $skip_sides)) {
125
-            continue ;
125
+            continue;
126 126
         }
127 127
 
128
-        $label4disp = htmlspecialchars($label, ENT_QUOTES) ;
128
+        $label4disp = htmlspecialchars($label, ENT_QUOTES);
129 129
 
130 130
         if ($current_side == $target_side) {
131
-            $checked = "checked='checked'" ;
132
-            $divstyle = $target_side == -1 ? "disabled" : "selected" ;
131
+            $checked = "checked='checked'";
132
+            $divstyle = $target_side == -1 ? "disabled" : "selected";
133 133
         } else {
134
-            $checked = "" ;
135
-            $divstyle = "unselected" ;
134
+            $checked = "";
135
+            $divstyle = "unselected";
136 136
         }
137 137
 
138
-        $ret .= "<div style='clear:both;'><div class='blockposition $divstyle' title='$label4disp'><input type='radio' name='sides[$bid]' id='sides_{$bid}_{$target_side}' value='$target_side' class='blockposition' $checked /></div><label for='sides_{$bid}_{$target_side}'>$label4disp</label></label></div>" ;
138
+        $ret .= "<div style='clear:both;'><div class='blockposition $divstyle' title='$label4disp'><input type='radio' name='sides[$bid]' id='sides_{$bid}_{$target_side}' value='$target_side' class='blockposition' $checked /></div><label for='sides_{$bid}_{$target_side}'>$label4disp</label></label></div>";
139 139
     }
140 140
 
141
-    return $ret ;
141
+    return $ret;
142 142
 }
143 143
 
144 144
 
145 145
 // virtual
146 146
 public function updateBlockModuleLink($bid, $bmodules)
147 147
 {
148
-    $bid = intval($bid) ;
149
-    $table = $this->db->prefix("block_module_link") ;
148
+    $bid = intval($bid);
149
+    $table = $this->db->prefix("block_module_link");
150 150
 
151
-    $sql = "DELETE FROM `$table` WHERE `block_id`=$bid" ;
152
-    $this->db->query($sql) ;
151
+    $sql = "DELETE FROM `$table` WHERE `block_id`=$bid";
152
+    $this->db->query($sql);
153 153
     foreach ($bmodules as $mid) {
154
-        $regs = explode('-', $mid) ;
155
-        $module_id = intval(@$regs[0]) ;
156
-        $page_id = intval(@$regs[1]) ;
157
-        $sql = "INSERT INTO `$table` (`block_id`,`module_id`,`page_id`) VALUES ($bid,$module_id,$page_id)" ;
158
-        $this->db->query($sql) ;
154
+        $regs = explode('-', $mid);
155
+        $module_id = intval(@$regs[0]);
156
+        $page_id = intval(@$regs[1]);
157
+        $sql = "INSERT INTO `$table` (`block_id`,`module_id`,`page_id`) VALUES ($bid,$module_id,$page_id)";
158
+        $this->db->query($sql);
159 159
     }
160 160
 }
161 161
 }
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/class/d3utilities.php 1 patch
Spacing   +109 added lines, -109 removed lines patch added patch discarded remove patch
@@ -3,40 +3,40 @@  discard block
 block discarded – undo
3 3
 class d3utilities
4 4
 {
5 5
 
6
-    public $dirname = '' ; // directory name under xoops_trust_path
7
-    public $mydirname = '' ; // each directory name under xoops_root_path
8
-    public $mid = 0 ; // id of each module instance
9
-    public $table = '' ; // table with prefix and dirname
10
-    public $primary_key = '' ; // column for primary_key
11
-    public $cols = array() ; // settings of each columns
12
-    public $form_mode = 'new' ; // 'new','edit' are available
13
-    public $page_name = '' ; // controller's name  eg) page=(controller) in URI
14
-    public $action_base_hiddens = array() ;
6
+    public $dirname = ''; // directory name under xoops_trust_path
7
+    public $mydirname = ''; // each directory name under xoops_root_path
8
+    public $mid = 0; // id of each module instance
9
+    public $table = ''; // table with prefix and dirname
10
+    public $primary_key = ''; // column for primary_key
11
+    public $cols = array(); // settings of each columns
12
+    public $form_mode = 'new'; // 'new','edit' are available
13
+    public $page_name = ''; // controller's name  eg) page=(controller) in URI
14
+    public $action_base_hiddens = array();
15 15
 
16 16
 //HACK by domifara
17 17
 //	public function D3Utilities( $mydirname , $table_body , $primary_key , $cols , $page_name , $action_base_hiddens )
18 18
     public function __construct($mydirname, $table_body, $primary_key, $cols, $page_name, $action_base_hiddens)
19 19
     {
20
-        $db =& XoopsDatabaseFactory::getDatabaseConnection() ;
21
-
22
-        $this->dirname = basename(dirname(dirname(__FILE__))) ;
23
-        $this->mydirname = $mydirname ;
24
-        $this->table = $db->prefix($mydirname ? $mydirname . '_' . $table_body : $table_body) ;
25
-        $this->primary_key = $primary_key ;
26
-        $this->cols = $cols ;
27
-        $module_handler =& xoops_gethandler('module') ;
28
-        $module =& $module_handler->getByDirname($this->mydirname) ;
29
-        if (! empty($module)) {
30
-            $this->mid = intval($module->getVar('mid')) ;
20
+        $db = & XoopsDatabaseFactory::getDatabaseConnection();
21
+
22
+        $this->dirname = basename(dirname(dirname(__FILE__)));
23
+        $this->mydirname = $mydirname;
24
+        $this->table = $db->prefix($mydirname ? $mydirname.'_'.$table_body : $table_body);
25
+        $this->primary_key = $primary_key;
26
+        $this->cols = $cols;
27
+        $module_handler = & xoops_gethandler('module');
28
+        $module = & $module_handler->getByDirname($this->mydirname);
29
+        if (!empty($module)) {
30
+            $this->mid = intval($module->getVar('mid'));
31 31
         }
32
-        $this->page_name = $page_name ;
33
-        $this->action_base_hiddens = $action_base_hiddens ;
32
+        $this->page_name = $page_name;
33
+        $this->action_base_hiddens = $action_base_hiddens;
34 34
     }
35 35
 
36 36
 
37 37
     public function get_language_constant($name)
38 38
     {
39
-        return constant(strtoupper('_MD_A_' . $this->dirname . '_' . $this->page_name . '_' . $name)) ;
39
+        return constant(strtoupper('_MD_A_'.$this->dirname.'_'.$this->page_name.'_'.$name));
40 40
     }
41 41
 
42 42
 
@@ -45,23 +45,23 @@  discard block
 block discarded – undo
45 45
         switch ($col['type']) {
46 46
             case 'text' :
47 47
             case 'blob' :
48
-                $length = empty($col['length']) ? 65535 : intval($col['length']) ;
49
-                return "`{$col['name']}`='".addslashes(xoops_substr($value, 0, $length))."'" ;
48
+                $length = empty($col['length']) ? 65535 : intval($col['length']);
49
+                return "`{$col['name']}`='".addslashes(xoops_substr($value, 0, $length))."'";
50 50
             case 'char' :
51 51
             case 'varchar' :
52 52
             case 'string' :
53
-                $length = empty($col['length']) ? 255 : intval($col['length']) ;
54
-                return "`{$col['name']}`='".addslashes(xoops_substr($value, 0, $length))."'" ;
53
+                $length = empty($col['length']) ? 255 : intval($col['length']);
54
+                return "`{$col['name']}`='".addslashes(xoops_substr($value, 0, $length))."'";
55 55
             case 'int' :
56 56
             case 'integer' :
57
-                $value = intval($value) ;
58
-                if (! empty($col['max'])) {
59
-                    $value = min($value, intval($col['max'])) ;
57
+                $value = intval($value);
58
+                if (!empty($col['max'])) {
59
+                    $value = min($value, intval($col['max']));
60 60
                 }
61
-                if (! empty($col['min'])) {
62
-                    $value = max($value, intval($col['min'])) ;
61
+                if (!empty($col['min'])) {
62
+                    $value = max($value, intval($col['min']));
63 63
                 }
64
-                return "`{$col['name']}`=$value" ;
64
+                return "`{$col['name']}`=$value";
65 65
         }
66 66
     }
67 67
 
@@ -69,29 +69,29 @@  discard block
 block discarded – undo
69 69
     // single update or insert
70 70
     public function insert()
71 71
     {
72
-        $db =& XoopsDatabaseFactory::getDatabaseConnection() ;
72
+        $db = & XoopsDatabaseFactory::getDatabaseConnection();
73 73
 
74
-        $id = $this->init_default_values() ;
74
+        $id = $this->init_default_values();
75 75
 
76
-        $set4sql = '' ;
76
+        $set4sql = '';
77 77
         foreach ($this->cols as $col) {
78 78
             if (empty($col['edit_edit'])) {
79
-                continue ;
79
+                continue;
80 80
             }
81 81
             if ($col['name'] == $this->primary_key) {
82
-                continue ;
82
+                continue;
83 83
             }
84
-            $set4sql .= $this->get_set4sql(@$_POST[ $col['name'] ], $col) . ',' ;
84
+            $set4sql .= $this->get_set4sql(@$_POST[$col['name']], $col).',';
85 85
         }
86
-        if (! empty($set4sql)) {
86
+        if (!empty($set4sql)) {
87 87
             if ($id > 0) {
88 88
                 // UPDATE
89
-                $db->queryF("UPDATE $this->table SET ".substr($set4sql, 0, -1)." WHERE $this->primary_key='".addslashes($id)."'") ;
90
-                return array( $id , 'update' ) ;
89
+                $db->queryF("UPDATE $this->table SET ".substr($set4sql, 0, -1)." WHERE $this->primary_key='".addslashes($id)."'");
90
+                return array($id, 'update');
91 91
             } else {
92 92
                 // INSERT
93
-                $db->queryF("INSERT INTO $this->table SET ".substr($set4sql, 0, -1)) ;
94
-                return array( $db->getInsertId() , 'insert' ) ;
93
+                $db->queryF("INSERT INTO $this->table SET ".substr($set4sql, 0, -1));
94
+                return array($db->getInsertId(), 'insert');
95 95
             }
96 96
         }
97 97
     }
@@ -100,156 +100,156 @@  discard block
 block discarded – undo
100 100
     // multiple update
101 101
     public function update()
102 102
     {
103
-        $db =& XoopsDatabaseFactory::getDatabaseConnection() ;
103
+        $db = & XoopsDatabaseFactory::getDatabaseConnection();
104 104
 
105 105
         // search appropriate column for getting primary_key
106 106
         foreach ($this->cols as $col) {
107
-            if (in_array(@$col['list_edit'], array( 'text', 'textarea', 'hidden' ))) {
108
-                $column4key = $col['name'] ;
109
-                break ;
107
+            if (in_array(@$col['list_edit'], array('text', 'textarea', 'hidden'))) {
108
+                $column4key = $col['name'];
109
+                break;
110 110
             }
111 111
         }
112 112
         if (empty($column4key)) {
113
-            $column4key = $this->cols[0]['name'] ;
113
+            $column4key = $this->cols[0]['name'];
114 114
         }
115 115
 
116
-        $ret = array() ;
116
+        $ret = array();
117 117
         foreach (array_keys($_POST[$column4key]) as $id) {
118
-            $id = intval($id) ;    // primary_key should be 'integer'
119
-            $set4sql = '' ;
118
+            $id = intval($id); // primary_key should be 'integer'
119
+            $set4sql = '';
120 120
             foreach ($this->cols as $col) {
121 121
                 if (empty($col['list_edit'])) {
122
-                    continue ;
122
+                    continue;
123 123
                 }
124 124
                 if ($col['name'] == $this->primary_key) {
125
-                    continue ;
125
+                    continue;
126 126
                 }
127
-                $set4sql .= $this->get_set4sql(@$_POST[ $col['name'] ][$id], $col) . ',' ;
127
+                $set4sql .= $this->get_set4sql(@$_POST[$col['name']][$id], $col).',';
128 128
             }
129
-            if (! empty($set4sql)) {
130
-                $result = $db->query("SELECT * FROM $this->table WHERE $this->primary_key=$id") ;
129
+            if (!empty($set4sql)) {
130
+                $result = $db->query("SELECT * FROM $this->table WHERE $this->primary_key=$id");
131 131
                 if ($db->getRowsNum($result) == 1) {
132
-                    $db->queryF("UPDATE $this->table SET ".substr($set4sql, 0, -1)." WHERE $this->primary_key=$id") ;
132
+                    $db->queryF("UPDATE $this->table SET ".substr($set4sql, 0, -1)." WHERE $this->primary_key=$id");
133 133
                     if ($db->getAffectedRows() == 1) {
134
-                        $ret[ $id ] = $db->fetchArray($result) ;
134
+                        $ret[$id] = $db->fetchArray($result);
135 135
                     }
136 136
                 }
137 137
             }
138 138
         }
139 139
 
140
-        return $ret ;
140
+        return $ret;
141 141
     }
142 142
 
143 143
 
144 144
     public function delete($delete_comments = false, $delete_notifications = false)
145 145
     {
146
-        $db =& XoopsDatabaseFactory::getDatabaseConnection() ;
146
+        $db = & XoopsDatabaseFactory::getDatabaseConnection();
147 147
 
148
-        $ret = array() ;
148
+        $ret = array();
149 149
         foreach (array_keys($_POST['admin_main_checkboxes']) as $id) {
150
-            $id = intval($id) ;    // primary_key should be 'integer'
151
-            $result = $db->query("SELECT * FROM $this->table WHERE $this->primary_key=$id") ;
150
+            $id = intval($id); // primary_key should be 'integer'
151
+            $result = $db->query("SELECT * FROM $this->table WHERE $this->primary_key=$id");
152 152
             if ($db->getRowsNum($result) == 1) {
153
-                $ret[ $id ] = $db->fetchArray($result) ;
153
+                $ret[$id] = $db->fetchArray($result);
154 154
 
155
-                $db->queryF("DELETE FROM $this->table WHERE $this->primary_key=$id") ;
155
+                $db->queryF("DELETE FROM $this->table WHERE $this->primary_key=$id");
156 156
                 if ($delete_comments) {
157 157
                     // remove comments
158
-                    $db->queryF("DELETE FROM ".$db->prefix("xoopscomments")." WHERE com_modid=$this->mid AND com_itemid=$id") ;
158
+                    $db->queryF("DELETE FROM ".$db->prefix("xoopscomments")." WHERE com_modid=$this->mid AND com_itemid=$id");
159 159
                 }
160 160
 
161 161
                 if ($delete_notifications) {
162 162
                     // remove notifications
163
-                    $db->queryF("DELETE FROM ".$db->prefix("xoopsnotifications")." WHERE not_modid=$this->mid AND not_itemid=$id") ;
163
+                    $db->queryF("DELETE FROM ".$db->prefix("xoopsnotifications")." WHERE not_modid=$this->mid AND not_itemid=$id");
164 164
                 }
165 165
             }
166 166
         }
167 167
 
168
-        return $ret ;
168
+        return $ret;
169 169
     }
170 170
 
171 171
 
172 172
     public function init_default_values()
173 173
     {
174
-        $db =& XoopsDatabaseFactory::getDatabaseConnection() ;
174
+        $db = & XoopsDatabaseFactory::getDatabaseConnection();
175 175
 
176 176
         if (@$_GET['id']) {
177
-            $id = intval($_GET['id']) ;
178
-            $rs = $db->query("SELECT * FROM $this->table WHERE $this->primary_key=$id") ;
177
+            $id = intval($_GET['id']);
178
+            $rs = $db->query("SELECT * FROM $this->table WHERE $this->primary_key=$id");
179 179
             if ($db->getRowsNum($rs) == 1) {
180
-                $row = $db->fetchArray($rs) ;
180
+                $row = $db->fetchArray($rs);
181 181
                 foreach (array_keys($this->cols) as $key) {
182 182
                     if (empty($this->cols[$key]['edit_show'])) {
183
-                        continue ;
183
+                        continue;
184 184
                     }
185
-                    $this->cols[$key]['default_value'] = $row[ $this->cols[$key]['name'] ] ;
185
+                    $this->cols[$key]['default_value'] = $row[$this->cols[$key]['name']];
186 186
                 }
187
-                $this->form_mode = 'edit' ;
188
-                return $id ;
187
+                $this->form_mode = 'edit';
188
+                return $id;
189 189
             }
190 190
         }
191 191
 
192
-        $this->form_mode = 'new' ;
193
-        return 0 ;
192
+        $this->form_mode = 'new';
193
+        return 0;
194 194
     }
195 195
 
196 196
 
197 197
     public function get_view_edit()
198 198
     {
199
-        $id = $this->init_default_values() ;
199
+        $id = $this->init_default_values();
200 200
 
201
-        $lines = array() ;
201
+        $lines = array();
202 202
         foreach ($this->cols as $col) {
203 203
             if (empty($col['edit_show'])) {
204
-                continue ;
204
+                continue;
205 205
             }
206
-            if (! isset($col['default_value'])) {
206
+            if (!isset($col['default_value'])) {
207 207
                 switch ($col['type']) {
208 208
                     case 'int' :
209 209
                     case 'integer' :
210
-                        $col['default_value'] = 0 ;
211
-                        break ;
210
+                        $col['default_value'] = 0;
211
+                        break;
212 212
                     default :
213
-                        $col['default_value'] = '' ;
214
-                        break ;
213
+                        $col['default_value'] = '';
214
+                        break;
215 215
                 }
216 216
             }
217 217
             switch ($col['edit_edit']) {
218 218
                 case 'checkbox' :
219
-                    $checked = empty($col['default_value']) ? '' : "checked='checked'" ;
220
-                    $value = empty($col['checkbox_value']) ? 1 : htmlspecialchars($col['checkbox_value'], ENT_QUOTES) ;
219
+                    $checked = empty($col['default_value']) ? '' : "checked='checked'";
220
+                    $value = empty($col['checkbox_value']) ? 1 : htmlspecialchars($col['checkbox_value'], ENT_QUOTES);
221 221
 
222
-                    $lines[ $col['name'] ] = "<input type='checkbox' name='{$col['name']}' value='$value' $checked />" ;
223
-                    break ;
222
+                    $lines[$col['name']] = "<input type='checkbox' name='{$col['name']}' value='$value' $checked />";
223
+                    break;
224 224
                 case 'text' :
225 225
                 default :
226
-                    $size = empty($col['edit_size']) ? 32 : intval($col['edit_size']) ;
227
-                    $length = empty($col['length']) ? 255 : intval($col['length']) ;
228
-                    $lines[ $col['name'] ] = "<input type='text' name='{$col['name']}' size='$size' maxlength='$length' value='".htmlspecialchars($col['default_value'], ENT_QUOTES)."' />" ;
229
-                    break ;
226
+                    $size = empty($col['edit_size']) ? 32 : intval($col['edit_size']);
227
+                    $length = empty($col['length']) ? 255 : intval($col['length']);
228
+                    $lines[$col['name']] = "<input type='text' name='{$col['name']}' size='$size' maxlength='$length' value='".htmlspecialchars($col['default_value'], ENT_QUOTES)."' />";
229
+                    break;
230 230
                 case false :
231
-                    $lines[ $col['name'] ] = htmlspecialchars($col['default_value'], ENT_QUOTES) ;
232
-                    break ;
231
+                    $lines[$col['name']] = htmlspecialchars($col['default_value'], ENT_QUOTES);
232
+                    break;
233 233
             }
234 234
         }
235 235
 
236
-        return array( $id , $lines ) ;
236
+        return array($id, $lines);
237 237
     }
238 238
 
239 239
 
240 240
     public function get_control_form($controllers)
241 241
     {
242
-        $hiddens = '' ;
242
+        $hiddens = '';
243 243
         foreach ($this->action_base_hiddens as $key => $val) {
244
-            $key4disp = htmlspecialchars($key, ENT_QUOTES) ;
245
-            $val4disp = htmlspecialchars($val, ENT_QUOTES) ;
246
-            $hiddens .= "<input type='hidden' name='$key4disp' value='$val4disp' />\n" ;
244
+            $key4disp = htmlspecialchars($key, ENT_QUOTES);
245
+            $val4disp = htmlspecialchars($val, ENT_QUOTES);
246
+            $hiddens .= "<input type='hidden' name='$key4disp' value='$val4disp' />\n";
247 247
         }
248 248
 
249
-        $controllers_html = '' ;
249
+        $controllers_html = '';
250 250
         foreach ($controllers as $type => $body) {
251 251
             if ($type == 'num') {
252
-                $controllers_html .= $this->get_select('num', $body, $GLOBALS['num']) ;
252
+                $controllers_html .= $this->get_select('num', $body, $GLOBALS['num']);
253 253
             }
254 254
         }
255 255
 
@@ -263,13 +263,13 @@  discard block
 block discarded – undo
263 263
 
264 264
     public function get_select($name, $options, $current_value)
265 265
     {
266
-        $ret = "<select name='".htmlspecialchars($name, ENT_QUOTES)."'>\n" ;
266
+        $ret = "<select name='".htmlspecialchars($name, ENT_QUOTES)."'>\n";
267 267
         foreach ($options as $key => $val) {
268
-            $selected = $val == $current_value ? "selected='selected'" : "" ;
269
-            $ret .= "<option value='".htmlspecialchars($key, ENT_QUOTES)."' $selected>".htmlspecialchars($val, ENT_QUOTES)."</option>\n" ;
268
+            $selected = $val == $current_value ? "selected='selected'" : "";
269
+            $ret .= "<option value='".htmlspecialchars($key, ENT_QUOTES)."' $selected>".htmlspecialchars($val, ENT_QUOTES)."</option>\n";
270 270
         }
271
-        $ret .= "</select>\n" ;
271
+        $ret .= "</select>\n";
272 272
 
273
-        return $ret ;
273
+        return $ret;
274 274
     }
275 275
 }
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/class/MyBlocksAdminForX20S.class.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-require_once dirname(__FILE__).'/MyBlocksAdmin.class.php' ;
3
+require_once dirname(__FILE__).'/MyBlocksAdmin.class.php';
4 4
 
5 5
 class MyBlocksAdminForX20S extends MyBlocksAdmin
6 6
 {
7 7
 
8
-    public $block_positions = array() ;
8
+    public $block_positions = array();
9 9
 
10 10
     public function MyBlocksAadminForX20S()
11 11
     {
@@ -14,20 +14,20 @@  discard block
 block discarded – undo
14 14
 
15 15
     public function construct()
16 16
     {
17
-        parent::construct() ;
17
+        parent::construct();
18 18
 
19
-        @include_once XOOPS_ROOT_PATH.'/modules/system/language/'.$this->lang.'/admin/blocksadmin.php' ;
19
+        @include_once XOOPS_ROOT_PATH.'/modules/system/language/'.$this->lang.'/admin/blocksadmin.php';
20 20
         $this->block_positions = array(
21
-        -1 => _NONE ,
22
-        0 => _AM_SBLEFT ,
23
-        1 => _AM_SBRIGHT ,
24
-        3 => _AM_CBLEFT ,
25
-        4 => _AM_CBRIGHT ,
26
-        5 => _AM_CBCENTER ,
27
-        7 => _AM_CBBOTTOMLEFT ,
28
-        8 => _AM_CBBOTTOMRIGHT ,
29
-        9 => _AM_CBBOTTOM ,
30
-    ) ;
21
+        -1 => _NONE,
22
+        0 => _AM_SBLEFT,
23
+        1 => _AM_SBRIGHT,
24
+        3 => _AM_CBLEFT,
25
+        4 => _AM_CBRIGHT,
26
+        5 => _AM_CBCENTER,
27
+        7 => _AM_CBBOTTOMLEFT,
28
+        8 => _AM_CBBOTTOMRIGHT,
29
+        9 => _AM_CBBOTTOM,
30
+    );
31 31
     }
32 32
 
33 33
 //HACK by domifara for php5.3+
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     static $instance;
38 38
     if (!isset($instance)) {
39 39
         $instance = new MyBlocksAdminForX20S();
40
-        $instance->construct() ;
40
+        $instance->construct();
41 41
     }
42 42
     return $instance;
43 43
 }
@@ -71,20 +71,20 @@  discard block
 block discarded – undo
71 71
 // private
72 72
 public function renderRadio4BlockPosition($target_side, $block_data)
73 73
 {
74
-    $bid = intval($block_data['bid']) ;
75
-    $visible = intval($block_data['visible']) ;
76
-    $current_side = $visible ? intval($block_data['side']) : -1 ;
74
+    $bid = intval($block_data['bid']);
75
+    $visible = intval($block_data['visible']);
76
+    $current_side = $visible ? intval($block_data['side']) : -1;
77 77
 
78
-    $label4disp = htmlspecialchars($this->block_positions[ $target_side ], ENT_QUOTES) ;
78
+    $label4disp = htmlspecialchars($this->block_positions[$target_side], ENT_QUOTES);
79 79
 
80 80
     if ($current_side == $target_side) {
81
-        $checked = "checked='checked'" ;
82
-        $divstyle = $target_side == -1 ? "disabled" : "selected" ;
81
+        $checked = "checked='checked'";
82
+        $divstyle = $target_side == -1 ? "disabled" : "selected";
83 83
     } else {
84
-        $checked = "" ;
85
-        $divstyle = "unselected" ;
84
+        $checked = "";
85
+        $divstyle = "unselected";
86 86
     }
87 87
 
88
-    return "<div class='blockposition $divstyle' title='$label4disp'><input type='radio' name='sides[$bid]' value='$target_side' class='blockposition' $checked /></div>" ;
88
+    return "<div class='blockposition $divstyle' title='$label4disp'><input type='radio' name='sides[$bid]' value='$target_side' class='blockposition' $checked /></div>";
89 89
 }
90 90
 }
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/class/D3LanguageManager.class.php 1 patch
Spacing   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -3,102 +3,102 @@  discard block
 block discarded – undo
3 3
 class D3LanguageManager
4 4
 {
5 5
 
6
-    public $default_language = 'english' ;
7
-    public $language = 'english' ;
8
-    public $salt ;
9
-    public $cache_path ;
10
-    public $cache_prefix = 'lang' ;
11
-    public $my_language = false ;
6
+    public $default_language = 'english';
7
+    public $language = 'english';
8
+    public $salt;
9
+    public $cache_path;
10
+    public $cache_prefix = 'lang';
11
+    public $my_language = false;
12 12
 
13 13
 
14 14
 //HACK by domifara
15 15
 //public function D3LanguageManager()
16 16
 public function __construct()
17 17
 {
18
-    $this->language = preg_replace('/[^0-9a-zA-Z_-]/', '', @$GLOBALS['xoopsConfig']['language']) ;
19
-    $this->salt = substr(md5(XOOPS_ROOT_PATH . XOOPS_DB_USER . XOOPS_DB_PREFIX), 0, 6) ;
20
-    $this->cache_path = XOOPS_TRUST_PATH.'/cache' ;
18
+    $this->language = preg_replace('/[^0-9a-zA-Z_-]/', '', @$GLOBALS['xoopsConfig']['language']);
19
+    $this->salt = substr(md5(XOOPS_ROOT_PATH.XOOPS_DB_USER.XOOPS_DB_PREFIX), 0, 6);
20
+    $this->cache_path = XOOPS_TRUST_PATH.'/cache';
21 21
 
22 22
     if (defined('ALTSYS_MYLANGUAGE_ROOT_PATH') && file_exists(ALTSYS_MYLANGUAGE_ROOT_PATH)) {
23
-        $this->my_language = ALTSYS_MYLANGUAGE_ROOT_PATH ;
23
+        $this->my_language = ALTSYS_MYLANGUAGE_ROOT_PATH;
24 24
     }
25 25
 }
26 26
 //HACK by domifara for php5.3+
27 27
 //function &getInstance( $conn = null )
28 28
 public static function &getInstance($conn = null)
29 29
 {
30
-    static $instance ;
31
-    if (! isset($instance)) {
32
-        $instance = new D3LanguageManager() ;
30
+    static $instance;
31
+    if (!isset($instance)) {
32
+        $instance = new D3LanguageManager();
33 33
     }
34
-    return $instance ;
34
+    return $instance;
35 35
 }
36 36
 
37 37
 
38 38
     public function read($resource, $mydirname, $mytrustdirname = null, $read_once = true)
39 39
     {
40
-        $d3file = XOOPS_ROOT_PATH.'/modules/'.$mydirname.'/mytrustdirname.php' ;
40
+        $d3file = XOOPS_ROOT_PATH.'/modules/'.$mydirname.'/mytrustdirname.php';
41 41
 
42 42
         if (empty($mytrustdirname) && file_exists($d3file)) {
43
-            require $d3file ;
43
+            require $d3file;
44 44
         }
45 45
 
46 46
         if (empty($this->language)) {
47
-            $this->language = preg_replace('/[^0-9a-zA-Z_-]/', '', @$GLOBALS['xoopsConfig']['language']) ;
47
+            $this->language = preg_replace('/[^0-9a-zA-Z_-]/', '', @$GLOBALS['xoopsConfig']['language']);
48 48
         }
49 49
 
50
-        $cache_file = $this->getCacheFileName($resource, $mydirname) ;
51
-        $root_file = XOOPS_ROOT_PATH.'/modules/'.$mydirname.'/language/'.$this->language.'/'.$resource ;
50
+        $cache_file = $this->getCacheFileName($resource, $mydirname);
51
+        $root_file = XOOPS_ROOT_PATH.'/modules/'.$mydirname.'/language/'.$this->language.'/'.$resource;
52 52
 
53 53
     // language overriding by XOOPS_ROOT_PATH/my_language
54 54
     if ($this->my_language) {
55
-        $mylang_file = $this->my_language.'/modules/'.$mydirname.'/'.$this->language.'/'.$resource ;
55
+        $mylang_file = $this->my_language.'/modules/'.$mydirname.'/'.$this->language.'/'.$resource;
56 56
         if (file_exists($mylang_file)) {
57
-            require_once $mylang_file ;
57
+            require_once $mylang_file;
58 58
         }
59
-        $original_error_level = error_reporting() ;
60
-        error_reporting($original_error_level & ~ E_NOTICE) ;
59
+        $original_error_level = error_reporting();
60
+        error_reporting($original_error_level & ~ E_NOTICE);
61 61
     }
62 62
 
63 63
         if (empty($mytrustdirname)) {
64 64
             // conventional module
65
-        $default_file = XOOPS_ROOT_PATH.'/modules/'.$mydirname.'/language/'.$this->default_language.'/'.$resource ;
65
+        $default_file = XOOPS_ROOT_PATH.'/modules/'.$mydirname.'/language/'.$this->default_language.'/'.$resource;
66 66
 
67 67
             if (file_exists($cache_file)) {
68
-                require_once $cache_file ;
68
+                require_once $cache_file;
69 69
             } elseif (file_exists($root_file)) {
70
-                require_once $root_file ;
70
+                require_once $root_file;
71 71
             } elseif (file_exists($default_file)) {
72 72
                 // fall back english
73
-            require_once $default_file ;
73
+            require_once $default_file;
74 74
             }
75 75
         } else {
76 76
             // D3 modules
77
-        $trust_file = XOOPS_TRUST_PATH.'/modules/'.$mytrustdirname.'/language/'.$this->language.'/'.$resource ;
78
-            $default_file = XOOPS_TRUST_PATH.'/modules/'.$mytrustdirname.'/language/'.$this->default_language.'/'.$resource ;
77
+        $trust_file = XOOPS_TRUST_PATH.'/modules/'.$mytrustdirname.'/language/'.$this->language.'/'.$resource;
78
+            $default_file = XOOPS_TRUST_PATH.'/modules/'.$mytrustdirname.'/language/'.$this->default_language.'/'.$resource;
79 79
 
80 80
             if (file_exists($cache_file)) {
81
-                require_once $cache_file ;
81
+                require_once $cache_file;
82 82
             } elseif (file_exists($root_file)) {
83
-                require_once $root_file ;
83
+                require_once $root_file;
84 84
             } elseif (file_exists($trust_file)) {
85 85
                 if ($read_once) {
86
-                    require_once $trust_file ;
86
+                    require_once $trust_file;
87 87
                 } else {
88
-                    require $trust_file ;
88
+                    require $trust_file;
89 89
                 }
90 90
             } elseif (file_exists($default_file)) {
91 91
                 // fall back english
92 92
             if ($read_once) {
93
-                require_once $default_file ;
93
+                require_once $default_file;
94 94
             } else {
95
-                require $default_file ;
95
+                require $default_file;
96 96
             }
97 97
             }
98 98
         }
99 99
 
100 100
         if ($this->my_language) {
101
-            error_reporting($original_error_level) ;
101
+            error_reporting($original_error_level);
102 102
         }
103 103
     }
104 104
 
@@ -106,8 +106,8 @@  discard block
 block discarded – undo
106 106
     public function getCacheFileName($resource, $mydirname, $language = null)
107 107
     {
108 108
         if (empty($language)) {
109
-            $language = $this->language ;
109
+            $language = $this->language;
110 110
         }
111
-        return $this->cache_path . '/' . $this->cache_prefix . '_' . $this->salt . '_' . $mydirname . '_' . $language . '_' . $resource ;
111
+        return $this->cache_path.'/'.$this->cache_prefix.'_'.$this->salt.'_'.$mydirname.'_'.$language.'_'.$resource;
112 112
     }
113 113
 }
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/class/MyBlocksAdminForXCL21.class.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 // $Id: MyBlocksAdminForXCL21.class.php ,ver 0.0.7.1 2011/01/27 16:10:00 domifara Exp $
3 3
 
4
-require_once dirname(__FILE__).'/MyBlocksAdmin.class.php' ;
4
+require_once dirname(__FILE__).'/MyBlocksAdmin.class.php';
5 5
 
6 6
 class MyBlocksAdminForXCL21 extends MyBlocksAdmin
7 7
 {
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
     static $instance;
19 19
     if (!isset($instance)) {
20 20
         $instance = new MyBlocksAdminForXCL21();
21
-        $instance->construct() ;
21
+        $instance->construct();
22 22
     }
23 23
     return $instance;
24 24
 }
@@ -29,24 +29,24 @@  discard block
 block discarded – undo
29 29
 public function renderCell4BlockOptions($block_data)
30 30
 {
31 31
     if ($this->target_dirname && substr($this->target_dirname, 0, 1) != '_') {
32
-        $langman =& D3LanguageManager::getInstance() ;
33
-        $langman->read('admin.php', $this->target_dirname) ;
32
+        $langman = & D3LanguageManager::getInstance();
33
+        $langman->read('admin.php', $this->target_dirname);
34 34
     }
35 35
 
36
-    $bid = intval($block_data['bid']) ;
36
+    $bid = intval($block_data['bid']);
37 37
 
38 38
 //HACK by domifara
39 39
 //	$block = new XoopsBlock( $bid ) ;
40
-    $handler =& xoops_gethandler('block');
41
-    $block =& $handler->create(false) ;
42
-    $block->load($bid) ;
40
+    $handler = & xoops_gethandler('block');
41
+    $block = & $handler->create(false);
42
+    $block->load($bid);
43 43
 
44
-    $legacy_block =& Legacy_Utils::createBlockProcedure($block) ;
45
-    return $legacy_block->getOptionForm() ;
44
+    $legacy_block = & Legacy_Utils::createBlockProcedure($block);
45
+    return $legacy_block->getOptionForm();
46 46
 }
47 47
 
48 48
     public function checkFck()
49 49
     {
50
-        return (! altsysUtils::isInstalledXclHtmleditor() && file_exists(XOOPS_ROOT_PATH.'/common/fckeditor/fckeditor.js'));
50
+        return (!altsysUtils::isInstalledXclHtmleditor() && file_exists(XOOPS_ROOT_PATH.'/common/fckeditor/fckeditor.js'));
51 51
     }
52 52
 }
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/class/D3Tpl.class.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-require_once XOOPS_ROOT_PATH.'/class/template.php' ;
4
-require_once XOOPS_TRUST_PATH.'/libs/altsys/include/altsys_functions.php' ;
3
+require_once XOOPS_ROOT_PATH.'/class/template.php';
4
+require_once XOOPS_TRUST_PATH.'/libs/altsys/include/altsys_functions.php';
5 5
 
6 6
 class D3Tpl extends XoopsTpl
7 7
 {
@@ -10,13 +10,13 @@  discard block
 block discarded – undo
10 10
 //	public function D3Tpl()
11 11
     public function __construct()
12 12
     {
13
-        parent::__construct() ;
14
-        if (in_array(altsys_get_core_type(), array( ALTSYS_CORE_TYPE_X20S, ALTSYS_CORE_TYPE_X23P ))) {
15
-            array_unshift($this->plugins_dir, XOOPS_TRUST_PATH.'/libs/altsys/smarty_plugins') ;
13
+        parent::__construct();
14
+        if (in_array(altsys_get_core_type(), array(ALTSYS_CORE_TYPE_X20S, ALTSYS_CORE_TYPE_X23P))) {
15
+            array_unshift($this->plugins_dir, XOOPS_TRUST_PATH.'/libs/altsys/smarty_plugins');
16 16
         }
17 17
 
18 18
         // for RTL users
19
-        @define('_GLOBAL_LEFT', @_ADM_USE_RTL == 1 ? 'right' : 'left') ;
20
-        @define('_GLOBAL_RIGHT', @_ADM_USE_RTL == 1 ? 'left' : 'right') ;
19
+        @define('_GLOBAL_LEFT', @_ADM_USE_RTL == 1 ? 'right' : 'left');
20
+        @define('_GLOBAL_RIGHT', @_ADM_USE_RTL == 1 ? 'left' : 'right');
21 21
     }
22 22
 }
Please login to merge, or discard this patch.