Project

General

Profile

« Previous | Next » 

Revision 1913

Added by Dietmar over 11 years ago

! /admin/addons/ change to new Translate class

View differences:

details.php
4 4
 * @category        admin
5 5
 * @package         modules
6 6
 * @author          Ryan Djurovich, WebsiteBaker Project
7
 * @copyright       2009-2012, WebsiteBaker Org. e.V.
8
 * @link			http://www.websitebaker2.org/
7
 * @copyright       2009-2013, WebsiteBaker Org. e.V.
8
 * @link            http://www.websitebaker.org/
9 9
 * @license         http://www.gnu.org/licenses/gpl.html
10 10
 * @platform        WebsiteBaker 2.8.x
11 11
 * @requirements    PHP 5.2.2 and higher
12 12
 * @version         $Id$
13
 * @filesource		$HeadURL$
13
 * @filesource      $HeadURL$
14 14
 * @lastmodified    $Date$
15 15
 *
16 16
 */
......
29 29
// After check print the header
30 30
$admin->print_header();
31 31

  
32
$mLang = ModLanguage::getInstance();
33
$mLang->setLanguage(ADMIN_PATH.'/addons/languages/', LANGUAGE, DEFAULT_LANGUAGE);
32
//$mLang = ModLanguage::getInstance();
33
//$mLang->setLanguage(ADMIN_PATH.'/addons/languages/', LANGUAGE, DEFAULT_LANGUAGE);
34
$mLang = Translate::getinstance();
35
$mLang->enableAddon('admin\addons');
34 36

  
35 37
if(!isset($_POST['file']) OR $_POST['file'] == "") {
36 38
	$admin->print_error($MESSAGE['GENERIC_FORGOT_OPTIONS']);
......
116 118

  
117 119
switch ($module['function']) {
118 120
	case NULL:
119
		$type_name = $TEXT['UNKNOWN'];
121
		$type_name = $mLang->TEXT_UNKNOWN;
120 122
		break;
121 123
	case 'page':
122
		$type_name = $TEXT['PAGE'];
124
		$type_name = $mLang->TEXT_PAGE;
123 125
		break;
124 126
	case 'wysiwyg':
125
		$type_name = $TEXT['WYSIWYG_EDITOR'];
127
		$type_name = $mLang->TEXT_WYSIWYG_EDITOR;
126 128
		break;
127 129
	case 'tool':
128
		$type_name = $TEXT['ADMINISTRATION_TOOL'];
130
		$type_name = $mLang->TEXT_ADMINISTRATION_TOOL;
129 131
		break;
130 132
	case 'admin':
131
		$type_name = $TEXT['ADMIN'];
133
		$type_name = $mLang->TEXT_ADMIN;
132 134
		break;
133 135
	case 'administration':
134
		$type_name = $TEXT['ADMINISTRATION'];
136
		$type_name = $mLang->TEXT_ADMINISTRATION;
135 137
		break;
136 138
	case 'snippet':
137
		$type_name = $TEXT['CODE_SNIPPET'];
139
		$type_name = $mLang->TEXT_CODE_SNIPPET;
138 140
		break;
139 141
	default:
140
		$type_name = $TEXT['UNKNOWN'];
142
		$type_name = $mLang->TEXT_UNKNOWN;
141 143
}
142 144
$template->set_var('TYPE', $type_name);
143 145

  
144
//// Insert language headings
145
//$template->set_var(array(
146
//								'HEADING_MODULE_DETAILS' => $HEADING['MODULE_DETAILS']
147
//								)
148
//						);
149
//// Insert language text and messages
150
//$template->set_var(array(
151
//								'TEXT_NAME' => $TEXT['NAME'],
152
//								'TEXT_TYPE' => $TEXT['TYPE'],
153
//								'TEXT_AUTHOR' => $TEXT['AUTHOR'],
154
//								'TEXT_VERSION' => $TEXT['VERSION'],
155
//								'TEXT_DESIGNED_FOR' => $TEXT['DESIGNED_FOR'],
156
//								'TEXT_DESCRIPTION' => $TEXT['DESCRIPTION'],
157
//								'TEXT_BACK' => $TEXT['BACK']
158
//								)
159
//						);
160
//
146

  
161 147
// Parse module object
162 148
$template->parse('main', 'main_block', false);
163 149
$template->pparse('output', 'page');

Also available in: Unified diff