Project

General

Profile

« Previous | Next » 

Revision 1669

Added by darkviper over 12 years ago

little fixes in /admin/addons/reload.php

View differences:

branches/2.8.x/CHANGELOG
11 11
! = Update/Change
12 12
===============================================================================
13 13

  
14
17 Apr-2012 Build 1669 Dietmar Woellbrink (Luisehahne)
15
# little fixes in /admin/addons/reload.php
14 16
17 Apr-2012 Build 1668 Dietmar Woellbrink (Luisehahne)
15 17
! settigs.php add fields dev_infos and page_icon_dir
16 18
+ add developer info to footer
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', '1668');
54
if(!defined('REVISION')) define('REVISION', '1669');
55 55
if(!defined('SP')) define('SP', '');
branches/2.8.x/wb/admin/addons/reload.php
20 20
	function ReloadAddonLoop($sType)
21 21
	{
22 22
		global $database;
23
		$database->query('DELETE FROM `'.TABLE_PREFIX.'addons` WHERE `type`=\''.$sType.'\'');
23
		$sql = 'DELETE FROM `'.TABLE_PREFIX.'addons` WHERE `type`=\''.$sType.'\'';
24 24
		try{
25
			if(!$database->query($sql)) {
26
				throw new Exception('database error');
27
			}
25 28
			$oIterator = new DirectoryIterator(WB_PATH.'/'.$sType.'s');
26 29
			$_Function = 'load_'.$sType;
27 30
			foreach ($oIterator as $oFileinfo) {
......
91 94
			{
92 95
				$aReloadType = (isset($_POST['reload']) && is_array($_POST['reload'])) ? $_POST['reload'] : array();
93 96
				foreach($aReloadType as $sType) {
97
					$sType = rtrim($sType, 's');
94 98
					switch($sType) {
95
						case 'modules':
96
						// reload all modules
97
							if(ReloadAddonLoop('module')) {
98
								$aMsg[] = $MESSAGE['ADDON_MODULES_RELOADED'];
99
						case 'module':
100
						case 'template':
101
						case 'language':
102
						// reload all addons from given type
103
							if(ReloadAddonLoop($sType)) {
104
								$aMsg[] = $MESSAGE['ADDON_'.strtoupper($sType).'S_RELOADED'];
99 105
							}else {
100 106
								$aErrors[] = $MESSAGE['ADDON_ERROR_RELOAD'];
101 107
							}
102 108
							break;
103
						case 'templates':
104
						// reload all templates
105
							if(ReloadAddonLoop('template')) {
106
								$aMsg[] = $MESSAGE['ADDON_TEMPLATES_RELOADED'];
107
							}else {
108
								$aErrors[] = $MESSAGE['ADDON_ERROR_RELOAD'];
109
							}
110
							break;
111
						case 'languages':
112
						// reload all languages
113
							if(ReloadAddonLoop('language')) {
114
								$aMsg[] = $MESSAGE['ADDON_LANGUAGES_RELOADED'];
115
							}else {
116
								$aErrors[] = $MESSAGE['ADDON_ERROR_RELOAD'];
117
							}
118
							break;
119 109
						default:
120 110
							$aErrors[] = $MESSAGE['GENERIC_NOT_COMPARE'].' ['.$sType.']';
121 111
							break;

Also available in: Unified diff