@@ -5,9 +5,9 @@ discard block |
||
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 |
||
20 | 20 | 'mytplsform', |
21 | 21 | 'put_templates', |
22 | 22 | 'mylangadmin' |
23 | -) ; |
|
23 | +); |
@@ -1,75 +1,75 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -eval(' function xoops_module_update_'.$mydirname.'( $module ) { return altsys_onupdate_base( $module , "'.$mydirname.'" ) ; } ') ; |
|
3 | +eval(' function xoops_module_update_'.$mydirname.'( $module ) { return altsys_onupdate_base( $module , "'.$mydirname.'" ) ; } '); |
|
4 | 4 | |
5 | 5 | |
6 | -if (! function_exists('altsys_onupdate_base')) { |
|
6 | +if (!function_exists('altsys_onupdate_base')) { |
|
7 | 7 | function altsys_onupdate_base($module, $mydirname) |
8 | 8 | { |
9 | 9 | // transations on module update |
10 | 10 | |
11 | - global $msgs ; // TODO :-D |
|
11 | + global $msgs; // 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.ModuleUpdate.' . ucfirst($mydirname) . '.Success', 'altsys_message_append_onupdate') ; |
|
17 | - $msgs = array() ; |
|
15 | + $root = & XCube_Root::getSingleton(); |
|
16 | + $root->mDelegateManager->add('Legacy.Admin.Event.ModuleUpdate.'.ucfirst($mydirname).'.Success', 'altsys_message_append_onupdate'); |
|
17 | + $msgs = array(); |
|
18 | 18 | } else { |
19 | - if (! is_array($msgs)) { |
|
20 | - $msgs = array() ; |
|
19 | + if (!is_array($msgs)) { |
|
20 | + $msgs = 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 | |
28 | 28 | |
29 | 29 | // TABLES (write here ALTER TABLE etc. if necessary) |
30 | 30 | |
31 | 31 | // configs (Though I know it is not a recommended way...) |
32 | - $check_sql = 'SHOW COLUMNS FROM ' . $db->prefix('config') . " LIKE 'conf_title'" ; |
|
32 | + $check_sql = 'SHOW COLUMNS FROM '.$db->prefix('config')." LIKE 'conf_title'"; |
|
33 | 33 | if (($result = $db->query($check_sql)) && ($myrow = $db->fetchArray($result)) && @$myrow['Type'] == 'varchar(30)') { |
34 | - $db->queryF('ALTER TABLE ' . $db->prefix('config') . " MODIFY `conf_title` varchar(255) NOT NULL default '', MODIFY `conf_desc` varchar(255) NOT NULL default ''") ; |
|
34 | + $db->queryF('ALTER TABLE '.$db->prefix('config')." MODIFY `conf_title` varchar(255) NOT NULL default '', MODIFY `conf_desc` varchar(255) NOT NULL default ''"); |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | // 0.4 -> 0.5 |
38 | - $check_sql = 'SELECT COUNT(*) FROM ' . $db->prefix($mydirname . '_language_constants') ; |
|
39 | - if (! $db->query($check_sql)) { |
|
40 | - $db->queryF('CREATE TABLE ' . $db->prefix($mydirname . '_language_constants') . " (mid smallint(5) unsigned NOT NULL default 0,language varchar(32) NOT NULL default '',name varchar(255) NOT NULL default '',value text,PRIMARY KEY (mid,language,name)) ENGINE=MyISAM") ; |
|
38 | + $check_sql = 'SELECT COUNT(*) FROM '.$db->prefix($mydirname.'_language_constants'); |
|
39 | + if (!$db->query($check_sql)) { |
|
40 | + $db->queryF('CREATE TABLE '.$db->prefix($mydirname.'_language_constants')." (mid smallint(5) unsigned NOT NULL default 0,language varchar(32) NOT NULL default '',name varchar(255) NOT NULL default '',value text,PRIMARY KEY (mid,language,name)) ENGINE=MyISAM"); |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | |
44 | 44 | // TEMPLATES (all templates have been already removed by modulesadmin) |
45 | - $tplfile_handler =& xoops_gethandler('tplfile') ; |
|
46 | - $tpl_path = __DIR__.'/templates' ; |
|
47 | - if ($handler = @opendir($tpl_path . '/')) { |
|
45 | + $tplfile_handler = & xoops_gethandler('tplfile'); |
|
46 | + $tpl_path = __DIR__.'/templates'; |
|
47 | + if ($handler = @opendir($tpl_path.'/')) { |
|
48 | 48 | while (($file = readdir($handler)) !== false) { |
49 | 49 | if (substr($file, 0, 1) == '.') { |
50 | - continue ; |
|
50 | + continue; |
|
51 | 51 | } |
52 | - $file_path = $tpl_path . '/' . $file ; |
|
52 | + $file_path = $tpl_path.'/'.$file; |
|
53 | 53 | if (is_file($file_path)) { |
54 | 54 | $mtime = (int)(@filemtime($file_path)); |
55 | - $tplfile =& $tplfile_handler->create() ; |
|
56 | - $tplfile->setVar('tpl_source', file_get_contents($file_path), true) ; |
|
57 | - $tplfile->setVar('tpl_refid', $mid) ; |
|
58 | - $tplfile->setVar('tpl_tplset', 'default') ; |
|
59 | - $tplfile->setVar('tpl_file', $mydirname . '_' . $file) ; |
|
60 | - $tplfile->setVar('tpl_desc', '', true) ; |
|
61 | - $tplfile->setVar('tpl_module', $mydirname) ; |
|
62 | - $tplfile->setVar('tpl_lastmodified', $mtime) ; |
|
63 | - $tplfile->setVar('tpl_lastimported', 0) ; |
|
64 | - $tplfile->setVar('tpl_type', 'module') ; |
|
65 | - if (! $tplfile_handler->insert($tplfile)) { |
|
55 | + $tplfile = & $tplfile_handler->create(); |
|
56 | + $tplfile->setVar('tpl_source', file_get_contents($file_path), true); |
|
57 | + $tplfile->setVar('tpl_refid', $mid); |
|
58 | + $tplfile->setVar('tpl_tplset', 'default'); |
|
59 | + $tplfile->setVar('tpl_file', $mydirname.'_'.$file); |
|
60 | + $tplfile->setVar('tpl_desc', '', true); |
|
61 | + $tplfile->setVar('tpl_module', $mydirname); |
|
62 | + $tplfile->setVar('tpl_lastmodified', $mtime); |
|
63 | + $tplfile->setVar('tpl_lastimported', 0); |
|
64 | + $tplfile->setVar('tpl_type', 'module'); |
|
65 | + if (!$tplfile_handler->insert($tplfile)) { |
|
66 | 66 | $msgs[] = '<span style="color:#ff0000;">ERROR: Could not insert template <b>'.htmlspecialchars($mydirname.'_'.$file).'</b> to the database.</span>'; |
67 | 67 | } else { |
68 | - $tplid = $tplfile->getVar('tpl_id') ; |
|
68 | + $tplid = $tplfile->getVar('tpl_id'); |
|
69 | 69 | $msgs[] = 'Template <b>'.htmlspecialchars($mydirname.'_'.$file).'</b> added to the database. (ID: <b>'.$tplid.'</b>)'; |
70 | 70 | // generate compiled file |
71 | - require_once XOOPS_TRUST_PATH.'/libs/altsys/include/altsys_functions.php' ; |
|
72 | - altsys_clear_templates_c() ; |
|
71 | + require_once XOOPS_TRUST_PATH.'/libs/altsys/include/altsys_functions.php'; |
|
72 | + altsys_clear_templates_c(); |
|
73 | 73 | /*include_once XOOPS_ROOT_PATH.'/class/xoopsblock.php' ; |
74 | 74 | if( ! xoops_template_touch( $tplid ) ) { |
75 | 75 | $msgs[] = '<span style="color:#ff0000;">ERROR: Failed compiling template <b>'.htmlspecialchars($mydirname.'_'.$file).'</b>.</span>'; |
@@ -79,20 +79,20 @@ discard block |
||
79 | 79 | } |
80 | 80 | } |
81 | 81 | } |
82 | - closedir($handler) ; |
|
82 | + closedir($handler); |
|
83 | 83 | } |
84 | - include_once XOOPS_ROOT_PATH.'/class/xoopsblock.php' ; |
|
85 | - include_once XOOPS_ROOT_PATH.'/class/template.php' ; |
|
86 | - xoops_template_clear_module_cache($mid) ; |
|
84 | + include_once XOOPS_ROOT_PATH.'/class/xoopsblock.php'; |
|
85 | + include_once XOOPS_ROOT_PATH.'/class/template.php'; |
|
86 | + xoops_template_clear_module_cache($mid); |
|
87 | 87 | |
88 | - return true ; |
|
88 | + return true; |
|
89 | 89 | } |
90 | 90 | |
91 | 91 | function altsys_message_append_onupdate(&$module_obj, &$log) |
92 | 92 | { |
93 | 93 | if (is_array(@$GLOBALS['msgs'])) { |
94 | 94 | foreach ($GLOBALS['msgs'] as $message) { |
95 | - $log->add(strip_tags($message)) ; |
|
95 | + $log->add(strip_tags($message)); |
|
96 | 96 | } |
97 | 97 | } |
98 | 98 |
@@ -47,42 +47,42 @@ discard block |
||
47 | 47 | $scoln = 'disabled'; |
48 | 48 | } else { |
49 | 49 | switch ($side) { |
50 | - case XOOPS_SIDEBLOCK_LEFT : |
|
51 | - $ssel0 = " checked='checked'"; |
|
52 | - $scol0 = 'selected'; |
|
53 | - break ; |
|
54 | - case XOOPS_SIDEBLOCK_RIGHT : |
|
55 | - $ssel1 = " checked='checked'"; |
|
56 | - $scol1 = 'selected'; |
|
57 | - break ; |
|
58 | - case XOOPS_CENTERBLOCK_LEFT : |
|
59 | - $ssel3 = " checked='checked'"; |
|
60 | - $scol3 = 'selected'; |
|
61 | - break ; |
|
62 | - case XOOPS_CENTERBLOCK_RIGHT : |
|
63 | - $ssel4 = " checked='checked'"; |
|
64 | - $scol4 = 'selected'; |
|
65 | - break ; |
|
66 | - case XOOPS_CENTERBLOCK_CENTER : |
|
67 | - $ssel5 = " checked='checked'"; |
|
68 | - $scol5 = 'selected'; |
|
69 | - break ; |
|
70 | - case XOOPS_CENTERBLOCK_BOTTOMLEFT : |
|
71 | - $ssel7 = " checked='checked'"; |
|
72 | - $scol7 = 'selected'; |
|
73 | - break ; |
|
74 | - case XOOPS_CENTERBLOCK_BOTTOMRIGHT : |
|
75 | - $ssel8 = " checked='checked'"; |
|
76 | - $scol8 = 'selected'; |
|
77 | - break ; |
|
78 | - case XOOPS_CENTERBLOCK_BOTTOM : |
|
79 | - $ssel9 = " checked='checked'"; |
|
80 | - $scol9 = 'selected'; |
|
81 | - break ; |
|
82 | - default : |
|
83 | - $value4extra_side = $side ; |
|
84 | - $stextbox = 'selected'; |
|
85 | - break ; |
|
50 | + case XOOPS_SIDEBLOCK_LEFT : |
|
51 | + $ssel0 = " checked='checked'"; |
|
52 | + $scol0 = 'selected'; |
|
53 | + break ; |
|
54 | + case XOOPS_SIDEBLOCK_RIGHT : |
|
55 | + $ssel1 = " checked='checked'"; |
|
56 | + $scol1 = 'selected'; |
|
57 | + break ; |
|
58 | + case XOOPS_CENTERBLOCK_LEFT : |
|
59 | + $ssel3 = " checked='checked'"; |
|
60 | + $scol3 = 'selected'; |
|
61 | + break ; |
|
62 | + case XOOPS_CENTERBLOCK_RIGHT : |
|
63 | + $ssel4 = " checked='checked'"; |
|
64 | + $scol4 = 'selected'; |
|
65 | + break ; |
|
66 | + case XOOPS_CENTERBLOCK_CENTER : |
|
67 | + $ssel5 = " checked='checked'"; |
|
68 | + $scol5 = 'selected'; |
|
69 | + break ; |
|
70 | + case XOOPS_CENTERBLOCK_BOTTOMLEFT : |
|
71 | + $ssel7 = " checked='checked'"; |
|
72 | + $scol7 = 'selected'; |
|
73 | + break ; |
|
74 | + case XOOPS_CENTERBLOCK_BOTTOMRIGHT : |
|
75 | + $ssel8 = " checked='checked'"; |
|
76 | + $scol8 = 'selected'; |
|
77 | + break ; |
|
78 | + case XOOPS_CENTERBLOCK_BOTTOM : |
|
79 | + $ssel9 = " checked='checked'"; |
|
80 | + $scol9 = 'selected'; |
|
81 | + break ; |
|
82 | + default : |
|
83 | + $value4extra_side = $side ; |
|
84 | + $stextbox = 'selected'; |
|
85 | + break ; |
|
86 | 86 | } |
87 | 87 | } |
88 | 88 | |
@@ -166,31 +166,31 @@ discard block |
||
166 | 166 | } |
167 | 167 | |
168 | 168 | switch ($mode) { |
169 | - case 'clone' : |
|
170 | - $form_title = _MD_A_MYBLOCKSADMIN_CLONEFORM ; |
|
171 | - $button_value = _MD_A_MYBLOCKSADMIN_BTN_CLONE ; |
|
172 | - $next_op = 'clone_ok' ; |
|
173 | - // breadcrumbs |
|
174 | - $breadcrumbsObj =& AltsysBreadcrumbs::getInstance() ; |
|
175 | - $breadcrumbsObj->appendPath('', _MD_A_MYBLOCKSADMIN_CLONEFORM) ; |
|
176 | - break ; |
|
177 | - case 'new' : |
|
178 | - $form_title = _MD_A_MYBLOCKSADMIN_NEWFORM ; |
|
179 | - $button_value = _MD_A_MYBLOCKSADMIN_BTN_NEW ; |
|
180 | - $next_op = 'new_ok' ; |
|
181 | - // breadcrumbs |
|
182 | - $breadcrumbsObj =& AltsysBreadcrumbs::getInstance() ; |
|
183 | - $breadcrumbsObj->appendPath('', _MD_A_MYBLOCKSADMIN_NEWFORM) ; |
|
184 | - break ; |
|
185 | - case 'edit' : |
|
186 | - default : |
|
187 | - $form_title = _MD_A_MYBLOCKSADMIN_EDITFORM ; |
|
188 | - $button_value = _MD_A_MYBLOCKSADMIN_BTN_EDIT ; |
|
189 | - $next_op = 'edit_ok' ; |
|
190 | - // breadcrumbs |
|
191 | - $breadcrumbsObj =& AltsysBreadcrumbs::getInstance() ; |
|
192 | - $breadcrumbsObj->appendPath('', _MD_A_MYBLOCKSADMIN_EDITFORM) ; |
|
193 | - break ; |
|
169 | + case 'clone' : |
|
170 | + $form_title = _MD_A_MYBLOCKSADMIN_CLONEFORM ; |
|
171 | + $button_value = _MD_A_MYBLOCKSADMIN_BTN_CLONE ; |
|
172 | + $next_op = 'clone_ok' ; |
|
173 | + // breadcrumbs |
|
174 | + $breadcrumbsObj =& AltsysBreadcrumbs::getInstance() ; |
|
175 | + $breadcrumbsObj->appendPath('', _MD_A_MYBLOCKSADMIN_CLONEFORM) ; |
|
176 | + break ; |
|
177 | + case 'new' : |
|
178 | + $form_title = _MD_A_MYBLOCKSADMIN_NEWFORM ; |
|
179 | + $button_value = _MD_A_MYBLOCKSADMIN_BTN_NEW ; |
|
180 | + $next_op = 'new_ok' ; |
|
181 | + // breadcrumbs |
|
182 | + $breadcrumbsObj =& AltsysBreadcrumbs::getInstance() ; |
|
183 | + $breadcrumbsObj->appendPath('', _MD_A_MYBLOCKSADMIN_NEWFORM) ; |
|
184 | + break ; |
|
185 | + case 'edit' : |
|
186 | + default : |
|
187 | + $form_title = _MD_A_MYBLOCKSADMIN_EDITFORM ; |
|
188 | + $button_value = _MD_A_MYBLOCKSADMIN_BTN_EDIT ; |
|
189 | + $next_op = 'edit_ok' ; |
|
190 | + // breadcrumbs |
|
191 | + $breadcrumbsObj =& AltsysBreadcrumbs::getInstance() ; |
|
192 | + $breadcrumbsObj->appendPath('', _MD_A_MYBLOCKSADMIN_EDITFORM) ; |
|
193 | + break ; |
|
194 | 194 | } |
195 | 195 | |
196 | 196 | $is_custom = in_array($block->getVar('block_type'), array( 'C', 'E' )) ? true : false ; |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -require_once __DIR__.'/MyBlocksAdmin.class.php' ; |
|
3 | +require_once __DIR__.'/MyBlocksAdmin.class.php'; |
|
4 | 4 | |
5 | 5 | class MyBlocksAdminForX25 extends MyBlocksAdmin |
6 | 6 | { |
@@ -12,9 +12,9 @@ discard block |
||
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 |
||
24 | 24 | static $instance; |
25 | 25 | if (!isset($instance)) { |
26 | 26 | $instance = new MyBlocksAdminForX25(); |
27 | - $instance->construct() ; |
|
27 | + $instance->construct(); |
|
28 | 28 | } |
29 | 29 | return $instance; |
30 | 30 | } |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | $sseln = $ssel0 = $ssel1 = $ssel3 = $ssel4 = $ssel5 = $ssel7 = $ssel8 = $ssel9 = ''; |
41 | 41 | $scoln = $scol0 = $scol1 = $scol3 = $scol4 = $scol5 = $scol7 = $scol8 = $scol9 = 'unselected'; |
42 | 42 | $stextbox = 'unselected'; |
43 | - $value4extra_side = '' ; |
|
43 | + $value4extra_side = ''; |
|
44 | 44 | |
45 | 45 | if ($visible != 1) { |
46 | 46 | $sseln = " checked='checked'"; |
@@ -50,39 +50,39 @@ discard block |
||
50 | 50 | case XOOPS_SIDEBLOCK_LEFT : |
51 | 51 | $ssel0 = " checked='checked'"; |
52 | 52 | $scol0 = 'selected'; |
53 | - break ; |
|
53 | + break; |
|
54 | 54 | case XOOPS_SIDEBLOCK_RIGHT : |
55 | 55 | $ssel1 = " checked='checked'"; |
56 | 56 | $scol1 = 'selected'; |
57 | - break ; |
|
57 | + break; |
|
58 | 58 | case XOOPS_CENTERBLOCK_LEFT : |
59 | 59 | $ssel3 = " checked='checked'"; |
60 | 60 | $scol3 = 'selected'; |
61 | - break ; |
|
61 | + break; |
|
62 | 62 | case XOOPS_CENTERBLOCK_RIGHT : |
63 | 63 | $ssel4 = " checked='checked'"; |
64 | 64 | $scol4 = 'selected'; |
65 | - break ; |
|
65 | + break; |
|
66 | 66 | case XOOPS_CENTERBLOCK_CENTER : |
67 | 67 | $ssel5 = " checked='checked'"; |
68 | 68 | $scol5 = 'selected'; |
69 | - break ; |
|
69 | + break; |
|
70 | 70 | case XOOPS_CENTERBLOCK_BOTTOMLEFT : |
71 | 71 | $ssel7 = " checked='checked'"; |
72 | 72 | $scol7 = 'selected'; |
73 | - break ; |
|
73 | + break; |
|
74 | 74 | case XOOPS_CENTERBLOCK_BOTTOMRIGHT : |
75 | 75 | $ssel8 = " checked='checked'"; |
76 | 76 | $scol8 = 'selected'; |
77 | - break ; |
|
77 | + break; |
|
78 | 78 | case XOOPS_CENTERBLOCK_BOTTOM : |
79 | 79 | $ssel9 = " checked='checked'"; |
80 | 80 | $scol9 = 'selected'; |
81 | - break ; |
|
81 | + break; |
|
82 | 82 | default : |
83 | - $value4extra_side = $side ; |
|
83 | + $value4extra_side = $side; |
|
84 | 84 | $stextbox = 'selected'; |
85 | - break ; |
|
85 | + break; |
|
86 | 86 | } |
87 | 87 | } |
88 | 88 | |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | <div class='blockposition $scoln'> |
144 | 144 | <input type='radio' name='sides[$bid]' value='-1' class='blockposition' $sseln onclick='document.getElementById(\"extra_side_$bid\").value=-1;' /> |
145 | 145 | </div> |
146 | - <div style='float:"._GLOBAL_LEFT.";'>"._NONE . '</div> |
|
146 | + <div style='float:"._GLOBAL_LEFT.";'>"._NONE.'</div> |
|
147 | 147 | </td> |
148 | 148 | </tr> |
149 | 149 | </table> |
@@ -155,53 +155,53 @@ discard block |
||
155 | 155 | $bid = (int)$bid; |
156 | 156 | |
157 | 157 | //HACK by domifara |
158 | - $block = new XoopsBlock($bid) ; |
|
158 | + $block = new XoopsBlock($bid); |
|
159 | 159 | |
160 | - if (! $block->getVar('bid')) { |
|
160 | + if (!$block->getVar('bid')) { |
|
161 | 161 | // new defaults |
162 | - $bid = 0 ; |
|
163 | - $mode = 'new' ; |
|
164 | - $block->setVar('mid', 0) ; |
|
165 | - $block->setVar('block_type', 'C') ; |
|
162 | + $bid = 0; |
|
163 | + $mode = 'new'; |
|
164 | + $block->setVar('mid', 0); |
|
165 | + $block->setVar('block_type', 'C'); |
|
166 | 166 | } |
167 | 167 | |
168 | 168 | switch ($mode) { |
169 | 169 | case 'clone' : |
170 | - $form_title = _MD_A_MYBLOCKSADMIN_CLONEFORM ; |
|
171 | - $button_value = _MD_A_MYBLOCKSADMIN_BTN_CLONE ; |
|
172 | - $next_op = 'clone_ok' ; |
|
170 | + $form_title = _MD_A_MYBLOCKSADMIN_CLONEFORM; |
|
171 | + $button_value = _MD_A_MYBLOCKSADMIN_BTN_CLONE; |
|
172 | + $next_op = 'clone_ok'; |
|
173 | 173 | // breadcrumbs |
174 | - $breadcrumbsObj =& AltsysBreadcrumbs::getInstance() ; |
|
175 | - $breadcrumbsObj->appendPath('', _MD_A_MYBLOCKSADMIN_CLONEFORM) ; |
|
176 | - break ; |
|
174 | + $breadcrumbsObj = & AltsysBreadcrumbs::getInstance(); |
|
175 | + $breadcrumbsObj->appendPath('', _MD_A_MYBLOCKSADMIN_CLONEFORM); |
|
176 | + break; |
|
177 | 177 | case 'new' : |
178 | - $form_title = _MD_A_MYBLOCKSADMIN_NEWFORM ; |
|
179 | - $button_value = _MD_A_MYBLOCKSADMIN_BTN_NEW ; |
|
180 | - $next_op = 'new_ok' ; |
|
178 | + $form_title = _MD_A_MYBLOCKSADMIN_NEWFORM; |
|
179 | + $button_value = _MD_A_MYBLOCKSADMIN_BTN_NEW; |
|
180 | + $next_op = 'new_ok'; |
|
181 | 181 | // breadcrumbs |
182 | - $breadcrumbsObj =& AltsysBreadcrumbs::getInstance() ; |
|
183 | - $breadcrumbsObj->appendPath('', _MD_A_MYBLOCKSADMIN_NEWFORM) ; |
|
184 | - break ; |
|
182 | + $breadcrumbsObj = & AltsysBreadcrumbs::getInstance(); |
|
183 | + $breadcrumbsObj->appendPath('', _MD_A_MYBLOCKSADMIN_NEWFORM); |
|
184 | + break; |
|
185 | 185 | case 'edit' : |
186 | 186 | default : |
187 | - $form_title = _MD_A_MYBLOCKSADMIN_EDITFORM ; |
|
188 | - $button_value = _MD_A_MYBLOCKSADMIN_BTN_EDIT ; |
|
189 | - $next_op = 'edit_ok' ; |
|
187 | + $form_title = _MD_A_MYBLOCKSADMIN_EDITFORM; |
|
188 | + $button_value = _MD_A_MYBLOCKSADMIN_BTN_EDIT; |
|
189 | + $next_op = 'edit_ok'; |
|
190 | 190 | // breadcrumbs |
191 | - $breadcrumbsObj =& AltsysBreadcrumbs::getInstance() ; |
|
192 | - $breadcrumbsObj->appendPath('', _MD_A_MYBLOCKSADMIN_EDITFORM) ; |
|
193 | - break ; |
|
191 | + $breadcrumbsObj = & AltsysBreadcrumbs::getInstance(); |
|
192 | + $breadcrumbsObj->appendPath('', _MD_A_MYBLOCKSADMIN_EDITFORM); |
|
193 | + break; |
|
194 | 194 | } |
195 | 195 | |
196 | - $is_custom = in_array($block->getVar('block_type'), array( 'C', 'E' )) ? true : false ; |
|
197 | - $block_template =& $block->getVar('template', 'n') ; |
|
198 | - $block_template_tplset = '' ; |
|
196 | + $is_custom = in_array($block->getVar('block_type'), array('C', 'E')) ? true : false; |
|
197 | + $block_template = & $block->getVar('template', 'n'); |
|
198 | + $block_template_tplset = ''; |
|
199 | 199 | |
200 | - if (! $is_custom && $block_template) { |
|
200 | + if (!$is_custom && $block_template) { |
|
201 | 201 | // find template of the block |
202 | - $tplfile_handler =& xoops_gethandler('tplfile'); |
|
203 | - $found_templates = $tplfile_handler->find($GLOBALS['xoopsConfig']['template_set'], 'block', null, null, $block_template) ; |
|
204 | - $block_template_tplset = count($found_templates) > 0 ? $GLOBALS['xoopsConfig']['template_set'] : 'default' ; |
|
202 | + $tplfile_handler = & xoops_gethandler('tplfile'); |
|
203 | + $found_templates = $tplfile_handler->find($GLOBALS['xoopsConfig']['template_set'], 'block', null, null, $block_template); |
|
204 | + $block_template_tplset = count($found_templates) > 0 ? $GLOBALS['xoopsConfig']['template_set'] : 'default'; |
|
205 | 205 | } |
206 | 206 | //HACK by domifara |
207 | 207 | /* |
@@ -210,41 +210,41 @@ discard block |
||
210 | 210 | } |
211 | 211 | */ |
212 | 212 | $block_data = $this->preview_request + array( |
213 | - 'bid' => $bid , |
|
214 | - 'name' => $block->getVar('name', 'n') , |
|
215 | - 'title' => $block->getVar('title', 'n') , |
|
213 | + 'bid' => $bid, |
|
214 | + 'name' => $block->getVar('name', 'n'), |
|
215 | + 'title' => $block->getVar('title', 'n'), |
|
216 | 216 | 'weight' => (int)$block->getVar('weight'), |
217 | 217 | 'bcachetime' => (int)$block->getVar('bcachetime'), |
218 | 218 | 'side' => (int)$block->getVar('side'), |
219 | 219 | 'visible' => (int)$block->getVar('visible'), |
220 | - 'template' => $block_template , |
|
221 | - 'template_tplset' => $block_template_tplset , |
|
222 | - 'options' => $block->getVar('options') , |
|
223 | - 'content' => $block->getVar('content', 'n') , |
|
224 | - 'is_custom' => $is_custom , |
|
225 | - 'type' => $block->getVar('block_type') , |
|
220 | + 'template' => $block_template, |
|
221 | + 'template_tplset' => $block_template_tplset, |
|
222 | + 'options' => $block->getVar('options'), |
|
223 | + 'content' => $block->getVar('content', 'n'), |
|
224 | + 'is_custom' => $is_custom, |
|
225 | + 'type' => $block->getVar('block_type'), |
|
226 | 226 | 'ctype' => $block->getVar('c_type') |
227 | - ) ; |
|
227 | + ); |
|
228 | 228 | |
229 | 229 | $block4assign = array( |
230 | - 'name_raw' => $block_data['name'] , |
|
231 | - 'title_raw' => $block_data['title'] , |
|
232 | - 'content_raw' => $block_data['content'] , |
|
233 | - 'cell_position' => $this->renderCell4BlockPosition($block_data) , |
|
234 | - 'cell_module_link' => $this->renderCell4BlockModuleLink($block_data) , |
|
235 | - 'cell_group_perm' => $this->renderCell4BlockReadGroupPerm($block_data) , |
|
236 | - 'cell_options' => $this->renderCell4BlockOptions($block_data) , |
|
230 | + 'name_raw' => $block_data['name'], |
|
231 | + 'title_raw' => $block_data['title'], |
|
232 | + 'content_raw' => $block_data['content'], |
|
233 | + 'cell_position' => $this->renderCell4BlockPosition($block_data), |
|
234 | + 'cell_module_link' => $this->renderCell4BlockModuleLink($block_data), |
|
235 | + 'cell_group_perm' => $this->renderCell4BlockReadGroupPerm($block_data), |
|
236 | + 'cell_options' => $this->renderCell4BlockOptions($block_data), |
|
237 | 237 | 'content_preview' => $this->previewContent($block_data) |
238 | - ) + $block_data ; |
|
238 | + ) + $block_data; |
|
239 | 239 | |
240 | 240 | // display |
241 | - require_once XOOPS_TRUST_PATH.'/libs/altsys/class/D3Tpl.class.php' ; |
|
242 | - $tpl = new D3Tpl() ; |
|
241 | + require_once XOOPS_TRUST_PATH.'/libs/altsys/class/D3Tpl.class.php'; |
|
242 | + $tpl = new D3Tpl(); |
|
243 | 243 | //dhtml |
244 | 244 | include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
245 | 245 | |
246 | - if ($block_data['ctype']=='H' || empty($block_data['ctype'])) { |
|
247 | - $editor_configs=array(); |
|
246 | + if ($block_data['ctype'] == 'H' || empty($block_data['ctype'])) { |
|
247 | + $editor_configs = array(); |
|
248 | 248 | $editor_configs['name'] = 'content_block'; |
249 | 249 | $editor_configs['value'] = $block_data['content']; |
250 | 250 | $editor_configs['rows'] = 20; |
@@ -254,12 +254,12 @@ discard block |
||
254 | 254 | $editor_configs['editor'] = xoops_getModuleOption('blocks_editor', 'system'); |
255 | 255 | $form = new XoopsFormEditor('', 'textarea_content', $editor_configs); |
256 | 256 | $rendered = $form->render(); |
257 | - $tpl->assign('altsys_x25_dhtmltextarea', $rendered) ; |
|
257 | + $tpl->assign('altsys_x25_dhtmltextarea', $rendered); |
|
258 | 258 | } else { |
259 | 259 | $form = new XoopsFormDhtmlTextArea('', 'textarea_content', $block_data['content'], 80, 20); |
260 | 260 | $rendered = $form->render(); |
261 | - $rendered = '<div id="textarea_content_bbcode_buttons_pre" style="display:block;">'.str_replace(array( '<textarea', '</textarea><br />' ), array( '</div><textarea', '</textarea><div id="textarea_content_bbcode_buttons_post" style="display:block;">' ), $rendered) . '</div>' ; |
|
262 | - $tpl->assign('altsys_x25_dhtmltextarea', $rendered) ; |
|
261 | + $rendered = '<div id="textarea_content_bbcode_buttons_pre" style="display:block;">'.str_replace(array('<textarea', '</textarea><br />'), array('</div><textarea', '</textarea><div id="textarea_content_bbcode_buttons_post" style="display:block;">'), $rendered).'</div>'; |
|
262 | + $tpl->assign('altsys_x25_dhtmltextarea', $rendered); |
|
263 | 263 | } |
264 | 264 | |
265 | 265 | $tpl->assign(array( |
@@ -274,91 +274,91 @@ discard block |
||
274 | 274 | 'submit_button' => $button_value, |
275 | 275 | 'common_fck_installed' => file_exists(XOOPS_ROOT_PATH.'/common/fckeditor/fckeditor.js'), |
276 | 276 | 'gticket_hidden' => $GLOBALS['xoopsGTicket']->getTicketHtml(__LINE__, 1800, 'myblocksadmin') |
277 | - )) ; |
|
277 | + )); |
|
278 | 278 | //HACK by domifara |
279 | - $tpl->display('db:altsys_main_myblocksadmin_edit_4x25.html') ; |
|
279 | + $tpl->display('db:altsys_main_myblocksadmin_edit_4x25.html'); |
|
280 | 280 | |
281 | - return ; |
|
281 | + return; |
|
282 | 282 | } |
283 | 283 | public function fetchRequest4Block($bid) |
284 | 284 | { |
285 | 285 | $bid = (int)$bid; |
286 | - (method_exists('MyTextSanitizer', 'sGetInstance') and $myts =& MyTextSanitizer::sGetInstance()) || $myts =& MyTextSanitizer::getInstance() ; |
|
286 | + (method_exists('MyTextSanitizer', 'sGetInstance') and $myts = & MyTextSanitizer::sGetInstance()) || $myts = & MyTextSanitizer::getInstance(); |
|
287 | 287 | |
288 | 288 | if (@$_POST['extra_sides'][$bid] > 0) { |
289 | 289 | $_POST['sides'][$bid] = (int)$_POST['extra_sides'][$bid]; |
290 | 290 | } |
291 | 291 | |
292 | 292 | if (@$_POST['sides'][$bid] < 0) { |
293 | - $visible = 0 ; |
|
294 | - $_POST['sides'][$bid] = -1 ; |
|
293 | + $visible = 0; |
|
294 | + $_POST['sides'][$bid] = -1; |
|
295 | 295 | } else { |
296 | - $visible = 1 ; |
|
296 | + $visible = 1; |
|
297 | 297 | } |
298 | 298 | |
299 | 299 | return array( |
300 | - 'bid' => $bid , |
|
300 | + 'bid' => $bid, |
|
301 | 301 | 'side' => (int)(@$_POST['sides'][$bid]), |
302 | 302 | 'weight' => (int)(@$_POST['weights'][$bid]), |
303 | - 'visible' => $visible , |
|
304 | - 'title' => $myts->stripSlashesGPC(@$_POST['titles'][$bid]) , |
|
305 | - 'content' => $myts->stripSlashesGPC(@$_POST['textarea_content']) , |
|
306 | - 'ctype' => preg_replace('/[^A-Z]/', '', @$_POST['ctypes'][$bid]) , |
|
303 | + 'visible' => $visible, |
|
304 | + 'title' => $myts->stripSlashesGPC(@$_POST['titles'][$bid]), |
|
305 | + 'content' => $myts->stripSlashesGPC(@$_POST['textarea_content']), |
|
306 | + 'ctype' => preg_replace('/[^A-Z]/', '', @$_POST['ctypes'][$bid]), |
|
307 | 307 | 'bcachetime' => (int)(@$_POST['bcachetimes'][$bid]), |
308 | - 'bmodule' => is_array(@$_POST['bmodules'][$bid]) ? $_POST['bmodules'][$bid] : array( 0 ) , |
|
309 | - 'bgroup' => is_array(@$_POST['bgroups'][$bid]) ? $_POST['bgroups'][$bid] : array() , |
|
308 | + 'bmodule' => is_array(@$_POST['bmodules'][$bid]) ? $_POST['bmodules'][$bid] : array(0), |
|
309 | + 'bgroup' => is_array(@$_POST['bgroups'][$bid]) ? $_POST['bgroups'][$bid] : array(), |
|
310 | 310 | 'options' => is_array(@$_POST['options'][$bid]) ? $_POST['options'][$bid] : array() |
311 | - ) ; |
|
311 | + ); |
|
312 | 312 | } |
313 | 313 | |
314 | 314 | public function previewContent($block_data) |
315 | 315 | { |
316 | 316 | $bid = (int)$block_data['bid']; |
317 | 317 | |
318 | - if (! $block_data['is_custom']) { |
|
319 | - return '' ; |
|
318 | + if (!$block_data['is_custom']) { |
|
319 | + return ''; |
|
320 | 320 | } |
321 | 321 | if (empty($this->preview_request)) { |
322 | - return '' ; |
|
322 | + return ''; |
|
323 | 323 | } |
324 | 324 | |
325 | 325 | //HACK by domifara |
326 | 326 | //TODO : need no hook block at this |
327 | - $block = new XoopsBlock($bid) ; |
|
327 | + $block = new XoopsBlock($bid); |
|
328 | 328 | |
329 | 329 | if ($block->getVar('mid')) { |
330 | - return '' ; |
|
330 | + return ''; |
|
331 | 331 | } |
332 | 332 | |
333 | - $block->setVar('title', $block_data['title']) ; |
|
334 | - $block->setVar('content', $block_data['content']) ; |
|
333 | + $block->setVar('title', $block_data['title']); |
|
334 | + $block->setVar('content', $block_data['content']); |
|
335 | 335 | |
336 | - restore_error_handler() ; |
|
337 | - $original_level = error_reporting(E_ALL) ; |
|
336 | + restore_error_handler(); |
|
337 | + $original_level = error_reporting(E_ALL); |
|
338 | 338 | |
339 | 339 | // $ret = $block->getContent( 'S' , $block_data['ctype'] ) ; |
340 | 340 | |
341 | 341 | $c_type = $block_data['ctype']; |
342 | 342 | if ($c_type == 'H') { |
343 | - $ret = str_replace('{X_SITEURL}', XOOPS_URL . '/', $block->getVar('content', 'N')); |
|
343 | + $ret = str_replace('{X_SITEURL}', XOOPS_URL.'/', $block->getVar('content', 'N')); |
|
344 | 344 | } elseif ($c_type == 'P') { |
345 | 345 | ob_start(); |
346 | 346 | echo eval($block->getVar('content', 'N')); |
347 | 347 | $content = ob_get_contents(); |
348 | 348 | ob_end_clean(); |
349 | - $ret = str_replace('{X_SITEURL}', XOOPS_URL . '/', $content); |
|
349 | + $ret = str_replace('{X_SITEURL}', XOOPS_URL.'/', $content); |
|
350 | 350 | } elseif ($c_type == 'S') { |
351 | - (method_exists('MyTextSanitizer', 'sGetInstance') and $myts =& MyTextSanitizer::sGetInstance()) || $myts =& MyTextSanitizer::getInstance(); |
|
352 | - $content = str_replace('{X_SITEURL}', XOOPS_URL . '/', $block->getVar('content', 'N')); |
|
351 | + (method_exists('MyTextSanitizer', 'sGetInstance') and $myts = & MyTextSanitizer::sGetInstance()) || $myts = & MyTextSanitizer::getInstance(); |
|
352 | + $content = str_replace('{X_SITEURL}', XOOPS_URL.'/', $block->getVar('content', 'N')); |
|
353 | 353 | $ret = $myts->displayTarea($content, 1, 1); |
354 | 354 | } else { |
355 | - (method_exists('MyTextSanitizer', 'sGetInstance') and $myts =& MyTextSanitizer::sGetInstance()) || $myts =& MyTextSanitizer::getInstance(); |
|
356 | - $content = str_replace('{X_SITEURL}', XOOPS_URL . '/', $block->getVar('content', 'N')); |
|
355 | + (method_exists('MyTextSanitizer', 'sGetInstance') and $myts = & MyTextSanitizer::sGetInstance()) || $myts = & MyTextSanitizer::getInstance(); |
|
356 | + $content = str_replace('{X_SITEURL}', XOOPS_URL.'/', $block->getVar('content', 'N')); |
|
357 | 357 | $ret = $myts->displayTarea($content, 1, 0); |
358 | 358 | } |
359 | 359 | |
360 | - error_reporting($original_level) ; |
|
360 | + error_reporting($original_level); |
|
361 | 361 | |
362 | - return $ret ; |
|
362 | + return $ret; |
|
363 | 363 | } |
364 | 364 | } |
@@ -2,7 +2,7 @@ discard block |
||
2 | 2 | |
3 | 3 | // notification handler for D3 modules |
4 | 4 | |
5 | -require_once XOOPS_ROOT_PATH . '/include/notification_functions.php' ; |
|
5 | +require_once XOOPS_ROOT_PATH.'/include/notification_functions.php'; |
|
6 | 6 | |
7 | 7 | class D3NotificationHandler |
8 | 8 | { |
@@ -10,68 +10,68 @@ discard block |
||
10 | 10 | //function &getInstance( $conn = null ) |
11 | 11 | public static function &getInstance($conn = null) |
12 | 12 | { |
13 | - static $instance ; |
|
14 | - if (! isset($instance)) { |
|
15 | - $instance = new D3NotificationHandler() ; |
|
13 | + static $instance; |
|
14 | + if (!isset($instance)) { |
|
15 | + $instance = new D3NotificationHandler(); |
|
16 | 16 | } |
17 | - return $instance ; |
|
17 | + return $instance; |
|
18 | 18 | } |
19 | 19 | |
20 | 20 | |
21 | 21 | public function getMailTemplateDir($mydirname, $mytrustdirname = '') |
22 | 22 | { |
23 | - global $xoopsConfig ; |
|
23 | + global $xoopsConfig; |
|
24 | 24 | |
25 | - $mydirpath = XOOPS_ROOT_PATH.'/modules/'.$mydirname ; |
|
26 | - $mytrustdirpath = XOOPS_TRUST_PATH.'/modules/'.$mytrustdirname ; |
|
27 | - $language = empty($xoopsConfig['language']) ? 'english' : $xoopsConfig['language'] ; |
|
25 | + $mydirpath = XOOPS_ROOT_PATH.'/modules/'.$mydirname; |
|
26 | + $mytrustdirpath = XOOPS_TRUST_PATH.'/modules/'.$mytrustdirname; |
|
27 | + $language = empty($xoopsConfig['language']) ? 'english' : $xoopsConfig['language']; |
|
28 | 28 | |
29 | 29 | $search_paths = array( |
30 | - "$mydirpath/language/$language/mail_template/" , |
|
31 | - "$mytrustdirpath/language/$language/mail_template/" , |
|
32 | - "$mydirpath/language/english/mail_template/" , |
|
30 | + "$mydirpath/language/$language/mail_template/", |
|
31 | + "$mytrustdirpath/language/$language/mail_template/", |
|
32 | + "$mydirpath/language/english/mail_template/", |
|
33 | 33 | "$mytrustdirpath/language/english/mail_template/" |
34 | - ) ; |
|
34 | + ); |
|
35 | 35 | |
36 | - $mail_template_dir = "$mytrustdirpath/language/english/mail_template/" ; |
|
36 | + $mail_template_dir = "$mytrustdirpath/language/english/mail_template/"; |
|
37 | 37 | foreach ($search_paths as $path) { |
38 | 38 | if (file_exists($path)) { |
39 | - $mail_template_dir = $path ; |
|
40 | - break ; |
|
39 | + $mail_template_dir = $path; |
|
40 | + break; |
|
41 | 41 | } |
42 | 42 | } |
43 | 43 | |
44 | - return $mail_template_dir ; |
|
44 | + return $mail_template_dir; |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | |
48 | - public function triggerEvent($mydirname, $mytrustdirname, $category, $item_id, $event, $extra_tags=array(), $user_list=array(), $omit_user_id=null) |
|
48 | + public function triggerEvent($mydirname, $mytrustdirname, $category, $item_id, $event, $extra_tags = array(), $user_list = array(), $omit_user_id = null) |
|
49 | 49 | { |
50 | - $module_hanlder =& xoops_gethandler('module') ; |
|
51 | - $module =& $module_hanlder->getByDirname($mydirname) ; |
|
50 | + $module_hanlder = & xoops_gethandler('module'); |
|
51 | + $module = & $module_hanlder->getByDirname($mydirname); |
|
52 | 52 | |
53 | - $notification_handler =& xoops_gethandler('notification') ; |
|
54 | - $mail_template_dir = $this->getMailTemplateDir($mydirname, $mytrustdirname) ; |
|
53 | + $notification_handler = & xoops_gethandler('notification'); |
|
54 | + $mail_template_dir = $this->getMailTemplateDir($mydirname, $mytrustdirname); |
|
55 | 55 | |
56 | 56 | // calling a delegate before |
57 | 57 | if (class_exists('XCube_DelegateUtils')) { |
58 | - $force_return = false ; |
|
59 | - XCube_DelegateUtils::raiseEvent('D3NotificationHandler.Trigger', new XCube_Ref($category), new XCube_Ref($event), new XCube_Ref($item_id), new XCube_Ref($extra_tags), new XCube_Ref($module), new XCube_Ref($user_list), new XCube_Ref($omit_user_id), $module->getInfo('notification'), new XCube_Ref($force_return), new XCube_Ref($mail_template_dir), $mydirname, $mytrustdirname) ; |
|
58 | + $force_return = false; |
|
59 | + XCube_DelegateUtils::raiseEvent('D3NotificationHandler.Trigger', new XCube_Ref($category), new XCube_Ref($event), new XCube_Ref($item_id), new XCube_Ref($extra_tags), new XCube_Ref($module), new XCube_Ref($user_list), new XCube_Ref($omit_user_id), $module->getInfo('notification'), new XCube_Ref($force_return), new XCube_Ref($mail_template_dir), $mydirname, $mytrustdirname); |
|
60 | 60 | if ($force_return) { |
61 | - return ; |
|
61 | + return; |
|
62 | 62 | } |
63 | 63 | } |
64 | 64 | |
65 | - $mid = $module->getVar('mid') ; |
|
65 | + $mid = $module->getVar('mid'); |
|
66 | 66 | |
67 | 67 | // Check if event is enabled |
68 | - $config_handler =& xoops_gethandler('config'); |
|
69 | - $mod_config =& $config_handler->getConfigsByCat(0, $mid); |
|
68 | + $config_handler = & xoops_gethandler('config'); |
|
69 | + $mod_config = & $config_handler->getConfigsByCat(0, $mid); |
|
70 | 70 | if (empty($mod_config['notification_enabled'])) { |
71 | 71 | return false; |
72 | 72 | } |
73 | - $category_info =& notificationCategoryInfo($category, $mid); |
|
74 | - $event_info =& notificationEventInfo($category, $event, $mid); |
|
73 | + $category_info = & notificationCategoryInfo($category, $mid); |
|
74 | + $event_info = & notificationEventInfo($category, $event, $mid); |
|
75 | 75 | if (!in_array(notificationGenerateConfig($category_info, $event_info, 'option_name'), $mod_config['notification_events']) && empty($event_info['invisible'])) { |
76 | 76 | return false; |
77 | 77 | } |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | $mode_criteria->add(new Criteria('not_mode', XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE), 'OR'); |
95 | 95 | $mode_criteria->add(new Criteria('not_mode', XOOPS_NOTIFICATION_MODE_SENDONCETHENWAIT), 'OR'); |
96 | 96 | $criteria->add($mode_criteria); |
97 | - $notifications =& $notification_handler->getObjects($criteria); |
|
97 | + $notifications = & $notification_handler->getObjects($criteria); |
|
98 | 98 | if (empty($notifications)) { |
99 | 99 | return; |
100 | 100 | } |
@@ -103,11 +103,11 @@ discard block |
||
103 | 103 | $tags = array(); |
104 | 104 | // {X_ITEM_NAME} {X_ITEM_URL} {X_ITEM_TYPE} from lookup_func are disabled |
105 | 105 | $tags['X_MODULE'] = $module->getVar('name', 'n'); |
106 | - $tags['X_MODULE_URL'] = XOOPS_URL . '/modules/' . $module->getVar('dirname') . '/'; |
|
106 | + $tags['X_MODULE_URL'] = XOOPS_URL.'/modules/'.$module->getVar('dirname').'/'; |
|
107 | 107 | $tags['X_NOTIFY_CATEGORY'] = $category; |
108 | 108 | $tags['X_NOTIFY_EVENT'] = $event; |
109 | 109 | |
110 | - $template = $event_info['mail_template'] . '.tpl'; |
|
110 | + $template = $event_info['mail_template'].'.tpl'; |
|
111 | 111 | $subject = $event_info['mail_subject']; |
112 | 112 | |
113 | 113 | if ($user_list) { |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | // user-specific tags |
122 | 122 | //$tags['X_UNSUBSCRIBE_URL'] = 'TODO'; |
123 | 123 | // TODO: don't show unsubscribe link if it is 'one-time' ?? |
124 | - $tags['X_UNSUBSCRIBE_URL'] = XOOPS_URL . '/notifications.php'; |
|
124 | + $tags['X_UNSUBSCRIBE_URL'] = XOOPS_URL.'/notifications.php'; |
|
125 | 125 | $tags = array_merge($tags, $extra_tags); |
126 | 126 | |
127 | 127 | $notification->notifyUser($mail_template_dir, $template, $subject, $tags); |
@@ -4,7 +4,7 @@ discard block |
||
4 | 4 | class AltsysBreadcrumbs |
5 | 5 | { |
6 | 6 | |
7 | - public $paths = array() ; |
|
7 | + public $paths = array(); |
|
8 | 8 | |
9 | 9 | public function __construct() |
10 | 10 | { |
@@ -13,29 +13,29 @@ discard block |
||
13 | 13 | //function &getInstance() |
14 | 14 | public static function &getInstance() |
15 | 15 | { |
16 | - static $instance ; |
|
17 | - if (! isset($instance)) { |
|
18 | - $instance = new AltsysBreadcrumbs() ; |
|
16 | + static $instance; |
|
17 | + if (!isset($instance)) { |
|
18 | + $instance = new AltsysBreadcrumbs(); |
|
19 | 19 | } |
20 | - return $instance ; |
|
20 | + return $instance; |
|
21 | 21 | } |
22 | 22 | |
23 | 23 | public function getXoopsBreadcrumbs() |
24 | 24 | { |
25 | - $ret = array() ; |
|
25 | + $ret = array(); |
|
26 | 26 | foreach ($this->paths as $val) { |
27 | 27 | // delayed language constant |
28 | 28 | if (substr($val['name'], 0, 1) == '_' && defined($val['name'])) { |
29 | 29 | $ret[] = array( |
30 | - 'url' => $val['url'] , |
|
30 | + 'url' => $val['url'], |
|
31 | 31 | 'name' => constant($val['name']) |
32 | - ) ; |
|
32 | + ); |
|
33 | 33 | } else { |
34 | - $ret[] = $val ; |
|
34 | + $ret[] = $val; |
|
35 | 35 | } |
36 | 36 | } |
37 | - unset($ret[count($ret) - 1 ]['url']) ; |
|
38 | - return $ret ; |
|
37 | + unset($ret[count($ret) - 1]['url']); |
|
38 | + return $ret; |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | // all data should be escaped |
@@ -44,19 +44,19 @@ discard block |
||
44 | 44 | if (is_array($url_or_path)) { |
45 | 45 | if (empty($url_or_path['name'])) { |
46 | 46 | // multiple paths |
47 | - $this->paths = array_merge($this->paths, $url_or_path) ; |
|
47 | + $this->paths = array_merge($this->paths, $url_or_path); |
|
48 | 48 | } else { |
49 | 49 | // array format (just a path) |
50 | - $this->paths[] = $url_or_path ; |
|
50 | + $this->paths[] = $url_or_path; |
|
51 | 51 | } |
52 | 52 | } else { |
53 | 53 | // separate format |
54 | - $this->paths[] = array( 'url' => $url_or_path , 'name' => $name ) ; |
|
54 | + $this->paths[] = array('url' => $url_or_path, 'name' => $name); |
|
55 | 55 | } |
56 | 56 | } |
57 | 57 | |
58 | 58 | public function hasPaths() |
59 | 59 | { |
60 | - return ! empty($this->paths) ; |
|
60 | + return !empty($this->paths); |
|
61 | 61 | } |
62 | 62 | } |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | // $Id: MyBlocksAdminForXCL21.class.php ,ver 0.0.7.1 2011/01/27 16:10:00 domifara Exp $ |
3 | 3 | |
4 | -require_once __DIR__.'/MyBlocksAdmin.class.php' ; |
|
4 | +require_once __DIR__.'/MyBlocksAdmin.class.php'; |
|
5 | 5 | |
6 | 6 | class MyBlocksAdminForXCL21 extends MyBlocksAdmin |
7 | 7 | { |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | static $instance; |
19 | 19 | if (!isset($instance)) { |
20 | 20 | $instance = new MyBlocksAdminForXCL21(); |
21 | - $instance->construct() ; |
|
21 | + $instance->construct(); |
|
22 | 22 | } |
23 | 23 | return $instance; |
24 | 24 | } |
@@ -29,24 +29,24 @@ discard block |
||
29 | 29 | public function renderCell4BlockOptions($block_data) |
30 | 30 | { |
31 | 31 | if ($this->target_dirname && substr($this->target_dirname, 0, 1) != '_') { |
32 | - $langman =& D3LanguageManager::getInstance() ; |
|
33 | - $langman->read('admin.php', $this->target_dirname) ; |
|
32 | + $langman = & D3LanguageManager::getInstance(); |
|
33 | + $langman->read('admin.php', $this->target_dirname); |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | $bid = (int)$block_data['bid']; |
37 | 37 | |
38 | 38 | //HACK by domifara |
39 | 39 | // $block = new XoopsBlock( $bid ) ; |
40 | - $handler =& xoops_gethandler('block'); |
|
41 | - $block =& $handler->create(false) ; |
|
42 | - $block->load($bid) ; |
|
40 | + $handler = & xoops_gethandler('block'); |
|
41 | + $block = & $handler->create(false); |
|
42 | + $block->load($bid); |
|
43 | 43 | |
44 | - $legacy_block =& Legacy_Utils::createBlockProcedure($block) ; |
|
45 | - return $legacy_block->getOptionForm() ; |
|
44 | + $legacy_block = & Legacy_Utils::createBlockProcedure($block); |
|
45 | + return $legacy_block->getOptionForm(); |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | public function checkFck() |
49 | 49 | { |
50 | - return (! altsysUtils::isInstalledXclHtmleditor() && file_exists(XOOPS_ROOT_PATH.'/common/fckeditor/fckeditor.js')); |
|
50 | + return (!altsysUtils::isInstalledXclHtmleditor() && file_exists(XOOPS_ROOT_PATH.'/common/fckeditor/fckeditor.js')); |
|
51 | 51 | } |
52 | 52 | } |
@@ -1,6 +1,6 @@ discard block |
||
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 |
||
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 |
||
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 | } |
@@ -1,63 +1,63 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -eval(' function xoops_module_install_'.$mydirname.'( $module ) { return altsys_oninstall_base( $module , "'.$mydirname.'" ) ; } ') ; |
|
3 | +eval(' function xoops_module_install_'.$mydirname.'( $module ) { return altsys_oninstall_base( $module , "'.$mydirname.'" ) ; } '); |
|
4 | 4 | |
5 | 5 | |
6 | -if (! function_exists('altsys_oninstall_base')) { |
|
6 | +if (!function_exists('altsys_oninstall_base')) { |
|
7 | 7 | function altsys_oninstall_base($module, $mydirname) |
8 | 8 | { |
9 | 9 | // transations on module install |
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.ModuleInstall.' . ucfirst($mydirname) . '.Success', 'altsys_message_append_oninstall') ; |
|
17 | - $ret = array() ; |
|
15 | + $root = & XCube_Root::getSingleton(); |
|
16 | + $root->mDelegateManager->add('Legacy.Admin.Event.ModuleInstall.'.ucfirst($mydirname).'.Success', 'altsys_message_append_oninstall'); |
|
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 | /*************** BEGIN ALTSYS SPECIFIC PART ******************/ |
28 | 28 | // set weight=0 |
29 | - $db->queryF('UPDATE ' . $db->prefix('modules') . " SET weight=0 WHERE mid=$mid") ; |
|
29 | + $db->queryF('UPDATE '.$db->prefix('modules')." SET weight=0 WHERE mid=$mid"); |
|
30 | 30 | /*************** END ALTSYS SPECIFIC PART ******************/ |
31 | 31 | |
32 | 32 | // TABLES (loading mysql.sql) |
33 | - $sql_file_path = __DIR__.'/sql/mysql.sql' ; |
|
34 | - $prefix_mod = $db->prefix() . '_' . $mydirname ; |
|
33 | + $sql_file_path = __DIR__.'/sql/mysql.sql'; |
|
34 | + $prefix_mod = $db->prefix().'_'.$mydirname; |
|
35 | 35 | if (file_exists($sql_file_path)) { |
36 | - $ret[] = 'SQL file found at <b>' . htmlspecialchars($sql_file_path) . '</b>.<br /> Creating tables...'; |
|
36 | + $ret[] = 'SQL file found at <b>'.htmlspecialchars($sql_file_path).'</b>.<br /> Creating tables...'; |
|
37 | 37 | |
38 | 38 | if (file_exists(XOOPS_ROOT_PATH.'/class/database/oldsqlutility.php')) { |
39 | - include_once XOOPS_ROOT_PATH.'/class/database/oldsqlutility.php' ; |
|
40 | - $sqlutil = new OldSqlUtility ; |
|
39 | + include_once XOOPS_ROOT_PATH.'/class/database/oldsqlutility.php'; |
|
40 | + $sqlutil = new OldSqlUtility; |
|
41 | 41 | } else { |
42 | - include_once XOOPS_ROOT_PATH.'/class/database/sqlutility.php' ; |
|
43 | - $sqlutil = new SqlUtility ; |
|
42 | + include_once XOOPS_ROOT_PATH.'/class/database/sqlutility.php'; |
|
43 | + $sqlutil = new SqlUtility; |
|
44 | 44 | } |
45 | 45 | |
46 | - $sql_query = trim(file_get_contents($sql_file_path)) ; |
|
47 | - $sqlutil->splitMySqlFile($pieces, $sql_query) ; |
|
48 | - $created_tables = array() ; |
|
46 | + $sql_query = trim(file_get_contents($sql_file_path)); |
|
47 | + $sqlutil->splitMySqlFile($pieces, $sql_query); |
|
48 | + $created_tables = array(); |
|
49 | 49 | foreach ($pieces as $piece) { |
50 | - $prefixed_query = $sqlutil->prefixQuery($piece, $prefix_mod) ; |
|
51 | - if (! $prefixed_query) { |
|
52 | - $ret[] = 'Invalid SQL <b>' . htmlspecialchars($piece) . '</b><br />'; |
|
53 | - return false ; |
|
50 | + $prefixed_query = $sqlutil->prefixQuery($piece, $prefix_mod); |
|
51 | + if (!$prefixed_query) { |
|
52 | + $ret[] = 'Invalid SQL <b>'.htmlspecialchars($piece).'</b><br />'; |
|
53 | + return false; |
|
54 | 54 | } |
55 | - if (! $db->query($prefixed_query[0])) { |
|
56 | - $ret[] = '<b>'.htmlspecialchars($db->error()).'</b><br />' ; |
|
55 | + if (!$db->query($prefixed_query[0])) { |
|
56 | + $ret[] = '<b>'.htmlspecialchars($db->error()).'</b><br />'; |
|
57 | 57 | //var_dump( $db->error() ) ; |
58 | - return false ; |
|
58 | + return false; |
|
59 | 59 | } else { |
60 | - if (! in_array($prefixed_query[4], $created_tables)) { |
|
60 | + if (!in_array($prefixed_query[4], $created_tables)) { |
|
61 | 61 | $ret[] = 'Table <b>'.htmlspecialchars($prefix_mod.'_'.$prefixed_query[4]).'</b> created.<br />'; |
62 | 62 | $created_tables[] = $prefixed_query[4]; |
63 | 63 | } else { |
@@ -68,33 +68,33 @@ discard block |
||
68 | 68 | } |
69 | 69 | |
70 | 70 | // TEMPLATES |
71 | - $tplfile_handler =& xoops_gethandler('tplfile') ; |
|
72 | - $tpl_path = __DIR__.'/templates' ; |
|
73 | - if ($handler = @opendir($tpl_path . '/')) { |
|
71 | + $tplfile_handler = & xoops_gethandler('tplfile'); |
|
72 | + $tpl_path = __DIR__.'/templates'; |
|
73 | + if ($handler = @opendir($tpl_path.'/')) { |
|
74 | 74 | while (($file = readdir($handler)) !== false) { |
75 | 75 | if (substr($file, 0, 1) == '.') { |
76 | - continue ; |
|
76 | + continue; |
|
77 | 77 | } |
78 | - $file_path = $tpl_path . '/' . $file ; |
|
78 | + $file_path = $tpl_path.'/'.$file; |
|
79 | 79 | if (is_file($file_path)) { |
80 | 80 | $mtime = (int)(@filemtime($file_path)); |
81 | - $tplfile =& $tplfile_handler->create() ; |
|
82 | - $tplfile->setVar('tpl_source', file_get_contents($file_path), true) ; |
|
83 | - $tplfile->setVar('tpl_refid', $mid) ; |
|
84 | - $tplfile->setVar('tpl_tplset', 'default') ; |
|
85 | - $tplfile->setVar('tpl_file', $mydirname . '_' . $file) ; |
|
86 | - $tplfile->setVar('tpl_desc', '', true) ; |
|
87 | - $tplfile->setVar('tpl_module', $mydirname) ; |
|
88 | - $tplfile->setVar('tpl_lastmodified', $mtime) ; |
|
89 | - $tplfile->setVar('tpl_lastimported', 0) ; |
|
90 | - $tplfile->setVar('tpl_type', 'module') ; |
|
91 | - if (! $tplfile_handler->insert($tplfile)) { |
|
81 | + $tplfile = & $tplfile_handler->create(); |
|
82 | + $tplfile->setVar('tpl_source', file_get_contents($file_path), true); |
|
83 | + $tplfile->setVar('tpl_refid', $mid); |
|
84 | + $tplfile->setVar('tpl_tplset', 'default'); |
|
85 | + $tplfile->setVar('tpl_file', $mydirname.'_'.$file); |
|
86 | + $tplfile->setVar('tpl_desc', '', true); |
|
87 | + $tplfile->setVar('tpl_module', $mydirname); |
|
88 | + $tplfile->setVar('tpl_lastmodified', $mtime); |
|
89 | + $tplfile->setVar('tpl_lastimported', 0); |
|
90 | + $tplfile->setVar('tpl_type', 'module'); |
|
91 | + if (!$tplfile_handler->insert($tplfile)) { |
|
92 | 92 | $ret[] = '<span style="color:#ff0000;">ERROR: Could not insert template <b>'.htmlspecialchars($mydirname.'_'.$file).'</b> to the database.</span><br />'; |
93 | 93 | } else { |
94 | - $tplid = $tplfile->getVar('tpl_id') ; |
|
94 | + $tplid = $tplfile->getVar('tpl_id'); |
|
95 | 95 | $ret[] = 'Template <b>'.htmlspecialchars($mydirname.'_'.$file).'</b> added to the database. (ID: <b>'.$tplid.'</b>)<br />'; |
96 | - require_once XOOPS_TRUST_PATH.'/libs/altsys/include/altsys_functions.php' ; |
|
97 | - altsys_clear_templates_c() ; |
|
96 | + require_once XOOPS_TRUST_PATH.'/libs/altsys/include/altsys_functions.php'; |
|
97 | + altsys_clear_templates_c(); |
|
98 | 98 | // generate compiled file |
99 | 99 | /*include_once XOOPS_ROOT_PATH.'/class/xoopsblock.php' ; |
100 | 100 | include_once XOOPS_ROOT_PATH.'/class/template.php' ; |
@@ -106,20 +106,20 @@ discard block |
||
106 | 106 | } |
107 | 107 | } |
108 | 108 | } |
109 | - closedir($handler) ; |
|
109 | + closedir($handler); |
|
110 | 110 | } |
111 | - include_once XOOPS_ROOT_PATH.'/class/xoopsblock.php' ; |
|
112 | - include_once XOOPS_ROOT_PATH.'/class/template.php' ; |
|
113 | - xoops_template_clear_module_cache($mid) ; |
|
111 | + include_once XOOPS_ROOT_PATH.'/class/xoopsblock.php'; |
|
112 | + include_once XOOPS_ROOT_PATH.'/class/template.php'; |
|
113 | + xoops_template_clear_module_cache($mid); |
|
114 | 114 | |
115 | - return true ; |
|
115 | + return true; |
|
116 | 116 | } |
117 | 117 | |
118 | 118 | function altsys_message_append_oninstall(&$module_obj, &$log) |
119 | 119 | { |
120 | 120 | if (is_array(@$GLOBALS['ret'])) { |
121 | 121 | foreach ($GLOBALS['ret'] as $message) { |
122 | - $log->add(strip_tags($message)) ; |
|
122 | + $log->add(strip_tags($message)); |
|
123 | 123 | } |
124 | 124 | } |
125 | 125 |
@@ -1,61 +1,61 @@ |
||
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'); |