Revision 1778
Added by Dietmar about 12 years ago
- fixed empty template variable in admin/start
index.php | ||
---|---|---|
58 | 58 |
} |
59 | 59 |
// --------------------------------------- |
60 | 60 |
// check if it is neccessary to start the uograde-script |
61 |
$msg = ''; |
|
61 |
$msg = ''; |
|
62 |
$msg .= (is_readable(WB_PATH.'/install/')) ? $MESSAGE['START_INSTALL_DIR_EXISTS'].'<br />' : $msg; |
|
63 |
$msg .= (is_readable(WB_PATH.'/upgrade-script.php')) ? $MESSAGE['START_UPGRADE_SCRIPT_EXISTS'].'<br />' : ''; |
|
64 |
//$msg .= ''.$MESSAGE['START_UPGRADE_SCRIPT_EXISTS'].'<br />'; |
|
62 | 65 |
|
63 | 66 |
// --------------------------------------- |
64 | 67 |
// check if it is neccessary to start the uograde-script |
... | ... | |
79 | 82 |
exit; |
80 | 83 |
} |
81 | 84 |
} |
82 |
$msg .= ''.$MESSAGE['START_UPGRADE_SCRIPT_EXISTS'].'<br />'; |
|
83 | 85 |
} |
84 | 86 |
// --------------------------------------- |
85 | 87 |
// workout to upgrade the groups system_permissions |
... | ... | |
129 | 131 |
'CURRENT_USER' => $MESSAGE['START_CURRENT_USER'], |
130 | 132 |
'DISPLAY_NAME' => $admin->get_display_name(), |
131 | 133 |
'DISPLAY_WARNING' => '', |
134 |
'WARNING' => '', |
|
132 | 135 |
'ADMIN_URL' => ADMIN_URL, |
133 | 136 |
'WB_URL' => WB_URL, |
134 | 137 |
'THEME_URL' => THEME_URL, |
... | ... | |
137 | 140 |
) |
138 | 141 |
); |
139 | 142 |
|
140 |
|
|
141 | 143 |
// Insert permission values into the template object |
142 | 144 |
$oTpl->set_block('main_block', 'show_pages_block', 'show_pages'); |
143 | 145 |
if($admin->get_permission('pages') != true) |
... | ... | |
195 | 197 |
$oTpl->parse('show_preferences', 'show_preferences_block', true); |
196 | 198 |
} |
197 | 199 |
|
198 |
$oTpl->set_block('main_block', 'show_install_block', 'show_install'); |
|
199 |
if($admin->ami_group_member('1') != true) |
|
200 |
{ |
|
201 |
$oTpl->set_block('show_install', ''); |
|
202 |
} else { |
|
203 |
$oTpl->parse('show_install', 'show_install_block', true); |
|
204 |
} |
|
205 | 200 |
|
206 | 201 |
/* |
207 | 202 |
if($admin->get_permission('pages') != true) |
... | ... | |
230 | 225 |
} |
231 | 226 |
*/ |
232 | 227 |
|
233 |
$msg .= (file_exists(WB_PATH.'/install/')) ? $MESSAGE['START_INSTALL_DIR_EXISTS'] : ''; |
|
234 | 228 |
|
235 |
// Check if installation directory still exists |
|
236 |
if(file_exists(WB_PATH.'/install/') || file_exists(WB_PATH.'/upgrade-script.php') ) { |
|
237 |
// Check if user is part of Adminstrators group |
|
238 |
if($admin->get_user_id()==1) |
|
239 |
{ |
|
240 |
$oTpl->set_var('WARNING', $msg ); |
|
241 |
} else { |
|
242 |
$oTpl->set_var('DISPLAY_WARNING', 'display:none;'); |
|
243 |
} |
|
229 |
$oTpl->set_block('main_block', 'show_install_block', 'show_install'); |
|
230 |
if($admin->get_user_id() != 1) |
|
231 |
{ |
|
232 |
$oTpl->parse('show_install', ''); |
|
244 | 233 |
} else { |
245 |
$oTpl->set_var('DISPLAY_WARNING', 'display:none;'); |
|
234 |
|
|
235 |
// Check if installation directory still exists |
|
236 |
if(file_exists(WB_PATH.'/install/') || file_exists(WB_PATH.'/upgrade-script.php') ) { |
|
237 |
// Check if user is part of Adminstrators group |
|
238 |
if($admin->get_user_id()==1) |
|
239 |
{ |
|
240 |
$oTpl->set_var('WARNING', $msg ); |
|
241 |
} else { |
|
242 |
$oTpl->set_var('DISPLAY_WARNING', 'display:none;'); |
|
243 |
} |
|
244 |
} else { |
|
245 |
$oTpl->set_var('DISPLAY_WARNING', 'display:none;'); |
|
246 |
} |
|
247 |
|
|
248 |
$oTpl->parse('show_install', 'show_install_block', true); |
|
246 | 249 |
} |
247 | 250 |
|
248 | 251 |
// Insert "Add-ons" section overview (pretty complex compared to normal) |
Also available in: Unified diff