Revision 1838
Added by Luisehahne almost 13 years ago
| branches/2.8.x/CHANGELOG | ||
|---|---|---|
| 13 | 13 |
|
| 14 | 14 |
|
| 15 | 15 |
|
| 16 |
13 Dez-2012 Build 1838 Dietmar Woellbrink (Luisehahne) |
|
| 17 |
! groups management now completely html valide |
|
| 16 | 18 |
13 Dez-2012 Build 1837 Dietmar Woellbrink (Luisehahne) |
| 17 | 19 |
! runtime optimized in /admin/pages/index.php |
| 18 | 20 |
12 Dez-2012 Build 1836 Dietmar Woellbrink (Luisehahne) |
| branches/2.8.x/wb/admin/groups/groups_mask.inc.php | ||
|---|---|---|
| 16 | 16 |
|
| 17 | 17 |
/* -------------------------------------------------------- */ |
| 18 | 18 |
// Must include code to stop this file being accessed directly |
| 19 |
if(defined('WB_PATH') == false)
|
|
| 20 |
{
|
|
| 21 |
// Stop this file being access directly |
|
| 22 |
die('<h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2>');
|
|
| 19 |
if(!defined('WB_URL')) {
|
|
| 20 |
require_once(dirname(dirname(dirname(__FILE__))).'/framework/globalExceptionHandler.php'); |
|
| 21 |
throw new IllegalFileException(); |
|
| 23 | 22 |
} |
| 24 | 23 |
/* -------------------------------------------------------- */ |
| 25 | 24 |
|
| ... | ... | |
| 85 | 84 |
'GROUP_ID' => $rec_group['group_id'], |
| 86 | 85 |
'GROUP_NAME' => $rec_group['name'], |
| 87 | 86 |
'FORM_NAME_GROUPMASK' => 'frm_modify_group', |
| 87 |
'GROUPNAME_DISABLED' => '', |
|
| 88 | 88 |
)); |
| 89 | 89 |
} else {
|
| 90 | 90 |
// set changed checkboxes and prepare db data |
| branches/2.8.x/wb/admin/groups/upgradePermissions.php | ||
|---|---|---|
| 17 | 17 |
|
| 18 | 18 |
/* -------------------------------------------------------- */ |
| 19 | 19 |
// Must include code to stop this file being accessed directly |
| 20 |
if(defined('WB_PATH') == false)
|
|
| 21 |
{
|
|
| 22 |
// Stop this file being access directly |
|
| 23 |
die('<h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2>');
|
|
| 20 |
if(!defined('WB_URL')) {
|
|
| 21 |
require_once(dirname(dirname(dirname(__FILE__))).'/framework/globalExceptionHandler.php'); |
|
| 22 |
throw new IllegalFileException(); |
|
| 24 | 23 |
} |
| 25 | 24 |
/* -------------------------------------------------------- */ |
| 26 | 25 |
|
| 27 |
|
|
| 28 | 26 |
/** |
| 29 | 27 |
* |
| 30 | 28 |
* |
| ... | ... | |
| 59 | 57 |
'modules_install' => 0, |
| 60 | 58 |
'modules_uninstall' => 0, |
| 61 | 59 |
'modules_view' => 0, |
| 60 |
'modules_advanced' => 0, |
|
| 62 | 61 |
'pages' => 0, |
| 63 | 62 |
'pages_add' => 0, |
| 64 | 63 |
'pages_add_l0' => 0, |
| ... | ... | |
| 366 | 365 |
function setSystemCheckboxes( &$tpl, $admin, $permissions = null ) |
| 367 | 366 |
{
|
| 368 | 367 |
$array = array(); |
| 368 |
$aSytemArray = getSystemDefaultPermissions(); |
|
| 369 | 369 |
if(!is_array($permissions)) |
| 370 | 370 |
{
|
| 371 | 371 |
$array = convertStringToKeyArray($permissions); |
| ... | ... | |
| 382 | 382 |
foreach($array AS $key => $value) |
| 383 | 383 |
{
|
| 384 | 384 |
// if(strpos($key,'_view')) { continue; }
|
| 385 |
if(array_key_exists($key, $aPermissions)) { continue; }
|
|
| 385 |
$checked=''; |
|
| 386 |
if(array_key_exists($key, $aPermissions)) {
|
|
| 387 |
continue; |
|
| 388 |
} |
|
| 386 | 389 |
$tpl->set_var('SYS_NAME', "system_permissions[$key]" );
|
| 387 | 390 |
$tpl->set_var('SYS_VALUE', 1 );
|
| 388 | 391 |
$tpl->parse('hidden_advanced_permission_list', 'show_cmd_hidden_advanced_permission_list_block', true);
|
| 389 |
$checked = ''; |
|
| 390 | 392 |
} |
| 391 | 393 |
|
| 392 | 394 |
} else {
|
| 393 |
// set baisc modus
|
|
| 395 |
// set basic modus
|
|
| 394 | 396 |
$tpl->set_var('SYS_NAME', "none" );
|
| 395 | 397 |
$tpl->set_var('SYS_VALUE', '' );
|
| 396 | 398 |
$tpl->parse('hidden_permission_list', 'show_cmd_hidden_permission_list_block', true);
|
| 397 | 399 |
$array = !is_array($array) ? array() : $array; |
| 398 | 400 |
foreach($array AS $key => $value) |
| 399 | 401 |
{
|
| 400 |
if(strpos($key,'_view')) { continue; }
|
|
| 402 |
$checked=''; |
|
| 403 |
if(strpos($key,'_view')) {
|
|
| 404 |
continue; |
|
| 405 |
} |
|
| 401 | 406 |
$tpl->set_var('SYS_NAME', "system_permissions[$key]" );
|
| 402 | 407 |
$tpl->set_var('SYS_VALUE', 1 );
|
| 403 | 408 |
$tpl->parse('hidden_permission_list', 'show_cmd_hidden_permission_list_block', true);
|
| 404 |
$checked = ''; |
|
| 405 | 409 |
} |
| 406 | 410 |
} |
| 407 | 411 |
reset($array); |
| ... | ... | |
| 411 | 415 |
$checked=''; |
| 412 | 416 |
if( $key != '' ) |
| 413 | 417 |
{
|
| 414 |
$checked = ' checked="checked"';
|
|
| 418 |
$checked = 'checked="checked"'; |
|
| 415 | 419 |
} |
| 416 | 420 |
$tpl->set_var('VALUE', 1);
|
| 417 |
$tpl->set_var($key.'_checked', $checked);
|
|
| 421 |
$tpl->set_var(($key.'_checked'), $checked);
|
|
| 418 | 422 |
} |
| 419 | 423 |
|
| 424 |
// clean html |
|
| 425 |
$result = array_diff_key($aSytemArray, $array); |
|
| 426 |
foreach($result AS $key => $value) |
|
| 427 |
{
|
|
| 428 |
$tpl->set_var('VALUE', 1);
|
|
| 429 |
$tpl->set_var(($key.'_checked'), ''); |
|
| 430 |
} |
|
| 431 |
|
|
| 420 | 432 |
return $array; |
| 421 | 433 |
} |
| 422 | 434 |
|
| branches/2.8.x/wb/admin/skel/themes/htt/groups_form.htt | ||
|---|---|---|
| 29 | 29 |
<div class="mbox curved h65 floatbox"> |
| 30 | 30 |
<h4>{TEXT_FILESYSTEM_PERMISSIONS}</h4>
|
| 31 | 31 |
<span> |
| 32 |
<input type="checkbox" name="system_permissions[pages_view]" id="pages_view" value="1" {pages_view_checked} />
|
|
| 32 |
<input id="pages_view" type="checkbox" value="1" name="system_permissions[pages_view]" {pages_view_checked} />
|
|
| 33 | 33 |
<label for="pages_view">{MENU_PAGES}</label>
|
| 34 | 34 |
</span> |
| 35 | 35 |
<span> |
| 36 |
<input type="checkbox" name="system_permissions[media_view]" id="media_view" value="1" {media_view_checked} />
|
|
| 36 |
<input id="media_view" type="checkbox" value="1" name="system_permissions[media_view]" {media_view_checked}/>
|
|
| 37 | 37 |
<label for="media_view">{MENU_MEDIA}</label>
|
| 38 | 38 |
</span> |
| 39 | 39 |
<span> |
| 40 |
<input type="checkbox" name="system_permissions[modules_view]" id="modules_view" value="1" {modules_view_checked} />
|
|
| 40 |
<input id="modules_view" type="checkbox" value="1" name="system_permissions[modules_view]" {modules_view_checked} />
|
|
| 41 | 41 |
<label for="modules_view">{MENU_MODULES}</label>
|
| 42 | 42 |
</span> |
| 43 | 43 |
<span> |
| 44 |
<input type="checkbox" name="system_permissions[templates_view]" id="templates_view" value="1" {templates_view_checked} />
|
|
| 44 |
<input id="templates_view" type="checkbox" value="1" name="system_permissions[templates_view]" {templates_view_checked} />
|
|
| 45 | 45 |
<label for="templates_view">{MENU_TEMPLATES}</label>
|
| 46 | 46 |
</span> |
| 47 | 47 |
<span> |
| 48 |
<input type="checkbox" name="system_permissions[languages_view]" id="languages_view" value="1" {languages_view_checked} />
|
|
| 48 |
<input id="languages_view" type="checkbox" value="1" name="system_permissions[languages_view]" {languages_view_checked} />
|
|
| 49 | 49 |
<label for="languages_view">{MENU_LANGUAGES}</label>
|
| 50 | 50 |
</span> |
| 51 | 51 |
<span> |
| 52 |
<input type="checkbox" name="system_permissions[settings_view]" id="settings_view" value="1" {settings_view_checked} />
|
|
| 52 |
<input id="settings_view" type="checkbox" value="1" name="system_permissions[settings_view]" {settings_view_checked} />
|
|
| 53 | 53 |
<label for="settings_view">{MENU_SETTINGS}</label>
|
| 54 | 54 |
</span> |
| 55 | 55 |
<span> |
| 56 |
<input type="checkbox" name="system_permissions[admintools_view]" id="admintools_view" value="1" {admintools_view_checked} />
|
|
| 56 |
<input id="admintools_view" type="checkbox" value="1" name="system_permissions[admintools_view]" {admintools_view_checked} />
|
|
| 57 | 57 |
<label for="admintools_view">{MENU_ADMINTOOLS}</label>
|
| 58 | 58 |
</span> |
| 59 | 59 |
<span> |
| 60 |
<input type="checkbox" name="system_permissions[users_view]" id="users_view" value="1" {users_view_checked} />
|
|
| 60 |
<input id="users_view" type="checkbox" value="1" name="system_permissions[users_view]" {users_view_checked} />
|
|
| 61 | 61 |
<label for="users_view">{MENU_USERS}</label>
|
| 62 | 62 |
</span> |
| 63 | 63 |
<span> |
| 64 |
<input type="checkbox" name="system_permissions[groups_view]" id="groups_view" value="1" {groups_view_checked} />
|
|
| 64 |
<input id="groups_view" type="checkbox" value="1" name="system_permissions[groups_view]" {groups_view_checked} />
|
|
| 65 | 65 |
<label for="groups_view">{MENU_GROUPS}</label>
|
| 66 | 66 |
</span> |
| 67 | 67 |
<span> |
| 68 |
<input type="checkbox" name="system_permissions[preferences_view]" id="preferences_view" value="1" {preferences_view_checked} />
|
|
| 68 |
<input id="preferences_view" type="checkbox" value="1" name="system_permissions[preferences_view]" {preferences_view_checked} />
|
|
| 69 | 69 |
<label for="preferences_view">{MENU_USER_PREFERENCES}</label>
|
| 70 | 70 |
</span> |
| 71 | 71 |
</div> |
| ... | ... | |
| 219 | 219 |
<input name="system_permissions[templates_uninstall]" id="templates_uninstall" type="checkbox" value="1" {templates_uninstall_checked} />
|
| 220 | 220 |
<label for="templates_uninstall">{TEXT_DELETE}</label>
|
| 221 | 221 |
</li> |
| 222 |
<li class="c100"> |
|
| 223 |
<label for="templates"> </label> |
|
| 224 |
</li> |
|
| 222 |
<li class="c100" style="line-height: 2em;"> </li> |
|
| 225 | 223 |
</ul> |
| 226 | 224 |
</div> |
| 227 | 225 |
</div> |
| ... | ... | |
| 243 | 241 |
<input name="system_permissions[languages_uninstall]" id="languages_uninstall" type="checkbox" value="1" {languages_uninstall_checked} />
|
| 244 | 242 |
<label for="languages_uninstall">{TEXT_DELETE}</label>
|
| 245 | 243 |
</li> |
| 246 |
<li class="c100"> |
|
| 247 |
<label for="languages"> </label> |
|
| 248 |
</li> |
|
| 244 |
<li class="c100" style="line-height: 2em;"> </li> |
|
| 249 | 245 |
</ul> |
| 250 | 246 |
</div> |
| 251 | 247 |
</div> |
| branches/2.8.x/wb/admin/interface/version.php | ||
|---|---|---|
| 51 | 51 |
|
| 52 | 52 |
// check if defined to avoid errors during installation (redirect to admin panel fails if PHP error/warnings are enabled) |
| 53 | 53 |
if(!defined('VERSION')) define('VERSION', '2.8.3');
|
| 54 |
if(!defined('REVISION')) define('REVISION', '1837');
|
|
| 54 |
if(!defined('REVISION')) define('REVISION', '1838');
|
|
| 55 | 55 |
if(!defined('SP')) define('SP', '');
|
Also available in: Unified diff
groups management now completely html valide