Project

General

Profile

« Previous | Next » 

Revision 2098

Added by darkviper over 10 years ago

! activate class Translate for all addons in admin/ (except pages/)
! class.admin >> add translation of the current theme to Translate

View differences:

reload.php
59 59
	$aErrors = array();
60 60
// check user permissions for admintools (redirect users with wrong permissions)
61 61
	$admin = new admin('Admintools', 'admintools', false, false);
62
    $oTrans = Translate::getInstance();
63
    $oTrans->enableAddon('admin\\addons');
64

  
62 65
	if ($admin->get_permission('admintools'))
63 66
	{
64 67
		require_once(WB_PATH . '/framework/functions.php');
......
79 82
				if($ct->isError()) {
80 83
					$aErrors[] = $ct->getError();
81 84
				}else {
82
					$aMsg[] = $TEXT['THEME_COPY_CURRENT'].' :: '.$MESSAGE['GENERIC_COMPARE'];
85
					$aMsg[] = $oTrans->TEXT_THEME_COPY_CURRENT.' :: '.$oTrans->MESSAGE_GENERIC_COMPARE;
83 86
				}
84 87
				unset($ct);
85 88
		// ---------------------------
......
89 92
				require(dirname(__FILE__).'/CopyThemeHtt.php');
90 93
				$x = CopyThemeHtt::doImport($aFileList);
91 94
				if(is_null($x)) {
92
					$aMsg[] = $TEXT['THEME_IMPORT_HTT'].' :: '.$MESSAGE['GENERIC_COMPARE'];
95
					$aMsg[] = $oTrans->TEXT_THEME_IMPORT_HTT.' :: '.$oTrans->MESSAGE_GENERIC_COMPARE;
93 96
				}else {
94 97
					$aErrors = array_merge($aErrors, $x);
95 98
				}
......
105 108
						case 'language':
106 109
						// reload all addons from given type
107 110
							if(ReloadAddonLoop($sType)) {
108
								$aMsg[] = $MESSAGE['ADDON_'.strtoupper($sType).'S_RELOADED'];
111
                                $aMsg[] = $oTrans->{'MESSAGE_ADDON_'.strtoupper($sType).'S_RELOADED'};
109 112
							}else {
110
								$aErrors[] = $MESSAGE['ADDON_ERROR_RELOAD'];
113
								$aErrors[] = $oTrans->MESSAGE_ADDON_ERROR_RELOAD;
111 114
							}
112 115
							break;
113 116
						default:
114
							$aErrors[] = $MESSAGE['GENERIC_NOT_COMPARE'].' ['.$sType.']';
117
							$aErrors[] = $oTrans->MESSAGE_GENERIC_NOT_COMPARE.' ['.$sType.']';
115 118
							break;
116 119
					}
117 120
				}
118 121
			}else {
119 122
		// ---------------------------
120
				$aErrors[] = $MESSAGE['ADDON_ERROR_RELOAD'];
123
				$aErrors[] = $oTrans->MESSAGE_ADDON_ERROR_RELOAD;
121 124
			}
122 125
		}else { // invalid FTAN
123
			$aErrors[] = $MESSAGE['GENERIC_SECURITY_ACCESS'];
126
			$aErrors[] = $oTrans->MESSAGE_GENERIC_SECURITY_ACCESS;
124 127
		}
125 128
	}else { // no permission
126
		$aErrors[] = $MESSAGE['ADMIN_INSUFFICIENT_PRIVELLIGES'];
129
		$aErrors[] = $oTrans->MESSAGE_ADMIN_INSUFFICIENT_PRIVELLIGES;
127 130
	}
128 131
	if(sizeof($aErrors) > 0)  {
129 132
// output error message

Also available in: Unified diff