Completed
Push — master ( 4d9699...f6489b )
by Michael
03:33
created
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/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/MyBlocksAdminForX20S.class.php 1 patch
Spacing   +27 added lines, -27 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 __DIR__.'/MyBlocksAdmin.class.php' ;
3
+require_once __DIR__.'/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 ,
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 29
         9 => _AM_CBBOTTOM
30
-    ) ;
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
 }
@@ -50,19 +50,19 @@  discard block
 block discarded – undo
50 50
     return "
51 51
 	<table style='width:80px;'>
52 52
 		<tr>
53
-            <td rowspan='2'>".$this->renderRadio4BlockPosition(0, $block_data) . '</td>
54
-            <td>' . $this->renderRadio4BlockPosition(3, $block_data) . '</td>
55
-            <td>' . $this->renderRadio4BlockPosition(5, $block_data) . '</td>
56
-            <td>' . $this->renderRadio4BlockPosition(4, $block_data) . "</td>
57
-            <td rowspan='2'>".$this->renderRadio4BlockPosition(1, $block_data) . '</td>
53
+            <td rowspan='2'>".$this->renderRadio4BlockPosition(0, $block_data).'</td>
54
+            <td>' . $this->renderRadio4BlockPosition(3, $block_data).'</td>
55
+            <td>' . $this->renderRadio4BlockPosition(5, $block_data).'</td>
56
+            <td>' . $this->renderRadio4BlockPosition(4, $block_data)."</td>
57
+            <td rowspan='2'>".$this->renderRadio4BlockPosition(1, $block_data).'</td>
58 58
 		</tr>
59 59
 		<tr>
60
-            <td>' . $this->renderRadio4BlockPosition(7, $block_data) . '</td>
61
-            <td>' . $this->renderRadio4BlockPosition(9, $block_data) . '</td>
62
-            <td>' . $this->renderRadio4BlockPosition(8, $block_data) . "</td>
60
+            <td>' . $this->renderRadio4BlockPosition(7, $block_data).'</td>
61
+            <td>' . $this->renderRadio4BlockPosition(9, $block_data).'</td>
62
+            <td>' . $this->renderRadio4BlockPosition(8, $block_data)."</td>
63 63
 		</tr>
64 64
 		<tr>
65
-            <td colspan='5'>".$this->renderRadio4BlockPosition(-1, $block_data)._NONE . '</td>
65
+            <td colspan='5'>".$this->renderRadio4BlockPosition(-1, $block_data)._NONE.'</td>
66 66
 		</tr>
67 67
     </table>';
68 68
 }
@@ -73,18 +73,18 @@  discard block
 block discarded – undo
73 73
 {
74 74
     $bid = (int)$block_data['bid'];
75 75
     $visible = (int)$block_data['visible'];
76
-    $current_side = $visible ? (int)$block_data['side'] : -1 ;
76
+    $current_side = $visible ? (int)$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'" ;
81
+        $checked = "checked='checked'";
82 82
         $divstyle = $target_side == -1 ? 'disabled' : 'selected';
83 83
     } else {
84 84
         $checked = '';
85 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/altsysUtils.class.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
     {
6 6
         $names = array();
7 7
         
8
-        if (! class_exists('XCube_Delegate')) {
8
+        if (!class_exists('XCube_Delegate')) {
9 9
             return $names;
10 10
         }
11 11
         
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
                 foreach (array_keys($callbacks) as $priority) {
24 24
                     foreach (array_keys($callbacks[$priority]) as $idx) {
25 25
                         $callback = $callbacks[$priority][$idx][0];
26
-                        $_name = (is_array($callback))? ((is_object($callback[0]))? get_class($callback[0]) : $callback[0]) : $callback;
26
+                        $_name = (is_array($callback)) ? ((is_object($callback[0])) ? get_class($callback[0]) : $callback[0]) : $callback;
27 27
                         $names[$priority] = $_name;
28 28
                     }
29 29
                 }
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
             return htmlspecialchars($str, $flags, $encoding, $double_encode);
61 61
         } else {
62 62
             $ret = htmlspecialchars($str, $flags, $encoding);
63
-            if (! $double_encode) {
63
+            if (!$double_encode) {
64 64
                 $ret = str_replace('&amp;amp;', '&amp;', $ret);
65 65
             }
66 66
             return $ret;
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.
xoops_trust_path/libs/altsys/mymenu.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -2,30 +2,30 @@  discard block
 block discarded – undo
2 2
 
3 3
 /********* mymenu only for ALTSYS ********/
4 4
 
5
-if (! defined('XOOPS_ROOT_PATH')) {
6
-    exit ;
5
+if (!defined('XOOPS_ROOT_PATH')) {
6
+    exit;
7 7
 }
8 8
 
9 9
 // Skip for ORETEKI XOOPS
10 10
 if (defined('XOOPS_ORETEKI')) {
11
-    return ;
11
+    return;
12 12
 }
13 13
 
14
-if (! isset($module) || ! is_object($module)) {
15
-    $module = $xoopsModule ;
16
-} elseif (! is_object($xoopsModule)) {
17
-    die('$xoopsModule is not set')  ;
14
+if (!isset($module) || !is_object($module)) {
15
+    $module = $xoopsModule;
16
+} elseif (!is_object($xoopsModule)) {
17
+    die('$xoopsModule is not set');
18 18
 }
19 19
 
20 20
 // language files (modinfo.php)
21
-altsys_include_language_file('modinfo') ;
21
+altsys_include_language_file('modinfo');
22 22
 
23
-include __DIR__.'/admin_menu.php' ;
23
+include __DIR__.'/admin_menu.php';
24 24
 
25
-$adminmenu = array_merge($adminmenu, $adminmenu4altsys) ;
25
+$adminmenu = array_merge($adminmenu, $adminmenu4altsys);
26 26
 
27
-$mymenu_uri = empty($mymenu_fake_uri) ? $_SERVER['REQUEST_URI'] : $mymenu_fake_uri ;
28
-$mymenu_link = substr(strstr($mymenu_uri, '/admin/'), 1) ;
27
+$mymenu_uri = empty($mymenu_fake_uri) ? $_SERVER['REQUEST_URI'] : $mymenu_fake_uri;
28
+$mymenu_link = substr(strstr($mymenu_uri, '/admin/'), 1);
29 29
 
30 30
 // xoops_breadcrumbs
31 31
 // $GLOBALS['altsysXoopsBreadcrumbs'] = array( array( 'url' => XOOPS_URL.'/modules/altsys/admin/index.php' , 'name' => $xoopsModule->getVar('name') ) ) ;
@@ -33,19 +33,19 @@  discard block
 block discarded – undo
33 33
 // highlight
34 34
 foreach (array_keys($adminmenu) as $i) {
35 35
     if ($mymenu_link == $adminmenu[$i]['link']) {
36
-        $adminmenu[$i]['selected'] = true ;
37
-        $adminmenu_hilighted = true ;
36
+        $adminmenu[$i]['selected'] = true;
37
+        $adminmenu_hilighted = true;
38 38
 //		$GLOBALS['altsysXoopsBreadcrumbs'][] = array( 'url' => XOOPS_URL."/modules/altsys/".htmlspecialchars($adminmenu[$i]['link'],ENT_QUOTES) , 'name' => htmlspecialchars( $adminmenu[$i]['title'] , ENT_QUOTES ) ) ;
39 39
     } else {
40
-        $adminmenu[$i]['selected'] = false ;
40
+        $adminmenu[$i]['selected'] = false;
41 41
     }
42 42
 }
43 43
 if (empty($adminmenu_hilighted)) {
44 44
     foreach (array_keys($adminmenu) as $i) {
45 45
         if (stristr($mymenu_uri, $adminmenu[$i]['link'])) {
46
-            $adminmenu[$i]['selected'] = true ;
46
+            $adminmenu[$i]['selected'] = true;
47 47
 //			$GLOBALS['altsysXoopsBreadcrumbs'][] = array( 'url' => XOOPS_URL."/modules/altsys/".htmlspecialchars($adminmenu[$i]['link'],ENT_QUOTES) , 'name' => htmlspecialchars( $adminmenu[$i]['title'] , ENT_QUOTES ) ) ;
48
-            break ;
48
+            break;
49 49
         }
50 50
     }
51 51
 }
@@ -53,20 +53,20 @@  discard block
 block discarded – undo
53 53
 // link conversion from relative to absolute
54 54
 foreach (array_keys($adminmenu) as $i) {
55 55
     if (stristr($adminmenu[$i]['link'], XOOPS_URL) === false) {
56
-        $adminmenu[$i]['link'] = XOOPS_URL."/modules/$mydirname/" . $adminmenu[$i]['link'] ;
56
+        $adminmenu[$i]['link'] = XOOPS_URL."/modules/$mydirname/".$adminmenu[$i]['link'];
57 57
     }
58 58
 }
59 59
 
60 60
 // display
61
-require_once XOOPS_TRUST_PATH.'/libs/altsys/class/D3Tpl.class.php' ;
62
-$tpl = new D3Tpl() ;
61
+require_once XOOPS_TRUST_PATH.'/libs/altsys/class/D3Tpl.class.php';
62
+$tpl = new D3Tpl();
63 63
 $tpl->assign(array(
64 64
     'adminmenu' => $adminmenu
65
-)) ;
66
-$tpl->display('db:altsys_inc_mymenu.html') ;
65
+));
66
+$tpl->display('db:altsys_inc_mymenu.html');
67 67
 
68 68
 // submenu
69
-$page = preg_replace('/[^0-9a-zA-Z_-]/', '', @$_GET['page']) ;
69
+$page = preg_replace('/[^0-9a-zA-Z_-]/', '', @$_GET['page']);
70 70
 if (file_exists(__DIR__.'/mymenusub/'.$page.'.php')) {
71
-    include __DIR__.'/mymenusub/'.$page.'.php' ;
71
+    include __DIR__.'/mymenusub/'.$page.'.php';
72 72
 }
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/include/x20_keepblockoptions.inc.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -3,9 +3,9 @@  discard block
 block discarded – undo
3 3
 
4 4
 // Keep Block option values when update (by nobunobu) for XOOPS 2.0.x
5 5
 global $xoopsDB;
6
-$query = 'SELECT mid FROM ' . $xoopsDB->prefix('modules') . " WHERE dirname='" . $modversion['dirname'] . "' ";
6
+$query = 'SELECT mid FROM '.$xoopsDB->prefix('modules')." WHERE dirname='".$modversion['dirname']."' ";
7 7
 $result = $xoopsDB->query($query);
8
-$record= $xoopsDB->fetcharray($result);
8
+$record = $xoopsDB->fetcharray($result);
9 9
 if ($record) {
10 10
     $mid = $record['mid'];
11 11
     $count = count($modversion['blocks']);
@@ -53,40 +53,40 @@  discard block
 block discarded – undo
53 53
         }
54 54
     } */
55 55
     
56
-    $sql = 'SELECT * FROM ' . $xoopsDB->prefix('newblocks') . ' WHERE mid=' . $mid . " AND block_type <>'D' AND func_num > $count";
56
+    $sql = 'SELECT * FROM '.$xoopsDB->prefix('newblocks').' WHERE mid='.$mid." AND block_type <>'D' AND func_num > $count";
57 57
     $fresult = $xoopsDB->query($sql);
58 58
     while ($fblock = $xoopsDB->fetchArray($fresult)) {
59
-        $local_msgs[] = 'Non Defined Block <b>' . $fblock['name'] . '</b> will be deleted';
60
-        $sql = 'DELETE FROM ' . $xoopsDB->prefix('newblocks') . " WHERE bid='" . $fblock['bid'] . "'";
59
+        $local_msgs[] = 'Non Defined Block <b>'.$fblock['name'].'</b> will be deleted';
60
+        $sql = 'DELETE FROM '.$xoopsDB->prefix('newblocks')." WHERE bid='".$fblock['bid']."'";
61 61
         $iret = $xoopsDB->query($sql);
62 62
     }
63 63
     
64
-    for ($i = 1 ; $i <= $count ; $i++) {
65
-        $sql = 'SELECT name,options FROM ' . $xoopsDB->prefix('newblocks') . ' WHERE mid=' . $mid . ' AND func_num=' . $i . " AND show_func='" . addslashes($modversion['blocks'][$i]['show_func']) . "' AND func_file='" . addslashes($modversion['blocks'][$i]['file']) . "'";
64
+    for ($i = 1; $i <= $count; $i++) {
65
+        $sql = 'SELECT name,options FROM '.$xoopsDB->prefix('newblocks').' WHERE mid='.$mid.' AND func_num='.$i." AND show_func='".addslashes($modversion['blocks'][$i]['show_func'])."' AND func_file='".addslashes($modversion['blocks'][$i]['file'])."'";
66 66
         $fresult = $xoopsDB->query($sql);
67 67
         $fblock = $xoopsDB->fetchArray($fresult);
68 68
         if (isset($fblock['options'])) {
69
-            $old_vals=explode('|', $fblock['options']);
70
-            $def_vals=explode('|', $modversion['blocks'][$i]['options']);
69
+            $old_vals = explode('|', $fblock['options']);
70
+            $def_vals = explode('|', $modversion['blocks'][$i]['options']);
71 71
             if (count($old_vals) == count($def_vals)) {
72 72
                 $modversion['blocks'][$i]['options'] = $fblock['options'];
73
-                $local_msgs[] = "Option's values of the block <b>".$fblock['name'] . '</b> will be kept. (value = <b>' . $fblock['options'] . '</b>)';
73
+                $local_msgs[] = "Option's values of the block <b>".$fblock['name'].'</b> will be kept. (value = <b>'.$fblock['options'].'</b>)';
74 74
             } elseif (count($old_vals) < count($def_vals)) {
75
-                for ($j=0; $j < count($old_vals); $j++) {
75
+                for ($j = 0; $j < count($old_vals); $j++) {
76 76
                     $def_vals[$j] = $old_vals[$j];
77 77
                 }
78 78
                 $modversion['blocks'][$i]['options'] = implode('|', $def_vals);
79
-                $local_msgs[] = "Option's values of the block <b>".$fblock['name'] . '</b> will be kept and new option(s) are added. (value = <b>' . $modversion['blocks'][$i]['options'] . '</b>)';
79
+                $local_msgs[] = "Option's values of the block <b>".$fblock['name'].'</b> will be kept and new option(s) are added. (value = <b>'.$modversion['blocks'][$i]['options'].'</b>)';
80 80
             } else {
81
-                $local_msgs[] = "Option's values of the block <b>".$fblock['name'] . '</b> will be reset to the default, because of some decrease of options. (value = <b>'
82
-                                . $modversion['blocks'][$i]['options'] . '</b>)';
81
+                $local_msgs[] = "Option's values of the block <b>".$fblock['name'].'</b> will be reset to the default, because of some decrease of options. (value = <b>'
82
+                                . $modversion['blocks'][$i]['options'].'</b>)';
83 83
             }
84 84
         }
85 85
     }
86 86
 }
87 87
 
88
-global $msgs , $myblocksadmin_parsed_updateblock ;
89
-if (! empty($msgs) && ! empty($local_msgs) && empty($myblocksadmin_parsed_updateblock)) {
90
-    $msgs = array_merge($msgs, $local_msgs) ;
91
-    $myblocksadmin_parsed_updateblock = true ;
88
+global $msgs, $myblocksadmin_parsed_updateblock;
89
+if (!empty($msgs) && !empty($local_msgs) && empty($myblocksadmin_parsed_updateblock)) {
90
+    $msgs = array_merge($msgs, $local_msgs);
91
+    $myblocksadmin_parsed_updateblock = true;
92 92
 }
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/include/admin_in_theme.inc.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -2,29 +2,29 @@
 block discarded – undo
2 2
 
3 3
 // render admin in theme.html
4 4
 if (is_object($xoopsUser)) {
5
-    $xoops_subpath = substr($_SERVER['REQUEST_URI'], strpos(strrev(XOOPS_URL), strrev($_SERVER['HTTP_HOST']))) ;
5
+    $xoops_subpath = substr($_SERVER['REQUEST_URI'], strpos(strrev(XOOPS_URL), strrev($_SERVER['HTTP_HOST'])));
6 6
     if (preg_match('#(^/admin.php|^/modules/system/|^/modules/[a-zA-Z0-9_.-]+/admin/)#', $xoops_subpath)) {
7 7
         // The request looks like admin
8
-        require_once __DIR__.'/altsys_functions.php' ;
9
-        if (! empty($GLOBALS['altsysModuleConfig']['admin_in_theme']) && file_exists(XOOPS_THEME_PATH.'/'.$GLOBALS['altsysModuleConfig']['admin_in_theme'].'/theme.html')) {
8
+        require_once __DIR__.'/altsys_functions.php';
9
+        if (!empty($GLOBALS['altsysModuleConfig']['admin_in_theme']) && file_exists(XOOPS_THEME_PATH.'/'.$GLOBALS['altsysModuleConfig']['admin_in_theme'].'/theme.html')) {
10 10
             // configs OK
11
-            require_once __DIR__.'/admin_in_theme_functions.php' ;
11
+            require_once __DIR__.'/admin_in_theme_functions.php';
12 12
 
13 13
             // for security with register_globals=1
14
-            unset($GLOBALS['altsysAdminPageTitle'], /* $GLOBALS['altsysXoopsBreadcrumbs'] ,*/ $GLOBALS['xoops_admin_contents']) ;
14
+            unset($GLOBALS['altsysAdminPageTitle'], /* $GLOBALS['altsysXoopsBreadcrumbs'] ,*/ $GLOBALS['xoops_admin_contents']);
15 15
 
16 16
             // disable error handler without XOOPS 2.0.14/15/16
17
-            if (! (is_object(@$xoopsLogger) && method_exists($xoopsLogger, 'render') && in_array($xoopsConfig['debug_mode'], array( 1, 2 )))) {
18
-                restore_error_handler() ;
17
+            if (!(is_object(@$xoopsLogger) && method_exists($xoopsLogger, 'render') && in_array($xoopsConfig['debug_mode'], array(1, 2)))) {
18
+                restore_error_handler();
19 19
             }
20 20
 
21 21
             // to prepend Notice with 2.0.14/15/16 with PHP4
22
-            if (! defined('E_STRICT')) {
23
-                define('E_STRICT', 2048) ;
22
+            if (!defined('E_STRICT')) {
23
+                define('E_STRICT', 2048);
24 24
             }
25 25
 
26
-            register_shutdown_function('altsys_admin_in_theme_in_last') ;
27
-            ob_start('altsys_admin_in_theme') ;
26
+            register_shutdown_function('altsys_admin_in_theme_in_last');
27
+            ob_start('altsys_admin_in_theme');
28 28
         }
29 29
     }
30 30
 }
Please login to merge, or discard this patch.