Completed
Push — master ( 0881bb...3a6ebc )
by Michael
04:47
created
xoops_trust_path/libs/altsys/mymenusub/myblocksadmin.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -1,61 +1,61 @@
 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
-$core_type = altsys_get_core_type() ;
8
-$db =& XoopsDatabaseFactory::getDatabaseConnection() ;
7
+$core_type = altsys_get_core_type();
8
+$db = & XoopsDatabaseFactory::getDatabaseConnection();
9 9
 
10
-$current_dirname = preg_replace('/[^0-9a-zA-Z_-]/', '', @$_GET['dirname']) ;
10
+$current_dirname = preg_replace('/[^0-9a-zA-Z_-]/', '', @$_GET['dirname']);
11 11
 if ($current_dirname == '__CustomBlocks__') {
12
-    return ;
12
+    return;
13 13
 }
14 14
 
15
-    $module_handler4menu =& xoops_gethandler('module');
15
+    $module_handler4menu = & xoops_gethandler('module');
16 16
     $criteria4menu = new CriteriaCompo(new Criteria('isactive', 1));
17 17
     //$criteria4menu->add(new Criteria('hasmain', 1));
18 18
     $criteria4menu->add(new Criteria('mid', '1', '>'));
19
-    $modules4menu =& $module_handler4menu->getObjects($criteria4menu, true);
20
-    $system_module =& $module_handler4menu->get(1) ;
19
+    $modules4menu = & $module_handler4menu->getObjects($criteria4menu, true);
20
+    $system_module = & $module_handler4menu->get(1);
21 21
     if (is_object($system_module)) {
22
-        array_unshift($modules4menu, $system_module) ;
22
+        array_unshift($modules4menu, $system_module);
23 23
     }
24 24
 
25
-$adminmenu = array() ;
25
+$adminmenu = array();
26 26
 foreach ($modules4menu as $m4menu) {
27 27
     // get block info
28 28
     if ($core_type != ALTSYS_CORE_TYPE_X22) {
29
-        list($block_count_all) = $db->fetchRow($db->query('SELECT COUNT(*) FROM ' . $db->prefix('newblocks') . ' WHERE mid=' . $m4menu->getVar('mid'))) ;
30
-        list($block_count_visible) = $db->fetchRow($db->query('SELECT COUNT(*) FROM ' . $db->prefix('newblocks') . ' WHERE mid=' . $m4menu->getVar('mid') . ' AND visible>0')) ;
29
+        list($block_count_all) = $db->fetchRow($db->query('SELECT COUNT(*) FROM '.$db->prefix('newblocks').' WHERE mid='.$m4menu->getVar('mid')));
30
+        list($block_count_visible) = $db->fetchRow($db->query('SELECT COUNT(*) FROM '.$db->prefix('newblocks').' WHERE mid='.$m4menu->getVar('mid').' AND visible>0'));
31 31
         // $block_desc = " $block_count_all($block_count_visible)" ;
32
-        $block_desc = " ($block_count_visible/$block_count_all)" ;
32
+        $block_desc = " ($block_count_visible/$block_count_all)";
33 33
     } else {
34
-        $block_desc = '' ;
34
+        $block_desc = '';
35 35
     }
36 36
 
37 37
     if ($m4menu->getVar('dirname') == $current_dirname) {
38 38
         $adminmenu[] = array(
39
-            'selected' => true ,
40
-            'title' => $m4menu->getVar('name', 'n') . $block_desc ,
39
+            'selected' => true,
40
+            'title' => $m4menu->getVar('name', 'n').$block_desc,
41 41
             'link' => '?mode=admin&lib=altsys&page=myblocksadmin&dirname='.$m4menu->getVar('dirname', 'n')
42
-        ) ;
42
+        );
43 43
         //$GLOBALS['altsysXoopsBreadcrumbs'][] = array( 'name' => $m4menu->getVar('name') ) ;
44 44
     } else {
45 45
         $adminmenu[] = array(
46
-            'selected' => false ,
47
-            'title' => $m4menu->getVar('name', 'n') . $block_desc ,
46
+            'selected' => false,
47
+            'title' => $m4menu->getVar('name', 'n').$block_desc,
48 48
             'link' => '?mode=admin&lib=altsys&page=myblocksadmin&dirname='.$m4menu->getVar('dirname', 'n')
49
-        ) ;
49
+        );
50 50
     }
51 51
 }
52 52
 
53 53
 
54 54
 // display
55
-require_once XOOPS_TRUST_PATH.'/libs/altsys/class/D3Tpl.class.php' ;
56
-$tpl = new D3Tpl() ;
55
+require_once XOOPS_TRUST_PATH.'/libs/altsys/class/D3Tpl.class.php';
56
+$tpl = new D3Tpl();
57 57
 $tpl->assign(array(
58 58
     'adminmenu' => $adminmenu,
59 59
     'mypage' => 'myblocksadmin'
60
-)) ;
61
-$tpl->display('db:altsys_inc_mymenusub.html') ;
60
+));
61
+$tpl->display('db:altsys_inc_mymenusub.html');
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/mymenusub/mylangadmin.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -1,37 +1,37 @@
 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
-$current_dirname = preg_replace('/[^0-9a-zA-Z_-]/', '', @$_GET['dirname']) ;
7
+$current_dirname = preg_replace('/[^0-9a-zA-Z_-]/', '', @$_GET['dirname']);
8 8
 
9
-$db =& XoopsDatabaseFactory::getDatabaseConnection() ;
10
-$mrs = $db->query('SELECT m.name,m.dirname,COUNT(l.mid) FROM ' . $db->prefix('modules') . ' m LEFT JOIN ' . $db->prefix('altsys_language_constants') . ' l ON m.mid=l.mid WHERE m.isactive GROUP BY m.mid ORDER BY m.weight,m.mid') ;
9
+$db = & XoopsDatabaseFactory::getDatabaseConnection();
10
+$mrs = $db->query('SELECT m.name,m.dirname,COUNT(l.mid) FROM '.$db->prefix('modules').' m LEFT JOIN '.$db->prefix('altsys_language_constants').' l ON m.mid=l.mid WHERE m.isactive GROUP BY m.mid ORDER BY m.weight,m.mid');
11 11
 
12
-$adminmenu = array() ;
12
+$adminmenu = array();
13 13
 while (list($name, $dirname, $count) = $db->fetchRow($mrs)) {
14 14
     if ($dirname == $current_dirname) {
15 15
         $adminmenu[] = array(
16
-            'selected' => true ,
17
-            'title' => $name . " ($count)" ,
16
+            'selected' => true,
17
+            'title' => $name." ($count)",
18 18
             'link' => '?mode=admin&lib=altsys&page=mylangadmin&dirname='.$dirname
19
-        ) ;
19
+        );
20 20
         //$GLOBALS['altsysXoopsBreadcrumbs'][] = array( 'name' => htmlspecialchars( $name , ENT_QUOTES ) ) ;
21 21
     } else {
22 22
         $adminmenu[] = array(
23
-            'selected' => false ,
24
-            'title' => $name . " ($count)" ,
23
+            'selected' => false,
24
+            'title' => $name." ($count)",
25 25
             'link' => '?mode=admin&lib=altsys&page=mylangadmin&dirname='.$dirname
26
-        ) ;
26
+        );
27 27
     }
28 28
 }
29 29
 
30 30
 // display
31
-require_once XOOPS_TRUST_PATH.'/libs/altsys/class/D3Tpl.class.php' ;
32
-$tpl = new D3Tpl() ;
31
+require_once XOOPS_TRUST_PATH.'/libs/altsys/class/D3Tpl.class.php';
32
+$tpl = new D3Tpl();
33 33
 $tpl->assign(array(
34 34
     'adminmenu' => $adminmenu,
35 35
     'mypage' => 'mylangadmin'
36
-)) ;
37
-$tpl->display('db:altsys_inc_mymenusub.html') ;
36
+));
37
+$tpl->display('db:altsys_inc_mymenusub.html');
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/mymenusub/mytplsadmin.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -1,56 +1,56 @@
 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
-$current_dirname = preg_replace('/[^0-9a-zA-Z_-]/', '', @$_GET['dirname']) ;
7
+$current_dirname = preg_replace('/[^0-9a-zA-Z_-]/', '', @$_GET['dirname']);
8 8
 
9
-$db =& XoopsDatabaseFactory::getDatabaseConnection() ;
9
+$db = & XoopsDatabaseFactory::getDatabaseConnection();
10 10
 
11 11
 // get custom templates
12
-list($count) = $db->fetchRow($db->query('SELECT COUNT(t.tpl_module) AS tpl_count FROM ' . $db->prefix('tplfile') . " t WHERE t.tpl_type='custom'")) ;
12
+list($count) = $db->fetchRow($db->query('SELECT COUNT(t.tpl_module) AS tpl_count FROM '.$db->prefix('tplfile')." t WHERE t.tpl_type='custom'"));
13 13
 if ($current_dirname == '_custom') {
14 14
     //	$GLOBALS['altsysXoopsBreadcrumbs'][] = array( 'name' => _MYTPLSADMIN_CUSTOMTEMPLATE ) ;
15
-    $custom_selected = true ;
15
+    $custom_selected = true;
16 16
 } else {
17
-    $custom_selected = false ;
17
+    $custom_selected = false;
18 18
 }
19 19
 
20 20
 $adminmenu = array(
21 21
     array(
22
-        'selected' => $custom_selected ,
23
-        'title' => _MYTPLSADMIN_CUSTOMTEMPLATE . " ($count)" ,
22
+        'selected' => $custom_selected,
23
+        'title' => _MYTPLSADMIN_CUSTOMTEMPLATE." ($count)",
24 24
         'link' => '?mode=admin&lib=altsys&page=mytplsadmin&dirname=_custom'
25 25
     )
26
-) ;
26
+);
27 27
 
28 28
 // get modules/templates
29
-$mrs = $db->query('SELECT m.name,m.dirname,COUNT(t.tpl_module) AS tpl_count FROM ' . $db->prefix('modules') . ' m LEFT JOIN ' . $db->prefix('tplfile') . ' t ON m.dirname=t.tpl_module WHERE m.isactive GROUP BY m.mid HAVING tpl_count>0 ORDER BY m.weight,m.mid') ;
29
+$mrs = $db->query('SELECT m.name,m.dirname,COUNT(t.tpl_module) AS tpl_count FROM '.$db->prefix('modules').' m LEFT JOIN '.$db->prefix('tplfile').' t ON m.dirname=t.tpl_module WHERE m.isactive GROUP BY m.mid HAVING tpl_count>0 ORDER BY m.weight,m.mid');
30 30
 
31 31
 // module loop
32 32
 while (list($name, $dirname, $count) = $db->fetchRow($mrs)) {
33 33
     if ($dirname == $current_dirname) {
34 34
         $adminmenu[] = array(
35
-            'selected' => true ,
36
-            'title' => $name . " ($count)" ,
35
+            'selected' => true,
36
+            'title' => $name." ($count)",
37 37
             'link' => '?mode=admin&lib=altsys&page=mytplsadmin&dirname='.$dirname
38
-        ) ;
38
+        );
39 39
         //$GLOBALS['altsysXoopsBreadcrumbs'][] = array( 'name' => htmlspecialchars( $name , ENT_QUOTES ) ) ;
40 40
     } else {
41 41
         $adminmenu[] = array(
42
-            'selected' => false ,
43
-            'title' => $name . " ($count)" ,
42
+            'selected' => false,
43
+            'title' => $name." ($count)",
44 44
             'link' => '?mode=admin&lib=altsys&page=mytplsadmin&dirname='.$dirname
45
-        ) ;
45
+        );
46 46
     }
47 47
 }
48 48
 
49 49
 // display
50
-require_once XOOPS_TRUST_PATH.'/libs/altsys/class/D3Tpl.class.php' ;
51
-$tpl = new D3Tpl() ;
50
+require_once XOOPS_TRUST_PATH.'/libs/altsys/class/D3Tpl.class.php';
51
+$tpl = new D3Tpl();
52 52
 $tpl->assign(array(
53 53
     'adminmenu' => $adminmenu,
54 54
     'mypage' => 'mytplsadmin'
55
-)) ;
56
-$tpl->display('db:altsys_inc_mymenusub.html') ;
55
+));
56
+$tpl->display('db:altsys_inc_mymenusub.html');
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/put_templates.php 1 patch
Spacing   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -5,25 +5,25 @@  discard block
 block discarded – undo
5 5
 //                        GIJOE <http://www.peak.ne.jp/>                     //
6 6
 // ------------------------------------------------------------------------- //
7 7
 
8
-include_once __DIR__.'/include/gtickets.php' ;
9
-include_once __DIR__.'/include/altsys_functions.php' ;
10
-include_once __DIR__.'/include/tpls_functions.php' ;
8
+include_once __DIR__.'/include/gtickets.php';
9
+include_once __DIR__.'/include/altsys_functions.php';
10
+include_once __DIR__.'/include/tpls_functions.php';
11 11
 
12 12
 
13 13
 // this page can be called only from altsys
14 14
 if ($xoopsModule->getVar('dirname') != 'altsys') {
15
-    die('this page can be called only from altsys') ;
15
+    die('this page can be called only from altsys');
16 16
 }
17 17
 
18 18
 
19 19
 // language file
20
-altsys_include_language_file('compilehookadmin') ;
20
+altsys_include_language_file('compilehookadmin');
21 21
 
22 22
 
23
-$db =& XoopsDatabaseFactory::getDatabaseConnection() ;
23
+$db = & XoopsDatabaseFactory::getDatabaseConnection();
24 24
 
25
-if (empty($_FILES['tplset_archive']['tmp_name']) || ! is_uploaded_file($_FILES['tplset_archive']['tmp_name'])) {
26
-    die(_TPLSADMIN_ERR_NOTUPLOADED) ;
25
+if (empty($_FILES['tplset_archive']['tmp_name']) || !is_uploaded_file($_FILES['tplset_archive']['tmp_name'])) {
26
+    die(_TPLSADMIN_ERR_NOTUPLOADED);
27 27
 }
28 28
 //fix for mb_http_output setting and for add any browsers
29 29
     if (function_exists('mb_http_output')) {
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 //ob_buffer over flow
33 33
 //HACK by suin & nao-pon 2012/01/06
34 34
     while (ob_get_level() > 0) {
35
-        if (! ob_end_clean()) {
35
+        if (!ob_end_clean()) {
36 36
             break;
37 37
         }
38 38
     }
@@ -41,62 +41,62 @@  discard block
 block discarded – undo
41 41
 // EXTRACT STAGE
42 42
 //
43 43
 
44
-$orig_filename4check = strtolower($_FILES['tplset_archive']['name']) ;
44
+$orig_filename4check = strtolower($_FILES['tplset_archive']['name']);
45 45
 if (strtolower(substr($orig_filename4check, -4)) == '.zip') {
46 46
 
47 47
     // zip
48
-    require_once __DIR__.'/include/Archive_Zip.php' ;
49
-    $reader = new Archive_Zip($_FILES['tplset_archive']['tmp_name']) ;
50
-    $files = $reader->extract(array( 'extract_as_string' => true )) ;
51
-    if (! is_array(@$files)) {
52
-        die($reader->errorName()) ;
48
+    require_once __DIR__.'/include/Archive_Zip.php';
49
+    $reader = new Archive_Zip($_FILES['tplset_archive']['tmp_name']);
50
+    $files = $reader->extract(array('extract_as_string' => true));
51
+    if (!is_array(@$files)) {
52
+        die($reader->errorName());
53 53
     }
54
-    $do_upload = true ;
54
+    $do_upload = true;
55 55
 } elseif (substr($orig_filename4check, -4) == '.tgz' || substr($orig_filename4check, -7) == '.tar.gz') {
56 56
 
57 57
     // tar.gz
58
-    require_once XOOPS_ROOT_PATH.'/class/class.tar.php' ;
59
-    $tar = new tar() ;
60
-    $tar->openTAR($_FILES['tplset_archive']['tmp_name']) ;
61
-    $files = array() ;
58
+    require_once XOOPS_ROOT_PATH.'/class/class.tar.php';
59
+    $tar = new tar();
60
+    $tar->openTAR($_FILES['tplset_archive']['tmp_name']);
61
+    $files = array();
62 62
     foreach ($tar->files as $id => $info) {
63 63
         $files[] = array(
64
-            'filename' => $info['name'] ,
65
-            'mtime' => $info['time'] ,
64
+            'filename' => $info['name'],
65
+            'mtime' => $info['time'],
66 66
             'content' => $info['file']
67
-        ) ;
67
+        );
68 68
     }
69 69
     if (empty($files)) {
70
-        die(_TPLSADMIN_ERR_INVALIDARCHIVE) ;
70
+        die(_TPLSADMIN_ERR_INVALIDARCHIVE);
71 71
     }
72
-    $do_upload = true ;
72
+    $do_upload = true;
73 73
 }
74 74
 
75 75
 if (empty($do_upload)) {
76
-    die(_TPLSADMIN_ERR_EXTENSION) ;
76
+    die(_TPLSADMIN_ERR_EXTENSION);
77 77
 }
78 78
 
79 79
 //
80 80
 // IMPORT STAGE
81 81
 //
82 82
 
83
-$tplset = @$_POST['tplset'] ;
84
-if (! preg_match('/^[0-9A-Za-z_-]{1,16}$/', $tplset)) {
85
-    die(_TPLSADMIN_ERR_INVALIDTPLSET) ;
83
+$tplset = @$_POST['tplset'];
84
+if (!preg_match('/^[0-9A-Za-z_-]{1,16}$/', $tplset)) {
85
+    die(_TPLSADMIN_ERR_INVALIDTPLSET);
86 86
 }
87 87
 
88
-$imported = 0 ;
88
+$imported = 0;
89 89
 foreach ($files as $file) {
90
-    if (! empty($file['folder'])) {
91
-        continue ;
90
+    if (!empty($file['folder'])) {
91
+        continue;
92 92
     }
93
-    $pos = strrpos($file['filename'], '/') ;
94
-    $tpl_file = $pos === false ? $file['filename'] : substr($file['filename'], $pos + 1) ;
93
+    $pos = strrpos($file['filename'], '/');
94
+    $tpl_file = $pos === false ? $file['filename'] : substr($file['filename'], $pos + 1);
95 95
 
96 96
     if (tplsadmin_import_data($tplset, $tpl_file, rtrim($file['content']), $file['mtime'])) {
97
-        $imported ++ ;
97
+        $imported++;
98 98
     }
99 99
 }
100 100
 
101
-redirect_header('?mode=admin&lib=altsys&page=compilehookadmin', 3, sprintf(_TPLSADMIN_FMT_MSG_PUTTEMPLATES, $imported)) ;
102
-exit ;
101
+redirect_header('?mode=admin&lib=altsys&page=compilehookadmin', 3, sprintf(_TPLSADMIN_FMT_MSG_PUTTEMPLATES, $imported));
102
+exit;
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/onuninstall.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -1,35 +1,35 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-eval(' function xoops_module_uninstall_'.$mydirname.'( $module ) { return altsys_onuninstall_base( $module , "'.$mydirname.'" ) ; } ') ;
3
+eval(' function xoops_module_uninstall_'.$mydirname.'( $module ) { return altsys_onuninstall_base( $module , "'.$mydirname.'" ) ; } ');
4 4
 
5 5
 
6
-if (! function_exists('altsys_onuninstall_base')) {
6
+if (!function_exists('altsys_onuninstall_base')) {
7 7
     function altsys_onuninstall_base($module, $mydirname)
8 8
     {
9 9
         // transations on module uninstall
10 10
 
11
-    global $ret ; // TODO :-D
11
+    global $ret; // TODO :-D
12 12
 
13 13
     // for Cube 2.1
14 14
     if (defined('XOOPS_CUBE_LEGACY')) {
15
-        $root =& XCube_Root::getSingleton();
16
-        $root->mDelegateManager->add('Legacy.Admin.Event.ModuleUninstall.' . ucfirst($mydirname) . '.Success', 'altsys_message_append_onuninstall') ;
17
-        $ret = array() ;
15
+        $root = & XCube_Root::getSingleton();
16
+        $root->mDelegateManager->add('Legacy.Admin.Event.ModuleUninstall.'.ucfirst($mydirname).'.Success', 'altsys_message_append_onuninstall');
17
+        $ret = array();
18 18
     } else {
19
-        if (! is_array($ret)) {
20
-            $ret = array() ;
19
+        if (!is_array($ret)) {
20
+            $ret = array();
21 21
         }
22 22
     }
23 23
 
24
-        $db =& XoopsDatabaseFactory::getDatabaseConnection() ;
25
-        $mid = $module->getVar('mid') ;
24
+        $db = & XoopsDatabaseFactory::getDatabaseConnection();
25
+        $mid = $module->getVar('mid');
26 26
 
27 27
     // TABLES (loading mysql.sql)
28
-    $sql_file_path = __DIR__.'/sql/mysql.sql' ;
29
-        $prefix_mod = $db->prefix() . '_' . $mydirname ;
28
+    $sql_file_path = __DIR__.'/sql/mysql.sql';
29
+        $prefix_mod = $db->prefix().'_'.$mydirname;
30 30
         if (file_exists($sql_file_path)) {
31
-            $ret[] = 'SQL file found at <b>' . htmlspecialchars($sql_file_path) . '</b>.<br  /> Deleting tables...<br />';
32
-            $sql_lines = file($sql_file_path) ;
31
+            $ret[] = 'SQL file found at <b>'.htmlspecialchars($sql_file_path).'</b>.<br  /> Deleting tables...<br />';
32
+            $sql_lines = file($sql_file_path);
33 33
             foreach ($sql_lines as $sql_line) {
34 34
                 if (preg_match('/^CREATE TABLE \`?([a-zA-Z0-9_-]+)\`? /i', $sql_line, $regs)) {
35 35
                     $sql = 'DROP TABLE '.addslashes($prefix_mod.'_'.$regs[1]);
@@ -59,14 +59,14 @@  discard block
 block discarded – undo
59 59
     unset($templates); */
60 60
 
61 61
 
62
-    return true ;
62
+    return true;
63 63
     }
64 64
 
65 65
     function altsys_message_append_onuninstall(&$module_obj, &$log)
66 66
     {
67 67
         if (is_array(@$GLOBALS['ret'])) {
68 68
             foreach ($GLOBALS['ret'] as $message) {
69
-                $log->add(strip_tags($message)) ;
69
+                $log->add(strip_tags($message));
70 70
             }
71 71
         }
72 72
 
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/mypreferences.php 1 patch
Spacing   +54 added lines, -54 removed lines patch added patch discarded remove patch
@@ -5,64 +5,64 @@  discard block
 block discarded – undo
5 5
 //                     GIJOE <http://www.peak.ne.jp/>                        //
6 6
 // ------------------------------------------------------------------------- //
7 7
 
8
-require_once __DIR__.'/class/AltsysBreadcrumbs.class.php' ;
9
-include_once __DIR__.'/include/gtickets.php' ;
10
-include_once __DIR__.'/include/altsys_functions.php' ;
8
+require_once __DIR__.'/class/AltsysBreadcrumbs.class.php';
9
+include_once __DIR__.'/include/gtickets.php';
10
+include_once __DIR__.'/include/altsys_functions.php';
11 11
 
12 12
 // check access right (needs module_admin of this module)
13
-if (! is_object($xoopsUser) || ! is_object($xoopsModule) || ! $xoopsUser->isAdmin($xoopsModule->mid())) {
14
-    die('Access Denied') ;
13
+if (!is_object($xoopsUser) || !is_object($xoopsModule) || !$xoopsUser->isAdmin($xoopsModule->mid())) {
14
+    die('Access Denied');
15 15
 }
16 16
 
17 17
 
18 18
 // initials
19
-$db =& XoopsDatabaseFactory::getDatabaseConnection();
20
-(method_exists('MyTextSanitizer', 'sGetInstance') and $myts =& MyTextSanitizer::sGetInstance()) || $myts =& MyTextSanitizer::getInstance() ;
19
+$db = & XoopsDatabaseFactory::getDatabaseConnection();
20
+(method_exists('MyTextSanitizer', 'sGetInstance') and $myts = & MyTextSanitizer::sGetInstance()) || $myts = & MyTextSanitizer::getInstance();
21 21
 
22 22
 // language file
23
-altsys_include_language_file('mypreferences') ;
23
+altsys_include_language_file('mypreferences');
24 24
 
25 25
 
26
-$op = empty($_GET['op']) ? 'showmod' : preg_replace('/[^a-zA-Z0-9_-]/', '', $_GET['op']) ;
26
+$op = empty($_GET['op']) ? 'showmod' : preg_replace('/[^a-zA-Z0-9_-]/', '', $_GET['op']);
27 27
 
28 28
 if ($op == 'showmod') {
29
-    $config_handler =& xoops_gethandler('config');
30
-    $mod = $xoopsModule->mid() ;
31
-    $config =& $config_handler->getConfigs(new Criteria('conf_modid', $mod));
29
+    $config_handler = & xoops_gethandler('config');
30
+    $mod = $xoopsModule->mid();
31
+    $config = & $config_handler->getConfigs(new Criteria('conf_modid', $mod));
32 32
     $count = count($config);
33 33
     if ($count < 1) {
34
-        die('no configs') ;
34
+        die('no configs');
35 35
     }
36 36
     include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
37 37
     $form = new XoopsThemeForm(_MD_A_MYPREFERENCES_FORMTITLE, 'pref_form', 'index.php?mode=admin&lib=altsys&page=mypreferences&op=save');
38
-    $module_handler =& xoops_gethandler('module');
39
-    $module =& $module_handler->get($mod);
38
+    $module_handler = & xoops_gethandler('module');
39
+    $module = & $module_handler->get($mod);
40 40
 
41 41
     // language
42
-    $language = empty($xoopsConfig['language']) ? 'english' : $xoopsConfig['language'] ;
42
+    $language = empty($xoopsConfig['language']) ? 'english' : $xoopsConfig['language'];
43 43
 
44 44
     // load modinfo.php if necessary (judged by a specific constant is defined)
45
-    if (! defined('_MYMENU_CONSTANT_IN_MODINFO') || ! defined(_MYMENU_CONSTANT_IN_MODINFO)) {
45
+    if (!defined('_MYMENU_CONSTANT_IN_MODINFO') || !defined(_MYMENU_CONSTANT_IN_MODINFO)) {
46 46
         if (file_exists("$mydirpath/language/$language/modinfo.php")) {
47 47
             // user customized language file
48
-            include_once "$mydirpath/language/$language/modinfo.php" ;
48
+            include_once "$mydirpath/language/$language/modinfo.php";
49 49
         } elseif (file_exists("$mytrustdirpath/language/$language/modinfo.php")) {
50 50
             // default language file
51
-            include_once "$mytrustdirpath/language/$language/modinfo.php" ;
51
+            include_once "$mytrustdirpath/language/$language/modinfo.php";
52 52
         } else {
53 53
             // fallback english
54
-            include_once "$mytrustdirpath/language/english/modinfo.php" ;
54
+            include_once "$mytrustdirpath/language/english/modinfo.php";
55 55
         }
56 56
     }
57 57
 
58 58
     // if has comments feature, need comment lang file
59
-    if ($module->getVar('hascomments') == 1 && ! defined('_CM_TITLE')) {
59
+    if ($module->getVar('hascomments') == 1 && !defined('_CM_TITLE')) {
60 60
         include_once XOOPS_ROOT_PATH.'/language/'.$xoopsConfig['language'].'/comment.php';
61 61
     }
62 62
 
63 63
     // RMV-NOTIFY
64 64
     // if has notification feature, need notification lang file
65
-    if ($module->getVar('hasnotification') == 1 && ! defined('_NOT_NOTIFICATIONOPTIONS')) {
65
+    if ($module->getVar('hasnotification') == 1 && !defined('_NOT_NOTIFICATIONOPTIONS')) {
66 66
         include_once XOOPS_ROOT_PATH.'/language/'.$xoopsConfig['language'].'/notification.php';
67 67
     }
68 68
 
@@ -72,12 +72,12 @@  discard block
 block discarded – undo
72 72
         //	$form->addElement(new XoopsFormHidden('redirect', XOOPS_URL.'/modules/'.$module->getVar('dirname').'/'.$module->getInfo('adminindex')));
73 73
     // }
74 74
     for ($i = 0; $i < $count; $i++) {
75
-        $title_icon = ($config[$i]->getVar('conf_valuetype') === 'encrypt')? '<img src="'.XOOPS_MODULE_URL.'/legacy/admin/theme/icons/textfield_key.png" alt="Encrypted">' : ''; // support XCL 2.2.3 'encrypt' of 'conf_valuetype'
75
+        $title_icon = ($config[$i]->getVar('conf_valuetype') === 'encrypt') ? '<img src="'.XOOPS_MODULE_URL.'/legacy/admin/theme/icons/textfield_key.png" alt="Encrypted">' : ''; // support XCL 2.2.3 'encrypt' of 'conf_valuetype'
76 76
         $title4tray = (!defined($config[$i]->getVar('conf_desc')) || constant($config[$i]->getVar('conf_desc')) == '') ? (constant($config[$i]->getVar('conf_title')).$title_icon) : (constant($config[$i]->getVar('conf_title')).$title_icon.'<br /><br /><span style="font-weight:normal;">'.constant($config[$i]->getVar('conf_desc')).'</span>'); // GIJ
77
-        $title = '' ; // GIJ
77
+        $title = ''; // GIJ
78 78
         switch ($config[$i]->getVar('conf_formtype')) {
79 79
         case 'textarea':
80
-            (method_exists('MyTextSanitizer', 'sGetInstance') and $myts =& MyTextSanitizer::sGetInstance()) || $myts =& MyTextSanitizer::getInstance();
80
+            (method_exists('MyTextSanitizer', 'sGetInstance') and $myts = & MyTextSanitizer::sGetInstance()) || $myts = & MyTextSanitizer::getInstance();
81 81
             if ($config[$i]->getVar('conf_valuetype') == 'array') {
82 82
                 // this is exceptional.. only when value type is arrayneed a smarter way for this
83 83
                 $ele = ($config[$i]->getVar('conf_value') != '') ? new XoopsFormTextArea($title, $config[$i]->getVar('conf_name'), $myts->htmlspecialchars(implode('|', $config[$i]->getConfValueForOutput())), 5, 50) : new XoopsFormTextArea($title, $config[$i]->getVar('conf_name'), '', 5, 50);
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
                 $ele = new XoopsFormRadio($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput());
95 95
                 $addBr = '<br />';
96 96
             }
97
-            $options =& $config_handler->getConfigOptions(new Criteria('conf_id', $config[$i]->getVar('conf_id')));
97
+            $options = & $config_handler->getConfigOptions(new Criteria('conf_id', $config[$i]->getVar('conf_id')));
98 98
             $opcount = count($options);
99 99
             for ($j = 0; $j < $opcount; $j++) {
100 100
                 $optval = defined($options[$j]->getVar('confop_value')) ? constant($options[$j]->getVar('confop_value')) : $options[$j]->getVar('confop_value');
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
                 $ele = new XoopsFormCheckBox($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput());
112 112
                 $addBr = '<br />';
113 113
             }
114
-            $options =& $config_handler->getConfigOptions(new Criteria('conf_id', $config[$i]->getVar('conf_id')));
114
+            $options = & $config_handler->getConfigOptions(new Criteria('conf_id', $config[$i]->getVar('conf_id')));
115 115
             $opcount = count($options);
116 116
             for ($j = 0; $j < $opcount; $j++) {
117 117
                 $optval = defined($options[$j]->getVar('confop_value')) ? constant($options[$j]->getVar('confop_value')) : $options[$j]->getVar('confop_value');
@@ -145,37 +145,37 @@  discard block
 block discarded – undo
145 145
             $ele = new XoopsFormSelectUser($title, $config[$i]->getVar('conf_name'), false, $config[$i]->getConfValueForOutput(), 5, true);
146 146
             break;
147 147
         case 'password':
148
-            (method_exists('MyTextSanitizer', 'sGetInstance') and $myts =& MyTextSanitizer::sGetInstance()) || $myts =& MyTextSanitizer::getInstance();
148
+            (method_exists('MyTextSanitizer', 'sGetInstance') and $myts = & MyTextSanitizer::sGetInstance()) || $myts = & MyTextSanitizer::getInstance();
149 149
             $ele = new XoopsFormPassword($title, $config[$i]->getVar('conf_name'), 50, 255, $myts->htmlspecialchars($config[$i]->getConfValueForOutput()));
150 150
             break;
151 151
         case 'textbox':
152 152
         default:
153
-            (method_exists('MyTextSanitizer', 'sGetInstance') and $myts =& MyTextSanitizer::sGetInstance()) || $myts =& MyTextSanitizer::getInstance();
153
+            (method_exists('MyTextSanitizer', 'sGetInstance') and $myts = & MyTextSanitizer::sGetInstance()) || $myts = & MyTextSanitizer::getInstance();
154 154
             $ele = new XoopsFormText($title, $config[$i]->getVar('conf_name'), 50, 255, $myts->htmlspecialchars($config[$i]->getConfValueForOutput()));
155 155
             break;
156 156
         }
157 157
         $hidden = new XoopsFormHidden('conf_ids[]', $config[$i]->getVar('conf_id'));
158
-        $ele_tray = new XoopsFormElementTray($title4tray, '') ;
158
+        $ele_tray = new XoopsFormElementTray($title4tray, '');
159 159
         $ele_tray->addElement($ele);
160 160
         $ele_tray->addElement($hidden);
161
-        $form->addElement($ele_tray) ;
161
+        $form->addElement($ele_tray);
162 162
         unset($ele_tray);
163 163
         unset($ele);
164 164
         unset($hidden);
165 165
     }
166 166
     // $button_tray->addElement(new XoopsFormHidden('op', 'save'));
167
-    $xoopsGTicket->addTicketXoopsFormElement($button_tray, __LINE__, 1800, 'mypreferences') ;
167
+    $xoopsGTicket->addTicketXoopsFormElement($button_tray, __LINE__, 1800, 'mypreferences');
168 168
     $button_tray->addElement(new XoopsFormButton('', 'button', _GO, 'submit'));
169
-    $form->addElement($button_tray) ;
169
+    $form->addElement($button_tray);
170 170
     xoops_cp_header();
171 171
 
172 172
     // GIJ patch start
173
-    altsys_include_mymenu() ;
174
-    $breadcrumbsObj =& AltsysBreadcrumbs::getInstance() ;
173
+    altsys_include_mymenu();
174
+    $breadcrumbsObj = & AltsysBreadcrumbs::getInstance();
175 175
     if ($breadcrumbsObj->hasPaths()) {
176
-        $breadcrumbsObj->appendPath(XOOPS_URL.'/modules/altsys/admin/index.php?mode=admin&amp;lib=altsys&amp;page=mypreferences', _PREFERENCES) ;
176
+        $breadcrumbsObj->appendPath(XOOPS_URL.'/modules/altsys/admin/index.php?mode=admin&amp;lib=altsys&amp;page=mypreferences', _PREFERENCES);
177 177
     }
178
-    echo "<h3 style='text-align:"._GLOBAL_LEFT.";'>".$module->getvar('name').' &nbsp; '._PREFERENCES."</h3>\n" ;
178
+    echo "<h3 style='text-align:"._GLOBAL_LEFT.";'>".$module->getvar('name').' &nbsp; '._PREFERENCES."</h3>\n";
179 179
     // GIJ patch end
180 180
 
181 181
     $form->display();
@@ -187,10 +187,10 @@  discard block
 block discarded – undo
187 187
     //if ( !admin_refcheck("/modules/$admin_mydirname/admin/") ) {
188 188
     //	exit('Invalid referer');
189 189
     //}
190
-    if (! $xoopsGTicket->check(true, 'mypreferences')) {
190
+    if (!$xoopsGTicket->check(true, 'mypreferences')) {
191 191
         redirect_header(XOOPS_URL.'/', 3, $xoopsGTicket->getErrors());
192 192
     }
193
-    require_once XOOPS_ROOT_PATH.'/class/template.php' ;
193
+    require_once XOOPS_ROOT_PATH.'/class/template.php';
194 194
     $xoopsTpl = new XoopsTpl();
195 195
 //HACK by domifara for new XOOPS and XCL etc.
196 196
 //old xoops
@@ -210,8 +210,8 @@  discard block
 block discarded – undo
210 210
     $lang_updated = false;
211 211
     if ($count > 0) {
212 212
         for ($i = 0; $i < $count; $i++) {
213
-            $config =& $config_handler->getConfig($conf_ids[$i]);
214
-            $new_value =& $_POST[$config->getVar('conf_name')];
213
+            $config = & $config_handler->getConfig($conf_ids[$i]);
214
+            $new_value = & $_POST[$config->getVar('conf_name')];
215 215
             if (is_array($new_value) || $new_value != $config->getVar('conf_value')) {
216 216
                 // if language has been changed
217 217
                 if (!$lang_updated && $config->getVar('conf_catid') == XOOPS_CONF && $config->getVar('conf_name') == 'language') {
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
 
224 224
                 // if default theme has been changed
225 225
                 if (!$theme_updated && $config->getVar('conf_catid') == XOOPS_CONF && $config->getVar('conf_name') == 'theme_set') {
226
-                    $member_handler =& xoops_gethandler('member');
226
+                    $member_handler = & xoops_gethandler('member');
227 227
                     $member_handler->updateUsersByField('theme', $_POST[$config->getVar('conf_name')]);
228 228
                     $theme_updated = true;
229 229
                 }
@@ -239,14 +239,14 @@  discard block
 block discarded – undo
239 239
 
240 240
                         // generate compiled files for the new theme
241 241
                         // block files only for now..
242
-                        $tplfile_handler =& xoops_gethandler('tplfile');
243
-                        $dtemplates =& $tplfile_handler->find('default', 'block');
242
+                        $tplfile_handler = & xoops_gethandler('tplfile');
243
+                        $dtemplates = & $tplfile_handler->find('default', 'block');
244 244
                         $dcount = count($dtemplates);
245 245
 
246 246
                         // need to do this to pass to xoops_template_touch function
247 247
                         $GLOBALS['xoopsConfig']['template_set'] = $newtplset;
248 248
 
249
-                        altsys_clear_templates_c() ;
249
+                        altsys_clear_templates_c();
250 250
 
251 251
 /*						for ($i = 0; $i < $dcount; $i++) {
252 252
                             $found =& $tplfile_handler->find($newtplset, 'block', $dtemplates[$i]->getVar('tpl_refid'), null);
@@ -260,8 +260,8 @@  discard block
 block discarded – undo
260 260
                         }*/
261 261
 
262 262
                         // generate image cache files from image binary data, save them under cache/
263
-                        $image_handler =& xoops_gethandler('imagesetimg');
264
-                        $imagefiles =& $image_handler->getObjects(new Criteria('tplset_name', $newtplset), true);
263
+                        $image_handler = & xoops_gethandler('imagesetimg');
264
+                        $imagefiles = & $image_handler->getObjects(new Criteria('tplset_name', $newtplset), true);
265 265
                         foreach (array_keys($imagefiles) as $i) {
266 266
                             if (!$fp = fopen(XOOPS_CACHE_PATH.'/'.$newtplset.'_'.$imagefiles[$i]->getVar('imgsetimg_file'), 'wb')) {
267 267
                             } else {
@@ -274,12 +274,12 @@  discard block
 block discarded – undo
274 274
                 }
275 275
 
276 276
                 // add read permission for the start module to all groups
277
-                if (!$startmod_updated    && $new_value != '--' && $config->getVar('conf_catid') == XOOPS_CONF && $config->getVar('conf_name') == 'startpage') {
278
-                    $member_handler =& xoops_gethandler('member');
279
-                    $groups =& $member_handler->getGroupList();
280
-                    $moduleperm_handler =& xoops_gethandler('groupperm');
281
-                    $module_handler =& xoops_gethandler('module');
282
-                    $module =& $module_handler->getByDirname($new_value);
277
+                if (!$startmod_updated && $new_value != '--' && $config->getVar('conf_catid') == XOOPS_CONF && $config->getVar('conf_name') == 'startpage') {
278
+                    $member_handler = & xoops_gethandler('member');
279
+                    $groups = & $member_handler->getGroupList();
280
+                    $moduleperm_handler = & xoops_gethandler('groupperm');
281
+                    $module_handler = & xoops_gethandler('module');
282
+                    $module = & $module_handler->getByDirname($new_value);
283 283
                     foreach ($groups as $groupid => $groupname) {
284 284
                         if (!$moduleperm_handler->checkRight('module_read', $module->getVar('mid'), $groupid)) {
285 285
                             $moduleperm_handler->addRight('module_read', $module->getVar('mid'), $groupid);
@@ -295,5 +295,5 @@  discard block
 block discarded – undo
295 295
         }
296 296
     }
297 297
 
298
-    redirect_header('index.php?mode=admin&lib=altsys&page=mypreferences', 2, _MD_A_MYPREFERENCES_UPDATED) ;
298
+    redirect_header('index.php?mode=admin&lib=altsys&page=mypreferences', 2, _MD_A_MYPREFERENCES_UPDATED);
299 299
 }
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/xoops_version.php 1 patch
Spacing   +56 added lines, -56 removed lines patch added patch discarded remove patch
@@ -1,14 +1,14 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-include_once __DIR__.'/include/altsys_functions.php' ;
3
+include_once __DIR__.'/include/altsys_functions.php';
4 4
 
5 5
 // language file (modinfo.php)
6
-altsys_include_language_file('modinfo') ;
6
+altsys_include_language_file('modinfo');
7 7
 
8
-$modversion['name'] = _MI_ALTSYS_MODULENAME ;
9
-$modversion['version'] = '0.82' ;
10
-$modversion['detailed_version'] = '0.82.5' ;
11
-$modversion['description'] = _MI_ALTSYS_MODULEDESC ;
8
+$modversion['name'] = _MI_ALTSYS_MODULENAME;
9
+$modversion['version'] = '0.82';
10
+$modversion['detailed_version'] = '0.82.5';
11
+$modversion['description'] = _MI_ALTSYS_MODULEDESC;
12 12
 $modversion['credits'] = 'PEAK Corp.';
13 13
 $modversion['author'] = 'GIJ=CHECKMATE<br />PEAK Corp.(http://www.peak.ne.jp/), XOOPS X Distribution(https://github.com/XoopsX)';
14 14
 $modversion['license'] = 'GPL see LICENSE';
@@ -22,18 +22,18 @@  discard block
 block discarded – undo
22 22
 $modversion['adminmenu'] = 'admin/admin_menu.php';
23 23
 
24 24
 // All Templates can't be touched by modulesadmin.
25
-$modversion['templates'] = array() ;
25
+$modversion['templates'] = array();
26 26
 
27 27
 // Blocks
28 28
 $modversion['blocks'][1] = array(
29
-    'file'            => 'blocks.php' ,
30
-    'name'            => _MI_ALTSYS_BNAME_ADMIN_MENU ,
31
-    'description'    => '' ,
32
-    'show_func'        => 'b_altsys_admin_menu_show' ,
33
-    'edit_func'        => 'b_altsys_admin_menu_edit' ,
34
-    'options'        => "$mydirname" ,
35
-    'template'        => '' , // use "module" template instead
36
-) ;
29
+    'file'            => 'blocks.php',
30
+    'name'            => _MI_ALTSYS_BNAME_ADMIN_MENU,
31
+    'description'    => '',
32
+    'show_func'        => 'b_altsys_admin_menu_show',
33
+    'edit_func'        => 'b_altsys_admin_menu_edit',
34
+    'options'        => "$mydirname",
35
+    'template'        => '', // use "module" template instead
36
+);
37 37
 
38 38
 // Menu
39 39
 $modversion['hasMain'] = 1;
@@ -46,64 +46,64 @@  discard block
 block discarded – undo
46 46
 
47 47
 // Configurations
48 48
 $modversion['config'][1] = array(
49
-    'name'            => 'adminmenu_hack_ft' ,
50
-    'title'            => '_MI_ALTSYS_ADMINMENU_HFT' ,
51
-    'description'    => '_MI_ALTSYS_ADMINMENU_HFTDSC' ,
52
-    'formtype'        => 'select' ,
53
-    'valuetype'        => 'int' ,
54
-    'default'        => 0 ,
55
-    'options'        => array( '_NONE' => 0 , '_MI_ALTSYS_AMHFT_OPT_2COL' => 1 , '_MI_ALTSYS_AMHFT_OPT_NOIMG' => 2 , '_MI_ALTSYS_AMHFT_OPT_XCSTY' => 3 )
56
-) ;
49
+    'name'            => 'adminmenu_hack_ft',
50
+    'title'            => '_MI_ALTSYS_ADMINMENU_HFT',
51
+    'description'    => '_MI_ALTSYS_ADMINMENU_HFTDSC',
52
+    'formtype'        => 'select',
53
+    'valuetype'        => 'int',
54
+    'default'        => 0,
55
+    'options'        => array('_NONE' => 0, '_MI_ALTSYS_AMHFT_OPT_2COL' => 1, '_MI_ALTSYS_AMHFT_OPT_NOIMG' => 2, '_MI_ALTSYS_AMHFT_OPT_XCSTY' => 3)
56
+);
57 57
 
58 58
 $modversion['config'][] = array(
59
-    'name'            => 'adminmenu_insert_mymenu' ,
60
-    'title'            => '_MI_ALTSYS_ADMINMENU_IM' ,
61
-    'description'    => '_MI_ALTSYS_ADMINMENU_IMDSC' ,
62
-    'formtype'        => 'yesno' ,
63
-    'valuetype'        => 'int' ,
64
-    'default'        => 0 ,
59
+    'name'            => 'adminmenu_insert_mymenu',
60
+    'title'            => '_MI_ALTSYS_ADMINMENU_IM',
61
+    'description'    => '_MI_ALTSYS_ADMINMENU_IMDSC',
62
+    'formtype'        => 'yesno',
63
+    'valuetype'        => 'int',
64
+    'default'        => 0,
65 65
     'options'        => array()
66
-) ;
66
+);
67 67
 
68 68
 $modversion['config'][] = array(
69
-    'name'            => 'admin_in_theme' ,
70
-    'title'            => '_MI_ALTSYS_ADMIN_IN_THEME' ,
71
-    'description'    => '_MI_ALTSYS_ADMIN_IN_THEMEDSC' ,
72
-    'formtype'        => 'textbox' ,
73
-    'valuetype'        => 'text' ,
74
-    'default'        => 'default' ,
69
+    'name'            => 'admin_in_theme',
70
+    'title'            => '_MI_ALTSYS_ADMIN_IN_THEME',
71
+    'description'    => '_MI_ALTSYS_ADMIN_IN_THEMEDSC',
72
+    'formtype'        => 'textbox',
73
+    'valuetype'        => 'text',
74
+    'default'        => 'default',
75 75
     'options'        => array()
76
-) ;
76
+);
77 77
 
78 78
 $modversion['config'][] = array(
79
-    'name'            => 'enable_force_clone' ,
80
-    'title'            => '_MI_ALTSYS_ENABLEFORCECLONE' ,
81
-    'description'    => '_MI_ALTSYS_ENABLEFORCECLONEDSC' ,
82
-    'formtype'        => 'yesno' ,
83
-    'valuetype'        => 'int' ,
84
-    'default'        => 1 ,
79
+    'name'            => 'enable_force_clone',
80
+    'title'            => '_MI_ALTSYS_ENABLEFORCECLONE',
81
+    'description'    => '_MI_ALTSYS_ENABLEFORCECLONEDSC',
82
+    'formtype'        => 'yesno',
83
+    'valuetype'        => 'int',
84
+    'default'        => 1,
85 85
     'options'        => array()
86
-) ;
86
+);
87 87
 
88 88
 $modversion['config'][] = array(
89
-    'name'            => 'images_dir' ,
90
-    'title'            => '_MI_ALTSYS_IMAGES_DIR' ,
91
-    'description'    => '_MI_ALTSYS_IMAGES_DIRDSC' ,
92
-    'formtype'        => 'textbox' ,
93
-    'valuetype'        => 'text' ,
94
-    'default'        => 'images' ,
89
+    'name'            => 'images_dir',
90
+    'title'            => '_MI_ALTSYS_IMAGES_DIR',
91
+    'description'    => '_MI_ALTSYS_IMAGES_DIRDSC',
92
+    'formtype'        => 'textbox',
93
+    'valuetype'        => 'text',
94
+    'default'        => 'images',
95 95
     'options'        => array()
96
-) ;
96
+);
97 97
 
98 98
 // Notification
99 99
 
100 100
 $modversion['hasNotification'] = 0;
101 101
 
102
-$modversion['onInstall'] = 'include/oninstall.php' ;
103
-$modversion['onUpdate'] = 'include/onupdate.php' ;
104
-$modversion['onUninstall'] = 'include/onuninstall.php' ;
102
+$modversion['onInstall'] = 'include/oninstall.php';
103
+$modversion['onUpdate'] = 'include/onupdate.php';
104
+$modversion['onUninstall'] = 'include/onuninstall.php';
105 105
 
106 106
 // keep block's options
107
-if (! defined('XOOPS_CUBE_LEGACY') && substr(XOOPS_VERSION, 6, 3) < 2.1 && ! empty($_POST['fct']) && ! empty($_POST['op']) && $_POST['fct'] == 'modulesadmin' && $_POST['op'] == 'update_ok' && $_POST['dirname'] == $modversion['dirname']) {
108
-    include __DIR__.'/include/x20_keepblockoptions.inc.php' ;
107
+if (!defined('XOOPS_CUBE_LEGACY') && substr(XOOPS_VERSION, 6, 3) < 2.1 && !empty($_POST['fct']) && !empty($_POST['op']) && $_POST['fct'] == 'modulesadmin' && $_POST['op'] == 'update_ok' && $_POST['dirname'] == $modversion['dirname']) {
108
+    include __DIR__.'/include/x20_keepblockoptions.inc.php';
109 109
 }
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/blocks/block_functions.php 1 patch
Spacing   +11 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,29 +1,29 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-require_once dirname(__DIR__).'/include/altsys_functions.php' ;
3
+require_once dirname(__DIR__).'/include/altsys_functions.php';
4 4
 
5 5
 function b_altsys_admin_menu_show($options)
6 6
 {
7
-    global $xoopsUser ;
7
+    global $xoopsUser;
8 8
 
9
-    $mydirname = empty($options[0]) ? 'altsys' : $options[0] ;
10
-    $this_template = empty($options[1]) ? 'db:'.$mydirname.'_block_admin_menu.html' : trim($options[1]) ;
9
+    $mydirname = empty($options[0]) ? 'altsys' : $options[0];
10
+    $this_template = empty($options[1]) ? 'db:'.$mydirname.'_block_admin_menu.html' : trim($options[1]);
11 11
 
12 12
     if (preg_match('/[^0-9a-zA-Z_-]/', $mydirname)) {
13
-        die('Invalid mydirname') ;
13
+        die('Invalid mydirname');
14 14
     }
15
-    if (! is_object(@$xoopsUser)) {
16
-        return array() ;
15
+    if (!is_object(@$xoopsUser)) {
16
+        return array();
17 17
     }
18 18
 
19 19
     // coretype
20
-    $coretype = altsys_get_core_type() ;
20
+    $coretype = altsys_get_core_type();
21 21
 
22 22
     // mid_selected
23 23
     if (is_object(@$GLOBALS['xoopsModule'])) {
24
-        $mid_selected = $GLOBALS['xoopsModule']->getVar('mid') ;
24
+        $mid_selected = $GLOBALS['xoopsModule']->getVar('mid');
25 25
         // for system->preferences
26
-<<<<<<< HEAD
26
+<< << <<< HEAD
27 27
         if ($mid_selected == 1 && @$_GET['fct'] == 'preferences' && @$_GET['op'] == 'showmod' && ! empty($_GET['mod'])) {
28 28
             $mid_selected = intval($_GET['mod']) ;
29 29
 =======
@@ -156,5 +156,4 @@  discard block
 block discarded – undo
156 156
 		<br />
157 157
 	\n" ;
158 158
 
159
-    return $form;
160
-}
159
+    return $form
161 160
\ No newline at end of file
Please login to merge, or discard this patch.