Completed
Push — master ( 99eb82...6dab8b )
by Michael
19s
created
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.
xoops_trust_path/libs/altsys/include/admin_in_theme_functions.php 1 patch
Spacing   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -2,94 +2,94 @@  discard block
 block discarded – undo
2 2
 
3 3
 function altsys_admin_in_theme($s)
4 4
 {
5
-    global $xoops_admin_contents ;
5
+    global $xoops_admin_contents;
6 6
 
7
-    $xoops_admin_contents = '' ;
7
+    $xoops_admin_contents = '';
8 8
 
9 9
     if (defined('ALTSYS_DONT_USE_ADMIN_IN_THEME')) {
10
-        return $s ;
10
+        return $s;
11 11
     }
12 12
 
13 13
     // check whether cp_functions.php is loaded
14
-    if (! defined('XOOPS_CPFUNC_LOADED')) {
15
-        define('ALTSYS_DONT_USE_ADMIN_IN_THEME', 1) ;
16
-        return $s ;
14
+    if (!defined('XOOPS_CPFUNC_LOADED')) {
15
+        define('ALTSYS_DONT_USE_ADMIN_IN_THEME', 1);
16
+        return $s;
17 17
     }
18 18
 
19 19
     // redirect
20 20
     if (strstr($s, '<meta http-equiv="Refresh" ')) {
21
-        define('ALTSYS_DONT_USE_ADMIN_IN_THEME', 1) ;
22
-        return $s ;
21
+        define('ALTSYS_DONT_USE_ADMIN_IN_THEME', 1);
22
+        return $s;
23 23
     }
24 24
 
25 25
     // outputs before cp_header()
26
-    @list($former_outputs, $tmp_s) = explode('<!DOCTYPE', $s, 2) ;
26
+    @list($former_outputs, $tmp_s) = explode('<!DOCTYPE', $s, 2);
27 27
     if (empty($tmp_s)) {
28
-        $tmp_s = $s ;
28
+        $tmp_s = $s;
29 29
     }
30 30
 
31
-    @list(, $tmp_s) = explode("<div class='content'>", $tmp_s, 2) ;
31
+    @list(, $tmp_s) = explode("<div class='content'>", $tmp_s, 2);
32 32
     if (empty($tmp_s)) {
33
-        define('ALTSYS_DONT_USE_ADMIN_IN_THEME', 1) ;
34
-        return $s ;
33
+        define('ALTSYS_DONT_USE_ADMIN_IN_THEME', 1);
34
+        return $s;
35 35
     }
36 36
 
37
-    list($tmp_s, $tmp_after) = explode("<td width='1%' background='".XOOPS_URL."/modules/system/images/bg_content.gif'>", $tmp_s) ;
37
+    list($tmp_s, $tmp_after) = explode("<td width='1%' background='".XOOPS_URL."/modules/system/images/bg_content.gif'>", $tmp_s);
38 38
     if (empty($tmp_after)) {
39
-        define('ALTSYS_DONT_USE_ADMIN_IN_THEME', 1) ;
40
-        return $s ;
39
+        define('ALTSYS_DONT_USE_ADMIN_IN_THEME', 1);
40
+        return $s;
41 41
     }
42 42
 
43
-    $xoops_admin_contents = $former_outputs . substr(strrev(strstr(strrev($tmp_s), strrev('</div>'))), 0, -6) ;
43
+    $xoops_admin_contents = $former_outputs.substr(strrev(strstr(strrev($tmp_s), strrev('</div>'))), 0, -6);
44 44
 
45
-    return '' ;
45
+    return '';
46 46
 }
47 47
 
48 48
 
49 49
 function altsys_admin_in_theme_in_last($contents = null)
50 50
 {
51
-    global $xoops_admin_contents , $xoopsConfig , $xoopsModule , $xoopsUser , $xoopsUserIsAdmin , $xoopsLogger , $altsysModuleConfig , $altsysModuleId ;
51
+    global $xoops_admin_contents, $xoopsConfig, $xoopsModule, $xoopsUser, $xoopsUserIsAdmin, $xoopsLogger, $altsysModuleConfig, $altsysModuleId;
52 52
 
53
-    if (! isset($contents)) {
53
+    if (!isset($contents)) {
54 54
         while (ob_get_level()) {
55
-            ob_end_flush() ;
55
+            ob_end_flush();
56 56
         }
57 57
     } else {
58
-        $xoops_admin_contents = $contents ;
58
+        $xoops_admin_contents = $contents;
59 59
     }
60 60
 
61
-    if (! isset($xoops_admin_contents)) {
62
-        return ;
61
+    if (!isset($xoops_admin_contents)) {
62
+        return;
63 63
     }
64 64
     if (defined('ALTSYS_DONT_USE_ADMIN_IN_THEME')) {
65
-        return ;
65
+        return;
66 66
     }
67 67
 
68
-    if (! is_object($xoopsUser)) {
69
-        exit ;
68
+    if (!is_object($xoopsUser)) {
69
+        exit;
70 70
     }
71 71
 
72 72
     // language files
73 73
     if (file_exists(dirname(__DIR__).'/language/'.$xoopsConfig['language'].'/admin_in_theme.php')) {
74
-        include_once dirname(__DIR__).'/language/'.$xoopsConfig['language'].'/admin_in_theme.php' ;
74
+        include_once dirname(__DIR__).'/language/'.$xoopsConfig['language'].'/admin_in_theme.php';
75 75
     } else {
76
-        include_once dirname(__DIR__).'/language/english/admin_in_theme.php' ;
76
+        include_once dirname(__DIR__).'/language/english/admin_in_theme.php';
77 77
     }
78 78
 
79 79
     // set the theme
80
-    $xoopsConfig['theme_set'] = $altsysModuleConfig['admin_in_theme'] ;
80
+    $xoopsConfig['theme_set'] = $altsysModuleConfig['admin_in_theme'];
81 81
 
82 82
     // language files under the theme
83
-    $original_error_level = error_reporting() ;
84
-    error_reporting($original_error_level & ~ E_NOTICE) ;
83
+    $original_error_level = error_reporting();
84
+    error_reporting($original_error_level & ~ E_NOTICE);
85 85
     if (file_exists(XOOPS_THEME_PATH.'/'.$xoopsConfig['theme_set'].'/language/'.$xoopsConfig['language'].'.php')) {
86
-        include_once XOOPS_THEME_PATH.'/'.$xoopsConfig['theme_set'].'/language/'.$xoopsConfig['language'].'.php' ;
86
+        include_once XOOPS_THEME_PATH.'/'.$xoopsConfig['theme_set'].'/language/'.$xoopsConfig['language'].'.php';
87 87
     } elseif (file_exists(XOOPS_THEME_PATH.'/'.$xoopsConfig['theme_set'].'/language/english.php')) {
88
-        include_once XOOPS_THEME_PATH.'/'.$xoopsConfig['theme_set'].'/language/english.php' ;
88
+        include_once XOOPS_THEME_PATH.'/'.$xoopsConfig['theme_set'].'/language/english.php';
89 89
     }
90
-    error_reporting($original_error_level) ;
90
+    error_reporting($original_error_level);
91 91
 
92
-    include __DIR__.'/admin_in_theme_header.inc.php' ;
92
+    include __DIR__.'/admin_in_theme_header.inc.php';
93 93
 
94 94
 /*	// include adminmenu
95 95
     include XOOPS_CACHE_PATH.'/adminmenu.php' ;
@@ -125,11 +125,11 @@  discard block
 block discarded – undo
125 125
         function shutdown() {'.implode("\n",$xoops_admin_menu_sd).'}' ; */
126 126
 
127 127
     // appendix (core specific css etc)
128
-    $xoops_module_header = '' ;
128
+    $xoops_module_header = '';
129 129
     if (altsys_get_core_type() == ALTSYS_CORE_TYPE_XCL21) {
130
-        $xoops_module_header .= '<link rel="stylesheet" type="text/css" media="all" href="'.XOOPS_URL.'/modules/legacyRender/admin/css.php?file=style.css" />'."\n" ;
130
+        $xoops_module_header .= '<link rel="stylesheet" type="text/css" media="all" href="'.XOOPS_URL.'/modules/legacyRender/admin/css.php?file=style.css" />'."\n";
131 131
         if (is_object(@$xoopsModule)) {
132
-            $xoops_module_header .= '<link rel="stylesheet" type="text/css" media="all" href="'.XOOPS_URL.'/modules/legacyRender/admin/css.php?file=module.css&amp;dirname='.$xoopsModule->getVar('dirname').'" />'."\n" ;
132
+            $xoops_module_header .= '<link rel="stylesheet" type="text/css" media="all" href="'.XOOPS_URL.'/modules/legacyRender/admin/css.php?file=module.css&amp;dirname='.$xoopsModule->getVar('dirname').'" />'."\n";
133 133
         }
134 134
     }
135 135
 
@@ -148,14 +148,14 @@  discard block
 block discarded – undo
148 148
         'xoops_slogan' => htmlspecialchars($xoopsConfig['slogan'], ENT_QUOTES),
149 149
         'xoops_contents' => $xoops_admin_contents, //. '<div id="adminmenu_layers">' . $xoops_admin_menu_dv . '</div>' ,
150 150
         'xoops_module_header' => $xoops_module_header
151
-    )) ;
151
+    ));
152 152
 
153 153
     // rendering
154
-    $xoopsTpl->display($xoopsConfig['theme_set'].'/theme.html') ;
154
+    $xoopsTpl->display($xoopsConfig['theme_set'].'/theme.html');
155 155
 
156 156
     // for XOOPS 2.0.14/15/16 from xoops.org
157
-    if (is_object(@$xoopsLogger) && method_exists($xoopsLogger, 'render') && in_array($xoopsConfig['debug_mode'], array( 1, 2 ))) {
158
-        $xoopsLogger->activated = true ;
159
-        echo $xoopsLogger->render('') ;
157
+    if (is_object(@$xoopsLogger) && method_exists($xoopsLogger, 'render') && in_array($xoopsConfig['debug_mode'], array(1, 2))) {
158
+        $xoopsLogger->activated = true;
159
+        echo $xoopsLogger->render('');
160 160
     }
161 161
 }
Please login to merge, or discard this patch.