Revision 1789
Added by Dietmar about 12 years ago
upgrade-script.php | ||
---|---|---|
66 | 66 |
'[ADMIN]/themes/', |
67 | 67 |
); |
68 | 68 |
|
69 |
if(version_compare(WB_REVISION, '1785', '<'))
|
|
69 |
if(version_compare(WB_REVISION, '1788', '<'))
|
|
70 | 70 |
{ |
71 | 71 |
$filesRemove['0'] = array( |
72 | 72 |
|
... | ... | |
735 | 735 |
|
736 | 736 |
if($bDebugModus) { |
737 | 737 |
echo implode(PHP_EOL,$aDebugMessage); |
738 |
$aDebugMessage = array(); |
|
738 | 739 |
} |
740 |
|
|
741 |
/********************************************************** |
|
742 |
* Modify Administrator on groups table |
|
743 |
*/ |
|
744 |
echo "<h4>Update group Administrator on table groups</h4>"; |
|
745 |
$aDebugMessage[] = "<span>Modify Administrator on groups table</span>"; |
|
746 |
$sModulePermissions = ''; |
|
747 |
$sTemplatePermissions = ''; |
|
748 |
$sSystemPermissions = 'access,addons,admintools,admintools_view,groups,groups_add,groups_delete,groups_modify,groups_view,'; |
|
749 |
$sSystemPermissions .= 'languages,languages_install,languages_uninstall,languages_view,media,media_create,media_delete,media_rename,media_upload,media_view,'; |
|
750 |
$sSystemPermissions .= 'modules,modules_advanced,modules_install,modules_uninstall,modules_view,pages,pages_add,pages_add_l0,pages_delete,pages_intro,pages_modify,pages_settings,pages_view,'; |
|
751 |
$sSystemPermissions .= 'preferences,preferences_view,settings,settings_advanced,settings_basic,settings_view,templates,templates_install,templates_uninstall,templates_view,users,users_add,users_delete,users_modify,users_view'; |
|
752 |
|
|
753 |
$sql = 'UPDATE `'.TABLE_PREFIX.'groups` '; |
|
754 |
$sql .= 'SET `name` = \'Administrators\', '; |
|
755 |
$sql .= '`system_permissions` = \''.$sSystemPermissions.'\', '; |
|
756 |
$sql .= '`module_permissions` = \''.$sModulePermissions.'\', '; |
|
757 |
$sql .= '`template_permissions` = \''.$sTemplatePermissions.'\' '; |
|
758 |
$sql .= 'WHERE `group_id` = \'1\' '; |
|
759 |
$aDebugMessage[] = ($database->query($sql)) ? " $OK<br />" : " $FAIL!<br />"; |
|
760 |
|
|
761 |
if($bDebugModus) { |
|
762 |
echo implode(PHP_EOL,$aDebugMessage); |
|
763 |
$aDebugMessage = array(); |
|
764 |
} |
|
739 | 765 |
echo '</div>'; |
740 | 766 |
|
741 | 767 |
} |
... | ... | |
779 | 805 |
echo '<h4>Upgrade media directory '.MEDIA_DIRECTORY.'/ index.php protect files</h4>'; |
780 | 806 |
$array = rebuildFolderProtectFile($dir); |
781 | 807 |
if( sizeof( $array ) ){ |
782 |
print '<span><strong>Upgrade '.sizeof( $array ).' directory '.MEDIA_DIRECTORY.'/ protect files</strong></span>'." $OK<br />";
|
|
808 |
echo '<span><strong>Upgrade '.sizeof( $array ).' directory '.MEDIA_DIRECTORY.'/ protect files</strong></span>'." $OK<br />";
|
|
783 | 809 |
} else { |
784 |
print '<span><strong>Upgrade directory '.MEDIA_DIRECTORY.'/ protect files</strong></span>'." $FAIL!<br />";
|
|
785 |
print implode ('<br />',$array);
|
|
810 |
echo '<span><strong>Upgrade directory '.MEDIA_DIRECTORY.'/ protect files</strong></span>'." $FAIL!<br />";
|
|
811 |
echo implode ('<br />',$array);
|
|
786 | 812 |
} |
787 | 813 |
|
788 | 814 |
/********************************************************** |
... | ... | |
796 | 822 |
$sPagePath = (defined('PAGES_DIRECTORY') && (PAGES_DIRECTORY != '') ? PAGES_DIRECTORY : ''); |
797 | 823 |
$msg = rebuild_all_accessfiles(); |
798 | 824 |
|
799 |
print implode ('<br />',$msg);
|
|
825 |
echo implode ('<br />',$msg);
|
|
800 | 826 |
echo '</div>'; |
801 | 827 |
/* ***************************************************************************** |
802 | 828 |
* - check for deprecated / never needed files |
Also available in: Unified diff
! update Group Permission, add module_advanced
! upgrade-script will be updating Adminitrator Group