Changeset 79 in ExiteCMS8
- Timestamp:
- 08/30/11 20:48:14 (9 months ago)
- Location:
- trunk
- Files:
-
- 10 added
- 1 deleted
- 50 edited
-
exitecms/bootstrap.php (modified) (2 diffs)
-
exitecms/classes/controller/bootstrap.php (modified) (6 diffs)
-
exitecms/classes/exitecms.php (modified) (1 diff)
-
exitecms/classes/exitecms/forms.php (modified) (22 diffs)
-
exitecms/classes/exitecms/messages.php (modified) (1 diff)
-
exitecms/classes/exitecms/module.php (added)
-
exitecms/classes/exitecms/theme.php (modified) (8 diffs)
-
exitecms/classes/exitecms/widget.php (modified) (1 diff)
-
exitecms/classes/exitecmsexception.php (modified) (1 diff)
-
exitecms/classes/module.php (added)
-
exitecms/classes/theme.php (modified) (3 diffs)
-
exitecms/classes/view.php (modified) (1 diff)
-
exitecms/config/config.php (modified) (8 diffs)
-
exitecms/config/db.php (deleted)
-
exitecms/config/version.php (modified) (1 diff)
-
exitecms/config/website.1.php (modified) (7 diffs)
-
exitecms/views/forms/add.php (modified) (1 diff)
-
exitecms/views/forms/delete.php (modified) (1 diff)
-
exitecms/views/forms/edit.php (modified) (1 diff)
-
exitecms/views/forms/info.php (modified) (1 diff)
-
exitecms/views/forms/list.php (modified) (2 diffs)
-
exitecms/views/forms/tree.php (modified) (2 diffs)
-
modules/exitecms/classes/controller/dashboard.php (modified) (4 diffs)
-
modules/exitecms/classes/controller/datetime.php (modified) (2 diffs)
-
modules/exitecms/classes/controller/install.php (modified) (6 diffs)
-
modules/exitecms/classes/controller/links.php (modified) (9 diffs)
-
modules/exitecms/classes/controller/linkset.php (modified) (32 diffs)
-
modules/exitecms/classes/controller/locales.php (modified) (5 diffs)
-
modules/exitecms/classes/controller/messages.php (modified) (1 diff)
-
modules/exitecms/classes/controller/module.php (added)
-
modules/exitecms/classes/controller/modules.php (added)
-
modules/exitecms/classes/controller/pages.php (modified) (32 diffs)
-
modules/exitecms/classes/controller/phpinfo.php (modified) (1 diff)
-
modules/exitecms/classes/controller/security.php (modified) (12 diffs)
-
modules/exitecms/classes/controller/sites.php (modified) (16 diffs)
-
modules/exitecms/classes/controller/templates.php (modified) (28 diffs)
-
modules/exitecms/classes/controller/themes.php (modified) (25 diffs)
-
modules/exitecms/classes/controller/users.php (modified) (9 diffs)
-
modules/exitecms/classes/model/page.php (modified) (2 diffs)
-
modules/exitecms/classes/model/site.php (modified) (1 diff)
-
modules/exitecms/classes/model/template.php (modified) (1 diff)
-
modules/exitecms/config (added)
-
modules/exitecms/config/info.php (added)
-
modules/exitecms/lang/en/linkset.php (modified) (2 diffs)
-
modules/exitecms/lang/en/modules.php (added)
-
modules/exitecms/lang/en/themes.php (modified) (4 diffs)
-
modules/exitecms/views/forms/dashboard.php (modified) (4 diffs)
-
modules/exitecms/views/forms/datetime.php (modified) (1 diff)
-
modules/exitecms/views/forms/layout.php (modified) (1 diff)
-
modules/exitecms/views/forms/layout_selector.php (modified) (1 diff)
-
modules/exitecms/views/forms/linkset.php (modified) (1 diff)
-
modules/linksets/classes/controller/module.php (added)
-
modules/linksets/classes/controller/multi.php (modified) (1 diff)
-
modules/linksets/classes/controller/single.php (modified) (1 diff)
-
modules/linksets/config (added)
-
modules/linksets/config/info.php (added)
-
public/assets/themes (modified) (1 prop)
-
public/index.php (modified) (3 diffs)
-
themes/theme_exitecms/assets/css/global.css (modified) (1 diff)
-
themes/theme_exitecms/config/info.php (modified) (2 diffs)
-
themes/theme_exitecms/views/widgets/404.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/exitecms/bootstrap.php
r49 r79 4 4 require_once COREPATH.'bootstrap.php'; 5 5 6 /** 7 * Set the timezone to what you need it to be. 8 */ 9 date_default_timezone_set('UTC'); 10 11 /** 12 * Set the encoding you would like to use. 13 */ 14 Fuel::$encoding = 'UTF-8'; 15 16 6 // Add classes you want to override here 17 7 Autoloader::add_classes(array( 18 8 'View' => APPPATH.'classes/view.php', … … 22 12 Autoloader::register(); 23 13 14 /** 15 * Your environment. Can be set to any of the following: 16 * 17 * Fuel::DEVELOPMENT 18 * Fuel::TEST 19 * Fuel::STAGE 20 * Fuel::PRODUCTION 21 */ 22 Fuel::$env = (isset($_SERVER['FUEL_ENV']) ? $_SERVER['FUEL_ENV'] : Fuel::DEVELOPMENT); 23 24 /* 25 * default environment settings 26 */ 27 if (\Fuel::$is_test) 28 { 29 Fuel::$env = Fuel::TEST; 30 ! defined('DEBUG') && define('DEBUG', true); 31 } 32 elseif (strrchr(\Input::server('HTTP_HOST'),'.') == '.local') 33 { 34 Fuel::$env = Fuel::DEVELOPMENT; 35 ! defined('DEBUG') && define('DEBUG', true); 36 37 // make sure this is enabled in development 38 error_reporting(E_ALL); 39 ini_set('display_errors', '1'); 40 } 41 elseif (isset($_SERVER['FUEL_ENV'])) 42 { 43 Fuel::$env = $_SERVER['FUEL_ENV']; 44 } 45 else 46 { 47 Fuel::$env = Fuel::PRODUCTION; 48 ! defined('DEBUG') && define('DEBUG', false); 49 50 // make sure this is disabled in production 51 error_reporting(0); 52 ini_set('display_errors', '0'); 53 } 54 55 24 56 // Initialize the framework with the config file. 25 57 Fuel::init(include(APPPATH.'config/config.php')); -
trunk/exitecms/classes/controller/bootstrap.php
r72 r79 60 60 { 61 61 // start the session 62 $session = \Session::f actory();62 $session = \Session::forge(); 63 63 64 64 // get the current flash_id and set it to exitecms … … 90 90 { 91 91 // load the defined theme controller 92 static::$theme = \Theme::f actory($layout['theme']);92 static::$theme = \Theme::forge($layout['theme']); 93 93 94 94 // load the defined theme template … … 119 119 120 120 // process according to widget type 121 switch ( $widget['type'] ) 122 { 123 // placeholder 124 case 'dummy': 125 break; 126 127 // static text 128 case 'text': 129 $result->content($widget['uri']); 130 break; 131 132 // static view 133 case 'view': 134 try 135 { 121 try 122 { 123 switch ( $widget['type'] ) 124 { 125 // placeholder 126 case 'dummy': 127 break; 128 129 // static text 130 case 'text': 131 $result->content($widget['uri']); 132 break; 133 134 // static view 135 case 'view': 136 try 137 { 138 if ($widget['delay']) 139 { 140 $result->content(\View::forge($widget['uri'], $widget)); 141 } 142 else 143 { 144 $result->content(\View::forge($widget['uri'], $widget)->render()); 145 } 146 } 147 catch (\Exception $e) 148 { 149 $result->content ('Error processing view "'.$widget['uri'].'" defined for widget: "'.$area.'"'); 150 static::$page['widgets'][$area]['_error'] = true; 151 } 152 break; 153 154 // theme widget 155 case 'widget': 136 156 if ($widget['delay']) 137 157 { 138 $result->content(\View::f actory($widget['uri'], $widget));158 $result->content(\View::forge('theme_'.$layout['theme'].'::widgets/'.$widget['uri'], $widget)); 139 159 } 140 160 else 141 161 { 142 $result->content(\View::factory($widget['uri'], $widget)->render()); 143 } 144 } 145 catch (\Exception $e) 146 { 147 $result->content ('Error processing view "'.$widget['uri'].'" defined for widget: "'.$area.'"'); 162 $result->content(\View::forge('theme_'.$layout['theme'].'::widgets/'.$widget['uri'], $widget)->render()); 163 } 164 break; 165 166 // theme template 167 case 'template': 168 if ($widget['delay']) 169 { 170 $result->content(\View::forge('theme_'.$layout['theme'].'::layouts/'.$widget['uri'])); 171 } 172 else 173 { 174 $result->content(\View::forge('theme_'.$layout['theme'].'::layouts/'.$widget['uri'])->render()); 175 } 176 break; 177 178 // module widget 179 case 'module': 180 if ($widget['delay']) 181 { 182 $result->content(\Request::forge($widget['uri'], false)->execute()->response()); 183 } 184 else 185 { 186 $result->content( (string) \Request::forge($widget['uri'], false)->execute()->response()); 187 } 188 break; 189 190 // invalid type 191 default: 192 $result->content('Invalid widget type "'.$widget['type'].'" defined for widget: "'.$area.'"'); 148 193 static::$page['widgets'][$area]['_error'] = true; 149 } 150 break; 151 152 // theme widget 153 case 'widget': 154 if ($widget['delay']) 155 { 156 $result->content(\View::factory('theme_'.$layout['theme'].'::widgets/'.$widget['uri'], $widget)); 157 } 158 else 159 { 160 $result->content(\View::factory('theme_'.$layout['theme'].'::widgets/'.$widget['uri'], $widget)->render()); 161 } 162 break; 163 164 // theme layout 165 case 'layout': 166 if ($widget['delay']) 167 { 168 $result->content(\View::factory('theme_'.$layout['theme'].'::layouts/'.$widget['uri'])); 169 } 170 else 171 { 172 $result->content(\View::factory('theme_'.$layout['theme'].'::layouts/'.$widget['uri'])->render()); 173 } 174 break; 175 176 // module widget 177 case 'module': 178 if ($widget['delay']) 179 { 180 $result->content(\Request::factory($widget['uri'], false)->execute()->response()); 181 } 182 else 183 { 184 $result->content( (string) \Request::factory($widget['uri'], false)->execute()->response()); 185 } 186 break; 187 188 // invalid type 189 default: 190 $result->content('Invalid widget type "'.$widget['type'].'" defined for widget: "'.$area.'"'); 191 static::$page['widgets'][$area]['_error'] = true; 192 break; 194 break; 195 } 196 } 197 catch (Request404Exception $e) 198 { 199 $result->content(\View::forge('theme_'.$layout['theme'].'::widgets/404')->render()); 193 200 } 194 201 … … 202 209 203 210 // store the current URI in the session 204 $session->set('last_uri', \ Uri::detect());211 $session->set('last_uri', \Input::uri()); 205 212 } 206 213 … … 231 238 if ( is_null($site_id) ) 232 239 { 233 if ( ! $result = \Exitecms\Model_Site::f actory()->current_website() )240 if ( ! $result = \Exitecms\Model_Site::forge()->current_website() ) 234 241 { 235 242 return false; … … 253 260 if (is_null($segments)) 254 261 { 255 $segments = ltrim( URI::detect(), '/');262 $segments = ltrim(\Input::uri(), '/'); 256 263 $segments = empty($segments) ? '/' : $segments; 257 264 } -
trunk/exitecms/classes/exitecms.php
r73 r79 111 111 } 112 112 113 // ----------------------------------------------------------------- 114 115 public static function htmlentities($value) 116 { 117 static $already_cleaned = array(); 118 119 // Nothing to escape for non-string scalars, or for already processed values 120 if (is_bool($value) or is_int($value) or is_float($value) or in_array($value, $already_cleaned, true)) 121 { 122 return $value; 123 } 124 125 if (is_string($value)) 126 { 127 $value = htmlentities($value, ENT_NOQUOTES, \Fuel::$encoding, false); 128 } 129 elseif (is_array($value) || $value instanceof \Iterator) 130 { 131 foreach ($value as $k => $v) 132 { 133 $value[$k] = static::htmlentities($v); 134 } 135 136 // Add to $already_cleaned variable when object 137 is_object($value) and $already_cleaned[] = $value; 138 } 139 elseif (is_object($value)) 140 { 141 // Check if the object is whitelisted and return when that's the case 142 foreach (\Config::get('security.whitelisted_classes') as $class) 143 { 144 if (is_a($value, $class)) 145 { 146 // Add to $already_cleaned variable 147 $already_cleaned[] = $value; 148 149 return $value; 150 } 151 } 152 153 // Throw exception when it wasn't whitelisted and can't be converted to String 154 if ( ! method_exists($value, '__toString')) 155 { 156 throw new \RuntimeException('Object class "'.get_class($value).'" could not be converted to string or '. 157 'sanitized as ArrayAcces. Whitelist it in security.whitelisted_classes in app/config/config.php '. 158 'to allow it to be passed unchecked.'); 159 } 160 161 $value = static::htmlentities((string) $value); 162 } 163 164 return $value; 165 } 166 167 // ----------------------------------------------------------------- 168 169 /* 170 * TODO : has to move to a date or time class 171 */ 172 public function get_timezone($code, $timezones) 173 { 174 $timezone = ''; 175 foreach ($timezones as $key => $value) 176 { 177 if ($key == $code) 178 { 179 return $value; 180 } 181 elseif (is_array($value)) 182 { 183 $timezone .= (empty($timezone) ? '' : '/') . $key; 184 $result = $this->get_timezone($code, $value); 185 if ($result) 186 { 187 return $timezone . '/' . $result; 188 } 189 $timezone = ''; 190 } 191 } 192 193 return false; 194 } 195 113 196 } 114 197 -
trunk/exitecms/classes/exitecms/forms.php
r73 r79 120 120 if ( ! method_exists($this, 'action_'.$this->action)) 121 121 { 122 \ExiteCMS_Messages::set(\Lang:: line('forms.not_a_valid_action', array('action' => $this->action)), 'E');122 \ExiteCMS_Messages::set(\Lang::get('forms.not_a_valid_action', array('action' => $this->action)), 'E'); 123 123 $this->invalid_action(); 124 124 } … … 134 134 if ( ! $this->view instanceOf View and ! $this->view instanceOf ViewModel) 135 135 { 136 $this->set_view(\View::f actory($this->view));136 $this->set_view(\View::forge($this->view)); 137 137 } 138 138 else … … 205 205 { 206 206 // set the form title 207 $this->view->set('title', \Lang:: line('action.list.title'), false);207 $this->view->set('title', \Lang::get('action.list.title'), false); 208 208 209 209 // set the form info block 210 $this->view->set('info', \Lang:: line('action.list.info'), false);210 $this->view->set('info', \Lang::get('action.list.info'), false); 211 211 212 212 // buttons to be placed under the form 213 213 $this->view->buttons = array( 214 214 'add' => array( 215 'title' => \Lang:: line('button.add'),215 'title' => \Lang::get('button.add'), 216 216 'class' => 'add' 217 217 ), … … 246 246 247 247 // set the form title 248 $this->view->set('title', \Lang:: line('action.tree.title'), false);248 $this->view->set('title', \Lang::get('action.tree.title'), false); 249 249 250 250 // set the form info block 251 $this->view->set('info', \Lang:: line('action.tree.info'), false);251 $this->view->set('info', \Lang::get('action.tree.info'), false); 252 252 253 253 // buttons to be placed under the form 254 254 $this->view->buttons = array( 255 255 'add' => array( 256 'title' => \Lang:: line('button.add'),256 'title' => \Lang::get('button.add'), 257 257 'class' => 'add' 258 258 ), … … 273 273 { 274 274 // set the form title 275 $this->view->set('title', \Lang:: line('action.add.title'), false);275 $this->view->set('title', \Lang::get('action.add.title'), false); 276 276 277 277 // set the form info block 278 $this->view->set('info', \Lang:: line('action.add.info'), false);278 $this->view->set('info', \Lang::get('action.add.info'), false); 279 279 280 280 // define the form header 281 $this->view->set('header', array('title' => \Lang:: line('action.add.form'), 'options' => array('colspan' => 2)));281 $this->view->set('header', array('title' => \Lang::get('action.add.form'), 'options' => array('colspan' => 2))); 282 282 283 283 // buttons to be placed under the form 284 284 $this->view->buttons = array( 285 285 'save' => array( 286 'title' => \Lang:: line('global.save'),286 'title' => \Lang::get('global.save'), 287 287 'class' => 'positive' 288 288 ), 289 289 'refresh' => array( 290 'title' => \Lang:: line('global.refresh'),290 'title' => \Lang::get('global.refresh'), 291 291 'class' => '' 292 292 ), 293 293 'cancel' => array( 294 'title' => \Lang:: line('global.cancel'),294 'title' => \Lang::get('global.cancel'), 295 295 'class' => 'negative' 296 296 ), … … 304 304 305 305 // assign the data to the view 306 $this->view->set('data', $this->data );306 $this->view->set('data', $this->data, false); 307 307 308 308 // run the validation … … 326 326 method_exists($this, 'after_add') and $this->after_add(true); 327 327 328 \ExiteCMS_Messages::set(\Lang:: line('action.add.success'), 'C');328 \ExiteCMS_Messages::set(\Lang::get('action.add.success'), 'C'); 329 329 } 330 330 else … … 333 333 method_exists($this, 'after_add') and $this->after_add(false); 334 334 335 \ExiteCMS_Messages::set(\Lang:: line('action.add.failure'), 'E');335 \ExiteCMS_Messages::set(\Lang::get('action.add.failure'), 'E'); 336 336 } 337 337 … … 355 355 { 356 356 // set the form title 357 $this->view->set('title', \Lang:: line('action.edit.title'), false);357 $this->view->set('title', \Lang::get('action.edit.title'), false); 358 358 359 359 // set the form info block 360 $this->view->set('info', \Lang:: line('action.edit.info'), false);360 $this->view->set('info', \Lang::get('action.edit.info'), false); 361 361 362 362 // define the form header 363 $this->view->set('header', array('title' => \Lang:: line('action.edit.form'), 'options' => array('colspan' => 2)));363 $this->view->set('header', array('title' => \Lang::get('action.edit.form'), 'options' => array('colspan' => 2))); 364 364 365 365 // buttons to be placed under the form 366 366 $this->view->buttons = array( 367 367 'save' => array( 368 'title' => \Lang:: line('global.save'),368 'title' => \Lang::get('global.save'), 369 369 'class' => 'positive' 370 370 ), 371 371 'refresh' => array( 372 'title' => \Lang:: line('global.refresh'),372 'title' => \Lang::get('global.refresh'), 373 373 'class' => '' 374 374 ), 375 375 'cancel' => array( 376 'title' => \Lang:: line('global.cancel'),376 'title' => \Lang::get('global.cancel'), 377 377 'class' => 'negative' 378 378 ), … … 400 400 method_exists($this, 'after_edit') and $this->after_edit(true); 401 401 402 \ExiteCMS_Messages::set(\Lang:: line('action.edit.success'), 'C');402 \ExiteCMS_Messages::set(\Lang::get('action.edit.success'), 'C'); 403 403 } 404 404 else … … 407 407 method_exists($this, 'after_edit') and $this->after_edit(false); 408 408 409 \ExiteCMS_Messages::set(\Lang:: line('action.edit.failure'), 'E');409 \ExiteCMS_Messages::set(\Lang::get('action.edit.failure'), 'E'); 410 410 } 411 411 } 412 412 else 413 413 { 414 \ExiteCMS_Messages::set(\Lang:: line('forms.record_not_changed'), 'W');414 \ExiteCMS_Messages::set(\Lang::get('forms.record_not_changed'), 'W'); 415 415 } 416 416 … … 426 426 427 427 // assign the data to the view 428 $this->view->set('data', $this->data );428 $this->view->set('data', $this->data, false); 429 429 } 430 430 … … 436 436 { 437 437 // set the form title 438 $this->view->set('title', \Lang:: line('action.delete.title'), false);438 $this->view->set('title', \Lang::get('action.delete.title'), false); 439 439 440 440 // set the form info block 441 $this->view->set('info', \Lang:: line('action.delete.info'), false);441 $this->view->set('info', \Lang::get('action.delete.info'), false); 442 442 443 443 // define the form header 444 $this->view->set('header', array('title' => \Lang:: line('action.edit.form'), 'options' => array('colspan' => 2)));444 $this->view->set('header', array('title' => \Lang::get('action.edit.form'), 'options' => array('colspan' => 2))); 445 445 446 446 // buttons to be placed under the table 447 447 $this->view->buttons = array( 448 448 'delete' => array( 449 'title' => \Lang:: line('global.delete'),449 'title' => \Lang::get('global.delete'), 450 450 'class' => 'positive' 451 451 ), 452 452 'cancel' => array( 453 'title' => \Lang:: line('global.cancel'),453 'title' => \Lang::get('global.cancel'), 454 454 'class' => 'negative' 455 455 ), … … 472 472 if (isset($_POST['formbutton']['delete'])) 473 473 { 474 // call the delete cleanup method475 method_exists($this, 'after_delete') and $this->after_delete();476 477 474 // save the added record 478 475 if ( $this->model instanceOf \NestedSets\Model) … … 485 482 } 486 483 487 \ExiteCMS_Messages::set(\Lang::line('action.delete.success'), 'C'); 484 // call the delete cleanup method 485 method_exists($this, 'after_delete') and $this->after_delete(); 486 487 \ExiteCMS_Messages::set(\Lang::get('action.delete.success'), 'C'); 488 488 \ExiteCMS::redirect($this->baseurl); 489 489 } … … 523 523 protected function button_cancel() 524 524 { 525 \ExiteCMS_Messages::set(\Lang:: line('forms.action_canceled'), 'I');525 \ExiteCMS_Messages::set(\Lang::get('forms.action_canceled'), 'I'); 526 526 \ExiteCMS::redirect($this->baseurl); 527 527 } … … 550 550 { 551 551 // check for missing labels 552 ! isset($definition['label']) and $this->fields[$name]['label'] = \ lang::line('field.'.$name);552 ! isset($definition['label']) and $this->fields[$name]['label'] = \Lang::get('field.'.$name); 553 553 554 554 // check for missing help text 555 ! isset($definition['help']) and $this->fields[$name]['help'] = \ lang::line('help.'.$name);555 ! isset($definition['help']) and $this->fields[$name]['help'] = \Lang::get('help.'.$name); 556 556 557 557 // check for missing options array … … 597 597 } 598 598 catch (Exception $e) { 599 \ExiteCMS_Messages::set(\Lang:: line('forms.record_not_found'), 'E');599 \ExiteCMS_Messages::set(\Lang::get('forms.record_not_found'), 'E'); 600 600 \ExiteCMS::redirect($this->baseurl); 601 601 } … … 603 603 else 604 604 { 605 \ExiteCMS_Messages::set(\Lang:: line('forms.record_not_found'), 'E');605 \ExiteCMS_Messages::set(\Lang::get('forms.record_not_found'), 'E'); 606 606 \ExiteCMS::redirect($this->baseurl); 607 607 } … … 660 660 if ($this->model_options['offset'] > $records) 661 661 { 662 \ExiteCMS_Messages::set(\Lang:: line('forms.page_not_found'), 'E');662 \ExiteCMS_Messages::set(\Lang::get('forms.page_not_found'), 'E'); 663 663 \ExiteCMS::redirect($this->baseurl); 664 664 } … … 782 782 if ( ! \Security::check_token()) 783 783 { 784 \ExiteCMS_Messages::set(\Lang:: line('global.form_expired'), 'E');785 \ExiteCMS::redirect(\ Uri::detect());784 \ExiteCMS_Messages::set(\Lang::get('global.form_expired'), 'E'); 785 \ExiteCMS::redirect(\Input::uri()); 786 786 } 787 787 … … 807 807 808 808 // define the validation rules 809 $this->validation = \Validation::f actory(get_class($this));809 $this->validation = \Validation::forge(get_class($this)); 810 810 $this->validation->add_callable($this); 811 811 -
trunk/exitecms/classes/exitecms/messages.php
r65 r79 144 144 public static function to_flash() 145 145 { 146 $session = \Session::f actory();146 $session = \Session::forge(); 147 147 148 148 // get the current flash_id and set it to exitecms -
trunk/exitecms/classes/exitecms/theme.php
r73 r79 94 94 } 95 95 96 // validate the theme info 97 if (isset($this->info['info']['creationDate'])) 98 { 99 $this->info['info']['creationDate'] = strtotime($this->info['info']['creationDate']); 100 } 101 102 // **TODO: more validation ** 103 96 104 // mark the info loaded 97 105 unset($this->info['init']); … … 103 111 104 112 /* 113 * install this theme 114 * 115 */ 116 public function install($theme, \Orm\Model $model) 117 { 118 // fetch the defined templates for this theme 119 $templates = $this->templates(); 120 121 // and load their configs 122 foreach($templates as $template) 123 { 124 $this->load_config($template); 125 } 126 127 // now fetch the entire info array 128 $themeinfo = $this->info(); 129 130 // create the theme record 131 $model->name = $theme; 132 $model->description = $themeinfo['info']['description']; 133 $model->version = $themeinfo['info']['version']; 134 $model->revision = $themeinfo['info']['revision']; 135 $model->system = $themeinfo['info']['system'] ? '1' : '0'; 136 $model->active = '1'; 137 138 // add the theme templates 139 if ( ! empty($themeinfo['templates'])) 140 { 141 foreach ($themeinfo['templates'] as $name => $template) 142 { 143 $tplobj = new \ExiteCMS\Model_ThemeTemplate(); 144 $tplobj->name = $name; 145 $tplobj->description = $template['description']; 146 $tplobj->active = '1'; 147 $areas = ''; 148 foreach ($template['areas'] as $name => $area) 149 { 150 $areas .= (empty($areas) ? '' : ',') . $name; 151 } 152 $tplobj->sections = $areas; 153 $model->themetemplate[] = $tplobj; 154 } 155 } 156 157 // ** TODO ** copy the assets from theme to public 158 159 return $model->save(); 160 } 161 162 // ----------------------------------------------------------------- 163 164 /* 165 * remove this theme 166 * 167 */ 168 public function remove($theme) 169 { 170 // ** TODO ** remove the theme assets from public 171 } 172 173 // ----------------------------------------------------------------- 174 175 /* 105 176 * Load and return the view object for the requested layout 106 177 * … … 114 185 \Request::active()->add_path($this->path, true); 115 186 116 return \View::f actory('layouts/'.$layout);187 return \View::forge('layouts/'.$layout); 117 188 } 118 189 … … 131 202 \Request::active()->add_path($this->path, true); 132 203 133 $this->view = \View::f actory('templates/'.$layout);204 $this->view = \View::forge('templates/'.$layout); 134 205 135 206 return $this->view; … … 187 258 if ( ! empty($this->areas[$area]['chrome']['widget'])) 188 259 { 189 $output .= \View::f actory('chrome/'.$this->areas[$area]['chrome']['widget'], array('header' => '**TODO** HEADER', 'body' => (string) $content))->render();260 $output .= \View::forge('chrome/'.$this->areas[$area]['chrome']['widget'], array('header' => '**TODO** HEADER', 'body' => (string) $content))->render(); 190 261 } 191 262 else … … 197 268 if ( ! empty($this->areas[$area]['chrome']['area'])) 198 269 { 199 return \View::f actory('chrome/'.$this->areas[$area]['chrome']['area'], array('title' => '**TODO** TITLE', 'body' => $output))->render();270 return \View::forge('chrome/'.$this->areas[$area]['chrome']['area'], array('title' => '**TODO** TITLE', 'body' => $output))->render(); 200 271 } 201 272 else … … 285 356 * load the config of a theme template 286 357 */ 287 p ublicfunction load_config($template)288 { 289 // load the configif it isn't loaded yet358 protected function load_config($template) 359 { 360 // load the theme info if it isn't loaded yet 290 361 if ( isset($this->info['init'])) 291 362 { … … 316 387 } 317 388 318 // validate the config file **TODO**319 320 389 // define the area's for the loaded template 321 390 foreach ($this->info['templates'][$template]['areas'] as $name => $area) -
trunk/exitecms/classes/exitecms/widget.php
r72 r79 34 34 * factory to produce widget objects 35 35 */ 36 public static function f actory()36 public static function forge() 37 37 { 38 38 return new static(); -
trunk/exitecms/classes/exitecmsexception.php
r68 r79 10 10 { 11 11 ob_end_clean(); 12 echo View::factory('exception', array('exception' => $this), false);12 echo \View::forge('exception', array('exception' => $this), false); 13 13 } 14 14 } -
trunk/exitecms/classes/theme.php
r73 r79 70 70 * @return object theme controller instance 71 71 */ 72 public static function f actory($theme= '')72 public static function forge($theme= '') 73 73 { 74 74 // check if the theme exists … … 116 116 else 117 117 { 118 return static::f actory($instance);118 return static::forge($instance); 119 119 } 120 120 } … … 161 161 { 162 162 // load the theme controller 163 $value = substr( $key, 6);164 $themes[$value] = static::f actory($value);163 $value = substr(rtrim($key,'/'), 6); 164 $themes[$value] = static::forge($value); 165 165 } 166 166 } -
trunk/exitecms/classes/view.php
r49 r79 11 11 public function hash() 12 12 { 13 return md5($this-> _file);13 return md5($this->file_name); 14 14 } 15 15 } -
trunk/exitecms/config/config.php
r70 r79 13 13 */ 14 14 15 /*16 * default environment settings17 */18 if (\Fuel::$is_test)19 {20 $env = array(21 'environment' => Fuel::TEST,22 'profiling' => false,23 'log' => Fuel::L_ALL24 );25 ! defined('DEBUG') && define('DEBUG', true);26 }27 elseif (strrchr(\Input::server('http_host'),'.') == '.local')28 {29 $env = array(30 'environment' => Fuel::DEVELOPMENT,31 'profiling' => false,32 'log' => Fuel::L_ALL33 );34 ! defined('DEBUG') && define('DEBUG', true);35 36 // make sure this is enabled in development37 error_reporting(E_ALL);38 ini_set('display_errors', '1');39 }40 else41 {42 $env = array(43 'environment' => Fuel::PRODUCTION,44 'profiling' => false,45 'log' => Fuel::L_ERROR46 );47 48 ! defined('DEBUG') && define('DEBUG', false);49 50 // make sure this is disabled in production51 error_reporting(0);52 ini_set('display_errors', '0');53 }54 15 55 16 /* … … 89 50 'index_file' => false, 90 51 91 /** 92 * Your environment. Can be set to any of the following: 93 * 94 * Fuel::DEVELOPMENT 95 * Fuel::TEST 96 * Fuel::STAGE 97 * Fuel::PRODUCTION 98 */ 99 'environment' => $env['environment'], 100 101 'profiling' => $env['profiling'], 52 'profiling' => false, 102 53 103 54 'caching' => false, … … 105 56 'cache_lifetime' => 3600, // In Seconds 106 57 58 /** 59 * Callback to use with ob_start(), set this to 'ob_gzhandler' for gzip encodign of output 60 */ 61 'ob_callback' => null, 62 107 63 'errors' => array( 108 64 … … 116 72 ), 117 73 118 'language' => 'en', 119 120 'locale' => 'en_US', 74 /** 75 * Localization & internationalization settings 76 */ 77 'language' => 'en', // Default language 78 'language_fallback' => 'en', // Fallback language when file isn't available for default language 79 'locale' => 'en_US', // PHP set_locale() setting, null to not set 80 81 'encoding' => 'UTF-8', 121 82 122 83 /** … … 126 87 * default_timezone optional, if you want to change the server's default timezone 127 88 */ 128 'server_gmt_offset' => 0,89 'server_gmt_offset' => 3600, 129 90 130 91 'default_timezone' => 'Europe/Amsterdam', … … 139 100 * Fuel::L_ALL 140 101 */ 141 'log_threshold' => $env['log'],102 'log_threshold' => Fuel::L_ALL, 142 103 'log_path' => APPPATH.'../logs/', 143 104 'log_date_format' => 'Y-m-d H:i:s', … … 161 122 162 123 /** 163 * Whether to automatically encode (htmlentities) view data 164 */ 165 'auto_encode_view_data' => true, 124 * This output filter can be any normal PHP function as well as 'xss_clean' 125 * 126 * WARNING: Using xss_clean will cause a performance hit. How much is 127 * dependant on how much input data there is. 128 */ 129 'output_filter' => array('Exitecms::htmlentities'), 130 131 /** 132 * Whether to automatically filter view data using the output filter 133 */ 134 'auto_filter_output' => true, 166 135 167 136 /** … … 169 138 * throw exceptions unless they are instances of the classes in this array. 170 139 */ 171 'whitelisted_classes' => array(' Fuel\\Core\\View', 'Fuel\\Core\\ViewModel', 'Closure')140 'whitelisted_classes' => array('stdClass', 'Fuel\\Core\\Response', 'Fuel\\Core\\View', 'Fuel\\Core\\ViewModel', 'Closure') 172 141 ), 173 142 -
trunk/exitecms/config/version.php
r72 r79 14 14 15 15 /* 16 * revision number added by SubVersion on checkout/export 16 * revision number added by SubVersion on checkout/export ** 17 17 */ 18 18 $revision = explode(' ', "\$Rev$"); -
trunk/exitecms/config/website.1.php
r73 r79 164 164 'content' => array( 165 165 array( 166 'type' => ' text',167 'uri' => ' Content module here'166 'type' => 'module', 167 'uri' => 'exitecms/content' 168 168 ), 169 169 ), … … 216 216 'content' => array( 217 217 array( 218 'type' => ' text',219 'uri' => ' Groups module here'218 'type' => 'module', 219 'uri' => 'exitecms/groups' 220 220 ), 221 221 ), … … 229 229 'content' => array( 230 230 array( 231 'type' => ' text',232 'uri' => ' Roles module here'231 'type' => 'module', 232 'uri' => 'exitecms/roles' 233 233 ), 234 234 ), … … 242 242 'content' => array( 243 243 array( 244 'type' => ' text',245 'uri' => ' Tasks module here'244 'type' => 'module', 245 'uri' => 'exitecms/tasks' 246 246 ), 247 247 ), … … 255 255 'content' => array( 256 256 array( 257 'type' => ' text',258 'uri' => ' Workflow module here'257 'type' => 'module', 258 'uri' => 'exitecms/workflow' 259 259 ), 260 260 ), … … 281 281 'content' => array( 282 282 array( 283 'type' => ' text',284 'uri' => ' Modules module here'283 'type' => 'module', 284 'uri' => 'exitecms/modules' 285 285 ), 286 286 ), … … 294 294 'content' => array( 295 295 array( 296 'type' => ' text',297 'uri' => ' Plugins module here'296 'type' => 'module', 297 'uri' => 'exitecms/plugins' 298 298 ), 299 299 ), -
trunk/exitecms/views/forms/add.php
r70 r79 22 22 { 23 23 echo '<fieldset>', "\n"; 24 echo "\t", '<legend>', \Lang:: line('global.information'), '</legend>', "\n";24 echo "\t", '<legend>', \Lang::get('global.information'), '</legend>', "\n"; 25 25 echo "\t", '<div class="info">', $info, '</div>', "\n"; 26 26 echo '</fieldset>', "\n"; -
trunk/exitecms/views/forms/delete.php
r70 r79 14 14 { 15 15 echo '<fieldset>', "\n"; 16 echo "\t", '<legend>', \Lang:: line('global.information'), '</legend>', "\n";16 echo "\t", '<legend>', \Lang::get('global.information'), '</legend>', "\n"; 17 17 echo "\t", '<div class="info">', $info, '</div>', "\n"; 18 18 echo '</fieldset>', "\n"; -
trunk/exitecms/views/forms/edit.php
r70 r79 22 22 { 23 23 echo '<fieldset>', "\n"; 24 echo "\t", '<legend>', \Lang:: line('global.information'), '</legend>', "\n";24 echo "\t", '<legend>', \Lang::get('global.information'), '</legend>', "\n"; 25 25 echo "\t", '<div class="info">', $info, '</div>', "\n"; 26 26 echo '</fieldset>', "\n"; -
trunk/exitecms/views/forms/info.php
r73 r79 22 22 { 23 23 echo '<fieldset>', "\n"; 24 echo "\t", '<legend>', \Lang:: line('global.information'), '</legend>', "\n";24 echo "\t", '<legend>', \Lang::get('global.information'), '</legend>', "\n"; 25 25 echo "\t", '<div class="info">', $info, '</div>', "\n"; 26 26 echo '</fieldset>', "\n"; -
trunk/exitecms/views/forms/list.php
r73 r79 14 14 { 15 15 echo '<fieldset>', "\n"; 16 echo "\t", '<legend>', \Lang:: line('global.information'), '</legend>', "\n";16 echo "\t", '<legend>', \Lang::get('global.information'), '</legend>', "\n"; 17 17 echo "\t", '<div class="info">', $info, '</div>', "\n"; 18 18 echo '</fieldset>', "\n"; … … 98 98 if ( empty($data)) 99 99 { 100 echo '<h4 style="text-align:center;padding:20px 0px;">', \Lang:: line('global.no_data'), '</h4>';100 echo '<h4 style="text-align:center;padding:20px 0px;">', \Lang::get('global.no_data'), '</h4>'; 101 101 } 102 102 -
trunk/exitecms/views/forms/tree.php
r72 r79 29 29 { 30 30 echo '<fieldset>', "\n"; 31 echo "\t", '<legend>', \Lang:: line('global.information'), '</legend>', "\n";31 echo "\t", '<legend>', \Lang::get('global.information'), '</legend>', "\n"; 32 32 echo "\t", '<div class="info">', $info, '</div>', "\n"; 33 33 echo '</fieldset>', "\n"; … … 126 126 if ( empty($data)) 127 127 { 128 echo '<h4 style="text-align:center;padding:20px 0px;">', \Lang:: line('global.no_data'), '</h4>';128 echo '<h4 style="text-align:center;padding:20px 0px;">', \Lang::get('global.no_data'), '</h4>'; 129 129 } 130 130 -
trunk/modules/exitecms/classes/controller/dashboard.php
r72 r79 46 46 public function __construct(\Request $request, \Response $response) 47 47 { 48 $this->model = Model_User::f actory();48 $this->model = Model_User::forge(); 49 49 50 50 parent::__construct($request, $response); … … 69 69 { 70 70 // set the title 71 $this->view->title = \Lang:: line('title.index');71 $this->view->title = \Lang::get('title.index'); 72 72 73 73 // load the SimplePie package … … 95 95 if (true) 96 96 { 97 $status = \Lang:: line('info.status_ok');97 $status = \Lang::get('info.status_ok'); 98 98 } 99 99 else 100 100 { 101 $status = \Lang:: line('info.status_nok');101 $status = \Lang::get('info.status_nok'); 102 102 } 103 103 // fetch the exitecms information 104 104 $this->view->set('exitecms', 105 \Lang:: line('info.exitecms',105 \Lang::get('info.exitecms', 106 106 array( 107 107 'version' => \Config::get('version.version', '?'), … … 146 146 if ( true ) 147 147 { 148 $this->view->update = \Lang:: line('info.current');148 $this->view->update = \Lang::get('info.current'); 149 149 } 150 150 else 151 151 { 152 $this->view->update = \Lang:: line('info.update');152 $this->view->update = \Lang::get('info.update'); 153 153 } 154 154 } -
trunk/modules/exitecms/classes/controller/datetime.php
r72 r79 173 173 // define the in-form headers 174 174 $this->view->headers = array( 175 array('title' => \Lang:: line('action.edit.form'), 'colspan' => 2)175 array('title' => \Lang::get('action.edit.form'), 'colspan' => 2) 176 176 ); 177 177 … … 199 199 if ( \Config::save('exitecms', 'exitecms')) 200 200 { 201 \ExiteCMS_Messages::set(\Lang:: line('action.edit.success'), 'C');201 \ExiteCMS_Messages::set(\Lang::get('action.edit.success'), 'C'); 202 202 } 203 203 else 204 204 { 205 \ExiteCMS_Messages::set(\Lang:: line('action.edit.failure'), 'E');205 \ExiteCMS_Messages::set(\Lang::get('action.edit.failure'), 'E'); 206 206 } 207 207 -
trunk/modules/exitecms/classes/controller/install.php
r72 r79 92 92 'type' => 'select', 93 93 'value' => 0, 94 'values' => array(0 => \Lang:: line('global.none_selected')),94 'values' => array(0 => \Lang::get('global.none_selected')), 95 95 ); 96 96 … … 143 143 'type' => 'radio', 144 144 'value' => 0, 145 'values' => array(0 => \Lang:: line('global.no'), 1 => \Lang::line('global.yes')),145 'values' => array(0 => \Lang::get('global.no'), 1 => \Lang::get('global.yes')), 146 146 ); 147 147 … … 170 170 'type' => 'radio', 171 171 'value' => 0, 172 'values' => array(0 => \Lang:: line('global.no'), 1 => \Lang::line('global.yes')),172 'values' => array(0 => \Lang::get('global.no'), 1 => \Lang::get('global.yes')), 173 173 ); 174 174 … … 183 183 'type' => 'radio', 184 184 'value' => 0, 185 'values' => array(0 => \Lang:: line('global.no'), 1 => \Lang::line('global.yes')),185 'values' => array(0 => \Lang::get('global.no'), 1 => \Lang::get('global.yes')), 186 186 ); 187 187 … … 208 208 // define the in-form headers 209 209 $this->view->set('header', array( 210 array('title' => \Lang:: line('action.edit.form.1'), 'options' => array('colspan' => 2)),211 array('title' => \Lang:: line('action.edit.form.2'), 'options' => array('colspan' => 2), 'after' => 'mail_password'),212 array('title' => \Lang:: line('action.edit.form.3'), 'options' => array('colspan' => 2), 'after' => 'layout_listlength'),213 array('title' => \Lang:: line('action.edit.form.4'), 'options' => array('colspan' => 2), 'after' => 'engine_profiler'),210 array('title' => \Lang::get('action.edit.form.1'), 'options' => array('colspan' => 2)), 211 array('title' => \Lang::get('action.edit.form.2'), 'options' => array('colspan' => 2), 'after' => 'mail_password'), 212 array('title' => \Lang::get('action.edit.form.3'), 'options' => array('colspan' => 2), 'after' => 'layout_listlength'), 213 array('title' => \Lang::get('action.edit.form.4'), 'options' => array('colspan' => 2), 'after' => 'engine_profiler'), 214 214 )); 215 215 … … 231 231 if ( \Config::save('exitecms', 'exitecms')) 232 232 { 233 \ExiteCMS_Messages::set(\Lang:: line('action.edit.success'), 'C');233 \ExiteCMS_Messages::set(\Lang::get('action.edit.success'), 'C'); 234 234 } 235 235 else 236 236 { 237 \ExiteCMS_Messages::set(\Lang:: line('action.edit.failure'), 'E');237 \ExiteCMS_Messages::set(\Lang::get('action.edit.failure'), 'E'); 238 238 } 239 239 -
trunk/modules/exitecms/classes/controller/links.php
r72 r79 44 44 { 45 45 // define this controller's model 46 $this->model = Model_Link::f actory();46 $this->model = Model_Link::forge(); 47 47 48 48 parent::__construct($request, $response); … … 123 123 $this->view->set('headers', array( 124 124 'header' => array( 125 'title' => \Lang:: line('field.header'),125 'title' => \Lang::get('field.header'), 126 126 'options' => array( 127 127 'colspan' => '2', … … 129 129 ), 130 130 'options' => array( 131 'title' => \Lang:: line('field.actions'),131 'title' => \Lang::get('field.actions'), 132 132 'options' => array( 133 133 'style' => 'width:0px; white-space:nowrap; text-align:center;', … … 140 140 { 141 141 // reset the data array 142 $ this->view->data = array();142 $data = array(); 143 143 144 144 // loop through the records found 145 145 foreach($this->data as $record) 146 146 { 147 $ this->view->data[] = array(147 $data[] = array( 148 148 'name' => array( 149 149 'value' => $record->name … … 159 159 array( 160 160 'icon' => 'edit', 161 'title' => \Lang:: line('icon.edit'),161 'title' => \Lang::get('icon.edit'), 162 162 'confirm' => false, 163 163 'enabled' => true, … … 166 166 array( 167 167 'icon' => 'sitemap', 168 'title' => \Lang:: line('icon.sitemap'),168 'title' => \Lang::get('icon.sitemap'), 169 169 'confirm' => false, 170 170 'enabled' => $record->system != 1, … … 173 173 array( 174 174 'icon' => 'delete', 175 'title' => \Lang:: line('icon.delete'),175 'title' => \Lang::get('icon.delete'), 176 176 'confirm' => false, 177 177 'enabled' => $record->system != 1, … … 182 182 ); 183 183 } 184 185 $this->view->set('data', $data); 184 186 } 185 187 } … … 192 194 if ($this->model->system == 1) 193 195 { 194 \ExiteCMS::set_message(\Lang:: line('message.deleted_noaccess'), 'E');196 \ExiteCMS::set_message(\Lang::get('message.deleted_noaccess'), 'E'); 195 197 \ExiteCMS::redirect($this->baseurl); 196 198 } 197 199 198 200 // set the form info block 199 $this->view->set('info', \Lang:: line('action.delete.info', array('name' => $this->model->name)), false);201 $this->view->set('info', \Lang::get('action.delete.info', array('name' => $this->model->name)), false); 200 202 } 201 203 -
trunk/modules/exitecms/classes/controller/linkset.php
r72 r79 44 44 { 45 45 // define this controller's model 46 $this->model = Model_Link::f actory();46 $this->model = Model_Link::forge(); 47 47 48 48 parent::__construct($request, $response); … … 94 94 ); 95 95 96 // field: title 97 $this->fields['title'] = array( 98 'validation' => array( 99 'rules' => 'trim', 100 'flags' => '', 101 ), 102 'options' => array( 103 'style' => 'width: 400px;', 104 ), 105 'value' => '', 106 ); 107 96 108 // field: parent 97 109 $this->fields['parent'] = array( … … 119 131 'type' => 'select', 120 132 'value' => 'P', 121 'values' => \Lang:: line('other.type'),133 'values' => \Lang::get('other.type'), 122 134 ); 123 135 … … 156 168 'value' => 0, 157 169 'type' => 'radio', 158 'values' => array(0 => \Lang:: line('global.no'), 1 => \Lang::line('global.yes')),170 'values' => array(0 => \Lang::get('global.no'), 1 => \Lang::get('global.yes')), 159 171 ); 160 172 … … 166 178 'type' => 'select', 167 179 'value' => '?', 168 'values' => \Lang:: line('other.security'),180 'values' => \Lang::get('other.security'), 169 181 ); 170 182 } … … 183 195 public function button_cancel() 184 196 { 185 \ExiteCMS_Messages::set(\Lang:: line('forms.action_canceled'), 'I');197 \ExiteCMS_Messages::set(\Lang::get('forms.action_canceled'), 'I'); 186 198 187 199 $this->redirect_back(); … … 213 225 // define the list headers structure 214 226 $this->view->set('headers', array( 215 ' title' => array(216 'title' => \Lang:: line('field.title'),217 ), 218 'options' => array( 219 'title' => \Lang:: line('field.actions'),227 'name' => array( 228 'title' => \Lang::get('field.name'), 229 ), 230 'options' => array( 231 'title' => \Lang::get('field.actions'), 220 232 'options' => array( 221 233 'style' => 'width:0px; white-space:nowrap; text-align:center;', … … 228 240 if ($recnbr = $this->param(1)) 229 241 { 230 $root = Model_Link::f actory()->find()242 $root = Model_Link::forge()->find() 231 243 ->where($this->model->tree_get_property('tree_field'), $recnbr) 232 244 ->where($this->model->tree_get_property('left_field'), 1) … … 236 248 { 237 249 // if we didn't find the site root, redirect to sites 238 is_null($root) and \ExiteCMS_Messages::set(\Lang:: line('message.notfound'), 'E');250 is_null($root) and \ExiteCMS_Messages::set(\Lang::get('message.notfound'), 'E'); 239 251 \ExiteCMS::redirect(\ExiteCMS::baseurl('links')); 240 252 } … … 242 254 { 243 255 // set the title 244 $this->view->set('title', \Lang:: line('action.tree.title', array('linkset' => $root->name)), false);256 $this->view->set('title', \Lang::get('action.tree.title', array('linkset' => $root->name)), false); 245 257 } 246 258 … … 249 261 { 250 262 // reset the data array 251 $ this->view->data = array();263 $data = array(); 252 264 253 265 // loop through the records found … … 255 267 { 256 268 $is_folder = $record[$this->model->tree_get_property('right_field')] - $record[$this->model->tree_get_property('left_field')] > 1; 257 $ this->view->data[] = array(269 $data[] = array( 258 270 'content' => array( 259 271 'value' => $record['name'], … … 274 286 array( 275 287 'icon' => 'edit', 276 'title' => \Lang:: line('icon.edit'),288 'title' => \Lang::get('icon.edit'), 277 289 'confirm' => false, 278 290 'enabled' => true, … … 281 293 array( 282 294 'icon' => 'delete', 283 'title' => \Lang:: line('icon.delete'),295 'title' => \Lang::get('icon.delete'), 284 296 'confirm' => false, 285 297 'enabled' => $record['system'] == 0, … … 288 300 array( 289 301 'icon' => 'leftup', 290 'title' => \Lang:: line('icon.left'),302 'title' => \Lang::get('icon.left'), 291 303 'confirm' => false, 292 304 'enabled' => $record['system'] == 0 and ! is_null($record['_parent_']), … … 295 307 array( 296 308 'icon' => 'up', 297 'title' => \Lang:: line('icon.up'),309 'title' => \Lang::get('icon.up'), 298 310 'confirm' => false, 299 311 'enabled' => $record['system'] == 0 and $record['_first_'] == false, … … 302 314 array( 303 315 'icon' => 'down', 304 'title' => \Lang:: line('icon.down'),316 'title' => \Lang::get('icon.down'), 305 317 'confirm' => false, 306 318 'enabled' => $record['system'] == 0 and $record['_last_'] == false, … … 311 323 ); 312 324 } 325 326 $this->view->set('data', $data); 313 327 } 314 328 315 329 // extra buttons to be placed under the table 316 330 $this->view->buttons['back'] = array( 317 'title' => \Lang:: line('button.back'),331 'title' => \Lang::get('button.back'), 318 332 'class' => 'back' 319 333 ); … … 329 343 if ($recnbr = $this->param(2)) 330 344 { 331 $this->root = Model_Link::f actory()->find()345 $this->root = Model_Link::forge()->find() 332 346 ->where($this->model->tree_get_property('tree_field'), $recnbr) 333 347 ->where($this->model->tree_get_property('left_field'), 1) … … 337 351 { 338 352 // if we didn't find the site root, redirect to sites 339 \ExiteCMS_Messages::set(\Lang:: line('message.notfound'), 'E');353 \ExiteCMS_Messages::set(\Lang::get('message.notfound'), 'E'); 340 354 \ExiteCMS::redirect(\ExiteCMS::baseurl('links')); 341 355 } … … 348 362 349 363 // define the custom form header 350 $this->view->set('header', array('title' => \Lang:: line('action.add.form', array('linkset' => $this->root->name)), 'options' => array('colspan' => 2)));364 $this->view->set('header', array('title' => \Lang::get('action.add.form', array('linkset' => $this->root->name)), 'options' => array('colspan' => 2))); 351 365 } 352 366 … … 359 373 if ($recnbr = $this->param(2)) 360 374 { 361 $this->root = Model_Link::f actory()->find()375 $this->root = Model_Link::forge()->find() 362 376 ->where($this->model->tree_get_property('tree_field'), $recnbr) 363 377 ->where($this->model->tree_get_property('left_field'), 1) … … 367 381 { 368 382 // if we didn't find the site root, redirect to sites 369 \ExiteCMS_Messages::set(\Lang:: line('message.notfound'), 'E');383 \ExiteCMS_Messages::set(\Lang::get('message.notfound'), 'E'); 370 384 \ExiteCMS::redirect(\ExiteCMS::baseurl('links')); 371 385 } … … 381 395 382 396 // define the custom form header 383 $this->view->set('header', array('title' => \Lang:: line('action.edit.form', array('linkset' => $this->root->name)), 'options' => array('colspan' => 2)));397 $this->view->set('header', array('title' => \Lang::get('action.edit.form', array('linkset' => $this->root->name)), 'options' => array('colspan' => 2))); 384 398 } 385 399 … … 402 416 if ($this->model->system == 1) 403 417 { 404 \ExiteCMS_Messages::set(\Lang:: line('message.deleted_noaccess'), 'E');418 \ExiteCMS_Messages::set(\Lang::get('message.deleted_noaccess'), 'E'); 405 419 \ExiteCMS::redirect($this->baseurl); 406 420 } … … 409 423 410 424 // set the form info block 411 $this->view->set('info', \Lang:: line('action.delete.info', array('name' => $this->model->name, 'linkset' => $root->name)), false);425 $this->view->set('info', \Lang::get('action.delete.info', array('name' => $this->model->name, 'linkset' => $root->name)), false); 412 426 } 413 427 … … 475 489 if ( is_null($recnbr) or ! $node = $this->model->find($recnbr)) 476 490 { 477 \ExiteCMS_Messages::set(\Lang:: line('message.notfound_link'), 'E');491 \ExiteCMS_Messages::set(\Lang::get('message.notfound_link'), 'E'); 478 492 \ExiteCMS::redirect(\ExiteCMS::baseurl('links')); 479 493 } … … 488 502 if ($node->tree_make_previous_sibling_of($sibling)) 489 503 { 490 \ExiteCMS_Messages::set(\Lang:: line('message.up'), 'I');504 \ExiteCMS_Messages::set(\Lang::get('message.up'), 'I'); 491 505 } 492 506 else 493 507 { 494 \ExiteCMS_Messages::set(\Lang:: line('message.move_failed'), 'I');508 \ExiteCMS_Messages::set(\Lang::get('message.move_failed'), 'I'); 495 509 } 496 510 } 497 511 else 498 512 { 499 \ExiteCMS_Messages::set(\Lang:: line('message.move_failed'), 'I');513 \ExiteCMS_Messages::set(\Lang::get('message.move_failed'), 'I'); 500 514 } 501 515 } … … 517 531 if ( is_null($recnbr) or ! $node = $this->model->find($recnbr)) 518 532 { 519 \ExiteCMS_Messages::set(\Lang:: line('message.notfound_link'), 'E');533 \ExiteCMS_Messages::set(\Lang::get('message.notfound_link'), 'E'); 520 534 \ExiteCMS::redirect(\ExiteCMS::baseurl('links')); 521 535 } … … 530 544 if ($node->tree_make_next_sibling_of($sibling)) 531 545 { 532 \ExiteCMS_Messages::set(\Lang:: line('message.down'), 'I');546 \ExiteCMS_Messages::set(\Lang::get('message.down'), 'I'); 533 547 } 534 548 else 535 549 { 536 \ExiteCMS_Messages::set(\Lang:: line('message.move_failed'), 'I');550 \ExiteCMS_Messages::set(\Lang::get('message.move_failed'), 'I'); 537 551 } 538 552 } 539 553 else 540 554 { 541 \ExiteCMS_Messages::set(\Lang:: line('message.move_failed'), 'I');555 \ExiteCMS_Messages::set(\Lang::get('message.move_failed'), 'I'); 542 556 } 543 557 } … … 559 573 if ( is_null($recnbr) or ! $node = $this->model->find($recnbr)) 560 574 { 561 \ExiteCMS_Messages::set(\Lang:: line('message.notfound_link'), 'E');575 \ExiteCMS_Messages::set(\Lang::get('message.notfound_link'), 'E'); 562 576 \ExiteCMS::redirect(\ExiteCMS::baseurl('links')); 563 577 } … … 572 586 if ($node->tree_make_next_sibling_of($parent)) 573 587 { 574 \ExiteCMS_Messages::set(\Lang:: line('message.left'), 'I');588 \ExiteCMS_Messages::set(\Lang::get('message.left'), 'I'); 575 589 } 576 590 else 577 591 { 578 \ExiteCMS_Messages::set(\Lang:: line('message.move_failed'), 'I');592 \ExiteCMS_Messages::set(\Lang::get('message.move_failed'), 'I'); 579 593 } 580 594 } 581 595 else 582 596 { 583 \ExiteCMS_Messages::set(\Lang:: line('message.move_failed'), 'I');597 \ExiteCMS_Messages::set(\Lang::get('message.move_failed'), 'I'); 584 598 } 585 599 } -
trunk/modules/exitecms/classes/controller/locales.php
r72 r79 75 75 'value' => 1, 76 76 'type' => 'radio', 77 'values' => array(0 => \Lang:: line('global.no'), 1 => \Lang::line('global.yes')),77 'values' => array(0 => \Lang::get('global.no'), 1 => \Lang::get('global.yes')), 78 78 ); 79 79 … … 89 89 'value' => 'T405', 90 90 'type' => 'select', 91 'values' => \Lang:: line('timezones'),91 'values' => \Lang::get('timezones'), 92 92 ); 93 93 … … 103 103 'value' => 0, 104 104 'type' => 'select', 105 'values' => \Lang:: line('countries'),105 'values' => \Lang::get('countries'), 106 106 ); 107 107 } … … 115 115 // define the in-form headers 116 116 $this->view->headers = array( 117 array('title' => \Lang:: line('action.edit.form'), 'colspan' => 2)117 array('title' => \Lang::get('action.edit.form'), 'colspan' => 2) 118 118 ); 119 119 … … 135 135 if ( \Config::save('exitecms', 'exitecms')) 136 136 { 137 \ExiteCMS_Messages::set(\Lang:: line('action.edit.success'), 'C');137 \ExiteCMS_Messages::set(\Lang::get('action.edit.success'), 'C'); 138 138 } 139 139 else 140 140 { 141 \ExiteCMS_Messages::set(\Lang:: line('action.edit.failure'), 'E');141 \ExiteCMS_Messages::set(\Lang::get('action.edit.failure'), 'E'); 142 142 } 143 143 -
trunk/modules/exitecms/classes/controller/messages.php
r61 r79 31 31 { 32 32 // load the messages viewmodel 33 \ViewModel::f actory('messages/show');33 \ViewModel::forge('messages/show'); 34 34 } 35 35 -
trunk/modules/exitecms/classes/controller/pages.php
r72 r79 36 36 { 37 37 // define this controller's model 38 $this->model = Model_Page::f actory();38 $this->model = Model_Page::forge(); 39 39 40 40 parent::__construct($request, $response); … … 157 157 ), 158 158 'value' => 0, 159 'values' => array(0 => \Lang:: line('global.no'), 1 => \Lang::line('global.yes')),159 'values' => array(0 => \Lang::get('global.no'), 1 => \Lang::get('global.yes')), 160 160 ); 161 161 … … 171 171 ), 172 172 'value' => 0, 173 'values' => Model_ThemeTemplate::templates_dropdown(\Lang:: line('message.global_theme')),173 'values' => Model_ThemeTemplate::templates_dropdown(\Lang::get('message.global_theme')), 174 174 ); 175 175 … … 206 206 protected function button_cancel() 207 207 { 208 \ExiteCMS_Messages::set(\Lang:: line('forms.action_canceled'), 'I');208 \ExiteCMS_Messages::set(\Lang::get('forms.action_canceled'), 'I'); 209 209 210 210 $this->redirect_back(); … … 237 237 $this->view->set('headers', array( 238 238 'title' => array( 239 'title' => \Lang:: line('field.header'),240 ), 241 'options' => array( 242 'title' => \Lang:: line('field.actions'),239 'title' => \Lang::get('field.header'), 240 ), 241 'options' => array( 242 'title' => \Lang::get('field.actions'), 243 243 'options' => array( 244 244 'style' => 'width:0px; white-space:nowrap; text-align:center;', … … 251 251 if ($recnbr = $this->param(1)) 252 252 { 253 $root = Model_Page::f actory()->find()253 $root = Model_Page::forge()->find() 254 254 ->where($this->model->tree_get_property('tree_field'), $recnbr) 255 255 ->where($this->model->tree_get_property('left_field'), 1) … … 259 259 { 260 260 // if we didn't find the site root, redirect to sites 261 is_null($root) and \ExiteCMS_Messages::set(\Lang:: line('message.notfound'), 'E');261 is_null($root) and \ExiteCMS_Messages::set(\Lang::get('message.notfound'), 'E'); 262 262 \ExiteCMS::redirect(\ExiteCMS::baseurl('sites')); 263 263 } … … 267 267 { 268 268 // reset the data array 269 $ this->view->data = array();269 $data = array(); 270 270 271 271 // loop through the records found … … 273 273 { 274 274 $is_folder = $record[$this->model->tree_get_property('right_field')] - $record[$this->model->tree_get_property('left_field')] > 1; 275 $ this->view->data[] = array(275 $data[] = array( 276 276 'content' => array( 277 277 'value' => array($record['name'], $record['title']), 278 278 'icon' => $is_folder ? ($record['default'] ? 'folder_hot' : 'folder') : ($record['default'] ? 'document_hot' : 'document'), 279 'title' => $is_folder ? ($record['default'] ? \Lang:: line('message.default_folder') : '') : ($record['default'] ? \Lang::line('message.default_page') : ''),279 'title' => $is_folder ? ($record['default'] ? \Lang::get('message.default_folder') : '') : ($record['default'] ? \Lang::get('message.default_page') : ''), 280 280 ), 281 281 'tree' => array( … … 293 293 array( 294 294 'icon' => 'edit', 295 'title' => \Lang:: line('icon.edit'),295 'title' => \Lang::get('icon.edit'), 296 296 'confirm' => false, 297 297 'enabled' => true, … … 300 300 array( 301 301 'icon' => 'layout', 302 'title' => \Lang:: line('icon.layout'),302 'title' => \Lang::get('icon.layout'), 303 303 'confirm' => false, 304 304 'enabled' => ! $is_folder, … … 307 307 array( 308 308 'icon' => 'leftup', 309 'title' => \Lang:: line('icon.left'),309 'title' => \Lang::get('icon.left'), 310 310 'confirm' => false, 311 311 'enabled' => $record['system'] == 0 and ! is_null($record['_parent_']), … … 314 314 array( 315 315 'icon' => 'up', 316 'title' => \Lang:: line('icon.up'),316 'title' => \Lang::get('icon.up'), 317 317 'confirm' => false, 318 318 'enabled' => $record['system'] == 0 and $record['_first_'] == false, … … 321 321 array( 322 322 'icon' => 'down', 323 'title' => \Lang:: line('icon.down'),323 'title' => \Lang::get('icon.down'), 324 324 'confirm' => false, 325 325 'enabled' => $record['system'] == 0 and $record['_last_'] == false, … … 328 328 array( 329 329 'icon' => 'delete', 330 'title' => \Lang:: line('icon.delete'),330 'title' => \Lang::get('icon.delete'), 331 331 'confirm' => false, 332 332 'enabled' => $record['system'] == 0, … … 337 337 ); 338 338 } 339 340 $this->view->set('data', $data); 339 341 } 340 342 341 343 // extra buttons to be placed under the table 342 344 $this->view->buttons['back'] = array( 343 'title' => \Lang:: line('button.back'),345 'title' => \Lang::get('button.back'), 344 346 'class' => 'back' 345 347 ); … … 356 358 if ($recnbr = $this->param(2)) 357 359 { 358 $this->root = Model_Page::f actory()->find()360 $this->root = Model_Page::forge()->find() 359 361 ->where($this->model->tree_get_property('tree_field'), $recnbr) 360 362 ->where($this->model->tree_get_property('left_field'), 1) … … 364 366 { 365 367 // if we didn't find the site root, redirect to sites 366 \ExiteCMS_Messages::set(\Lang:: line('message.notfound'), 'E');368 \ExiteCMS_Messages::set(\Lang::get('message.notfound'), 'E'); 367 369 \ExiteCMS::redirect(\ExiteCMS::baseurl('sites')); 368 370 } … … 375 377 376 378 // fetch the template dropdown data 377 $this->data['template_id']['values'] = Model_Template::templates_dropdown($recnbr, 'title', true, \Lang:: line('other.none'));379 $this->data['template_id']['values'] = Model_Template::templates_dropdown($recnbr, 'title', true, \Lang::get('other.none')); 378 380 379 381 // define the custom form header 380 $this->view->set('header', array('title' => \Lang:: line('action.add.form', array('site' => $this->root->name)), 'options' => array('colspan' => 2)));382 $this->view->set('header', array('title' => \Lang::get('action.add.form', array('site' => $this->root->name)), 'options' => array('colspan' => 2))); 381 383 } 382 384 … … 389 391 if ($recnbr = $this->param(2)) 390 392 { 391 $this->root = Model_Page::f actory()->find()393 $this->root = Model_Page::forge()->find() 392 394 ->where($this->model->tree_get_property('tree_field'), $recnbr) 393 395 ->where($this->model->tree_get_property('left_field'), 1) … … 397 399 { 398 400 // if we didn't find the site root, redirect to sites 399 \ExiteCMS_Messages::set(\Lang:: line('message.notfound'), 'E');401 \ExiteCMS_Messages::set(\Lang::get('message.notfound'), 'E'); 400 402 \ExiteCMS::redirect(\ExiteCMS::baseurl('sites')); 401 403 } … … 426 428 427 429 // fetch the template dropdown data 428 $this->data['template_id']['values'] = Model_Template::templates_dropdown($recnbr, 'title', true, \Lang:: line('other.none'));430 $this->data['template_id']['values'] = Model_Template::templates_dropdown($recnbr, 'title', true, \Lang::get('other.none')); 429 431 430 432 // define the custom form header 431 $this->view->set('header', array('title' => \Lang:: line('action.edit.form', array('site' => $this->root->name)), 'options' => array('colspan' => 2)));433 $this->view->set('header', array('title' => \Lang::get('action.edit.form', array('site' => $this->root->name)), 'options' => array('colspan' => 2))); 432 434 } 433 435 … … 439 441 if ($this->model->system == 1) 440 442 { 441 \ExiteCMS_Messages::set(\Lang:: line('message.deleted_noaccess'), 'E');443 \ExiteCMS_Messages::set(\Lang::get('message.deleted_noaccess'), 'E'); 442 444 $this->redirect_back(); 443 445 } … … 447 449 if ($recnbr = $this->param(2)) 448 450 { 449 $this->root = Model_Page::f actory()->find()451 $this->root = Model_Page::forge()->find() 450 452 ->where($this->model->tree_get_property('tree_field'), $recnbr) 451 453 ->where($this->model->tree_get_property('left_field'), 1) … … 455 457 { 456 458 // if we didn't find the site root, redirect to sites 457 \ExiteCMS_Messages::set(\Lang:: line('message.notfound'), 'E');459 \ExiteCMS_Messages::set(\Lang::get('message.notfound'), 'E'); 458 460 \ExiteCMS::redirect(\ExiteCMS::baseurl('sites')); 459 461 } 460 462 461 463 // set the form info block 462 $this->view->set('info', \Lang:: line('action.delete.info', array('name' => $this->model->name, 'site' => $this->root->name)), false);464 $this->view->set('info', \Lang::get('action.delete.info', array('name' => $this->model->name, 'site' => $this->root->name)), false); 463 465 } 464 466 … … 521 523 if ( is_null($recnbr) or ! $node = $this->model->find($recnbr)) 522 524 { 523 \ExiteCMS_Messages::set(\Lang:: line('message.notfound_page'), 'E');525 \ExiteCMS_Messages::set(\Lang::get('message.notfound_page'), 'E'); 524 526 \ExiteCMS::redirect(\ExiteCMS::baseurl('sites')); 525 527 } … … 534 536 if ($node->tree_make_previous_sibling_of($sibling)) 535 537 { 536 \ExiteCMS_Messages::set(\Lang:: line('message.up'), 'I');538 \ExiteCMS_Messages::set(\Lang::get('message.up'), 'I'); 537 539 } 538 540 else 539 541 { 540 \ExiteCMS_Messages::set(\Lang:: line('message.move_failed'), 'I');542 \ExiteCMS_Messages::set(\Lang::get('message.move_failed'), 'I'); 541 543 } 542 544 } 543 545 else 544 546 { 545 \ExiteCMS_Messages::set(\Lang:: line('message.move_failed'), 'I');547 \ExiteCMS_Messages::set(\Lang::get('message.move_failed'), 'I'); 546 548 } 547 549 } … … 563 565 if ( is_null($recnbr) or ! $node = $this->model->find($recnbr)) 564 566 { 565 \ExiteCMS_Messages::set(\Lang:: line('message.notfound_page'), 'E');567 \ExiteCMS_Messages::set(\Lang::get('message.notfound_page'), 'E'); 566 568 \ExiteCMS::redirect(\ExiteCMS::baseurl('sites')); 567 569 } … … 576 578 if ($node->tree_make_next_sibling_of($sibling)) 577 579 { 578 \ExiteCMS_Messages::set(\Lang:: line('message.down'), 'I');580 \ExiteCMS_Messages::set(\Lang::get('message.down'), 'I'); 579 581 } 580 582 else 581 583 { 582 \ExiteCMS_Messages::set(\Lang:: line('message.move_failed'), 'I');584 \ExiteCMS_Messages::set(\Lang::get('message.move_failed'), 'I'); 583 585 } 584 586 } 585 587 else 586 588 { 587 \ExiteCMS_Messages::set(\Lang:: line('message.move_failed'), 'I');589 \ExiteCMS_Messages::set(\Lang::get('message.move_failed'), 'I'); 588 590 } 589 591 } … … 605 607 if ( is_null($recnbr) or ! $node = $this->model->find($recnbr)) 606 608 { 607 \ExiteCMS_Messages::set(\Lang:: line('message.notfound_page'), 'E');609 \ExiteCMS_Messages::set(\Lang::get('message.notfound_page'), 'E'); 608 610 \ExiteCMS::redirect(\ExiteCMS::baseurl('sites')); 609 611 } … … 618 620 if ($node->tree_make_next_sibling_of($parent)) 619 621 { 620 \ExiteCMS_Messages::set(\Lang:: line('message.left'), 'I');622 \ExiteCMS_Messages::set(\Lang::get('message.left'), 'I'); 621 623 } 622 624 else 623 625 { 624 \ExiteCMS_Messages::set(\Lang:: line('message.move_failed'), 'I');626 \ExiteCMS_Messages::set(\Lang::get('message.move_failed'), 'I'); 625 627 } 626 628 } 627 629 else 628 630 { 629 \ExiteCMS_Messages::set(\Lang:: line('message.move_failed'), 'I');631 \ExiteCMS_Messages::set(\Lang::get('message.move_failed'), 'I'); 630 632 } 631 633 } … … 679 681 if ($parent and $this->model->tree_make_last_child_of($parent)) 680 682 { 681 \ExiteCMS_Messages::set(\Lang:: line('message.newparent'), 'I');683 \ExiteCMS_Messages::set(\Lang::get('message.newparent'), 'I'); 682 684 } 683 685 else 684 686 { 685 \ExiteCMS_Messages::set(\Lang:: line('message.move_failed'), 'E');687 \ExiteCMS_Messages::set(\Lang::get('message.move_failed'), 'E'); 686 688 } 687 689 } -
trunk/modules/exitecms/classes/controller/phpinfo.php
r68 r79 32 32 iconv_set_encoding("internal_encoding", "UTF-8"); 33 33 // load the phpinfo viewmodel 34 \ViewModel::f actory('phpinfo/phpinfo');34 \ViewModel::forge('phpinfo/phpinfo'); 35 35 } 36 36 } -
trunk/modules/exitecms/classes/controller/security.php
r72 r79 55 55 'type' => 'radio', 56 56 'value' => 0, 57 'values' => array(0 => \Lang:: line('global.no'), 1 => \Lang::line('global.yes')),57 'values' => array(0 => \Lang::get('global.no'), 1 => \Lang::get('global.yes')), 58 58 ); 59 59 … … 68 68 'type' => 'radio', 69 69 'value' => 1, 70 'values' => array(0 => \Lang:: line('global.no'), 1 => \Lang::line('global.yes')),70 'values' => array(0 => \Lang::get('global.no'), 1 => \Lang::get('global.yes')), 71 71 ); 72 72 … … 81 81 'type' => 'radio', 82 82 'value' => 0, 83 'values' => array(0 => \Lang:: line('global.no'), 1 => \Lang::line('global.yes')),83 'values' => array(0 => \Lang::get('global.no'), 1 => \Lang::get('global.yes')), 84 84 ); 85 85 … … 94 94 'type' => 'radio', 95 95 'value' => 1, 96 'values' => array(0 => \Lang:: line('global.no'), 1 => \Lang::line('global.yes')),96 'values' => array(0 => \Lang::get('global.no'), 1 => \Lang::get('global.yes')), 97 97 ); 98 98 … … 107 107 'type' => 'radio', 108 108 'value' => 0, 109 'values' => array(0 => \Lang:: line('global.no'), 1 => \Lang::line('global.yes')),109 'values' => array(0 => \Lang::get('global.no'), 1 => \Lang::get('global.yes')), 110 110 ); 111 111 … … 120 120 'type' => 'radio', 121 121 'value' => 0, 122 'values' => array(0 => \Lang:: line('global.no'), 1 => \Lang::line('global.yes')),122 'values' => array(0 => \Lang::get('global.no'), 1 => \Lang::get('global.yes')), 123 123 ); 124 124 … … 133 133 'type' => 'radio', 134 134 'value' => 0, 135 'values' => array(0 => \Lang:: line('global.no'), 1 => \Lang::line('global.yes')),135 'values' => array(0 => \Lang::get('global.no'), 1 => \Lang::get('global.yes')), 136 136 ); 137 137 … … 159 159 'type' => 'radio', 160 160 'value' => 0, 161 'values' => array(0 => \Lang:: line('global.no'), 1 => \Lang::line('global.yes')),161 'values' => array(0 => \Lang::get('global.no'), 1 => \Lang::get('global.yes')), 162 162 ); 163 163 … … 172 172 'type' => 'radio', 173 173 'value' => 0, 174 'values' => array(0 => \Lang:: line('global.no'), 1 => \Lang::line('global.yes')),174 'values' => array(0 => \Lang::get('global.no'), 1 => \Lang::get('global.yes')), 175 175 ); 176 176 … … 198 198 'type' => 'select', 199 199 'value' => 0, 200 'values' => array(0 => \Lang:: line('global.none_selected')),200 'values' => array(0 => \Lang::get('global.none_selected')), 201 201 ); 202 202 } … … 210 210 // define the in-form headers 211 211 $this->view->set('header', array( 212 array('title' => \Lang:: line('action.edit.form.1'), 'options' => array('colspan' => 2)),213 array('title' => \Lang:: line('action.edit.form.2'), 'options' => array('colspan' => 2), 'before' => 'login_https'),214 array('title' => \Lang:: line('action.edit.form.3'), 'options' => array('colspan' => 2), 'before' => 'account_logins'),215 array('title' => \Lang:: line('action.edit.form.4'), 'options' => array('colspan' => 2), 'before' => 'form_captcha'),212 array('title' => \Lang::get('action.edit.form.1'), 'options' => array('colspan' => 2)), 213 array('title' => \Lang::get('action.edit.form.2'), 'options' => array('colspan' => 2), 'before' => 'login_https'), 214 array('title' => \Lang::get('action.edit.form.3'), 'options' => array('colspan' => 2), 'before' => 'account_logins'), 215 array('title' => \Lang::get('action.edit.form.4'), 'options' => array('colspan' => 2), 'before' => 'form_captcha'), 216 216 )); 217 217 … … 233 233 if ( \Config::save('exitecms', 'exitecms')) 234 234 { 235 \ExiteCMS_Messages::set(\Lang:: line('action.edit.success'), 'C');235 \ExiteCMS_Messages::set(\Lang::get('action.edit.success'), 'C'); 236 236 } 237 237 else 238 238 { 239 \ExiteCMS_Messages::set(\Lang:: line('action.edit.failure'), 'E');239 \ExiteCMS_Messages::set(\Lang::get('action.edit.failure'), 'E'); 240 240 } 241 241 -
trunk/modules/exitecms/classes/controller/sites.php
r72 r79 44 44 { 45 45 // define this controller's model 46 $this->model = Model_Site::f actory();46 $this->model = Model_Site::forge(); 47 47 48 48 parent::__construct($request, $response); … … 99 99 // field: post 100 100 $this->fields['port'] = array( 101 'label' => \Lang:: line('field.portnr'),101 'label' => \Lang::get('field.portnr'), 102 102 'validation' => array( 103 103 'rules' => 'trim|match_pattern["/^[0-9]{1,}$/"]', 104 104 'flags' => 'numeric', 105 105 'messages' => array( 106 'match_pattern' => \Lang:: line('message.port_invalid'),106 'match_pattern' => \Lang::get('message.port_invalid'), 107 107 ), 108 108 ), … … 123 123 ), 124 124 'value' => 0, 125 'values' => array(0 => \Lang:: line('global.no'), 1 => \Lang::line('global.yes')),125 'values' => array(0 => \Lang::get('global.no'), 1 => \Lang::get('global.yes')), 126 126 ); 127 127 … … 136 136 ), 137 137 'value' => 0, 138 'values' => array(0 => \Lang:: line('global.no'), 1 => \Lang::line('global.yes')),138 'values' => array(0 => \Lang::get('global.no'), 1 => \Lang::get('global.yes')), 139 139 ); 140 140 … … 236 236 $this->view->set('headers', array( 237 237 'name' => array( 238 'title' => \Lang:: line('field.name'),238 'title' => \Lang::get('field.name'), 239 239 'options' => array( 240 240 'colspan' => '2', … … 242 242 ), 243 243 'host' => array( 244 'title' => \Lang:: line('field.host'),244 'title' => \Lang::get('field.host'), 245 245 ), 246 246 'port' => array( 247 'title' => \Lang:: line('field.port'),247 'title' => \Lang::get('field.port'), 248 248 'options' => array( 249 249 'style' => 'width:0px; white-space:nowrap; text-align:center;', … … 251 251 ), 252 252 'options' => array( 253 'title' => \Lang:: line('field.actions'),253 'title' => \Lang::get('field.actions'), 254 254 'options' => array( 255 255 'style' => 'width:0px; white-space:nowrap; text-align:center;', … … 262 262 { 263 263 // reset the data array 264 $ this->view->data = array();264 $data = array(); 265 265 266 266 // loop through the records found 267 267 foreach($this->data as $record) 268 268 { 269 $host = $record->host == '*' ? htmlentities(\Lang:: line('other.any')) : $record->host;270 $port = $record->port == 0 ? htmlentities(\Lang:: line('other.any')) : $record->port;271 272 $ this->view->data[] = array(269 $host = $record->host == '*' ? htmlentities(\Lang::get('other.any')) : $record->host; 270 $port = $record->port == 0 ? htmlentities(\Lang::get('other.any')) : $record->port; 271 272 $data[] = array( 273 273 'default' => array( 274 274 'icon' => $record->default ? 'tbl_default' : 'tbl_opt_none', … … 297 297 array( 298 298 'icon' => 'edit', 299 'title' => \Lang:: line('icon.edit'),299 'title' => \Lang::get('icon.edit'), 300 300 'confirm' => false, 301 301 'enabled' => true, … … 304 304 array( 305 305 'icon' => 'sitemap', 306 'title' => \Lang:: line('icon.sitemap'),306 'title' => \Lang::get('icon.sitemap'), 307 307 'confirm' => false, 308 308 'enabled' => $record->system != 1, … … 311 311 array( 312 312 'icon' => 'templates', 313 'title' => \Lang:: line('icon.templates'),313 'title' => \Lang::get('icon.templates'), 314 314 'confirm' => false, 315 315 'enabled' => $record->system != 1, … … 318 318 array( 319 319 'icon' => 'delete', 320 'title' => \Lang:: line('icon.delete'),320 'title' => \Lang::get('icon.delete'), 321 321 'confirm' => false, 322 322 'enabled' => $record->system != 1, … … 327 327 ); 328 328 } 329 $this->view->set('data', $data); 329 330 } 330 331 } … … 350 351 $this->data['page_403']['values'] = 351 352 $this->data['page_404']['values'] = 352 Model_Page::pages_dropdown($this->data['id']['value'], 'title', true, \Lang:: line('other.none'));353 Model_Page::pages_dropdown($this->data['id']['value'], 'title', true, \Lang::get('other.none')); 353 354 } 354 355 … … 369 370 if ($this->model->system == 1) 370 371 { 371 \ExiteCMS::set_message(\Lang:: line('message.deleted_noaccess'), 'E');372 \ExiteCMS::set_message(\Lang::get('message.deleted_noaccess'), 'E'); 372 373 \ExiteCMS::redirect($this->baseurl); 373 374 } 374 375 375 376 // set the form info block 376 $this->view->set('info', \Lang:: line('action.delete.info', array('website' => $this->model->name)), false);377 $this->view->set('info', \Lang::get('action.delete.info', array('website' => $this->model->name)), false); 377 378 } 378 379 … … 439 440 if (preg_match($pattern, $this->model->host) !== 1) 440 441 { 441 \ExiteCMS::set_message(\Lang:: line('message.invalid_hostname'), 'W');442 \ExiteCMS::set_message(\Lang::get('message.invalid_hostname'), 'W'); 442 443 } 443 444 } -
trunk/modules/exitecms/classes/controller/templates.php
r73 r79 36 36 { 37 37 // define this controller's model 38 $this->model = Model_Template::f actory();38 $this->model = Model_Template::forge(); 39 39 40 40 parent::__construct($request, $response); … … 160 160 protected function button_cancel() 161 161 { 162 \ExiteCMS_Messages::set(\Lang:: line('forms.action_canceled'), 'I');162 \ExiteCMS_Messages::set(\Lang::get('forms.action_canceled'), 'I'); 163 163 164 164 $this->redirect_back(); … … 191 191 $this->view->set('headers', array( 192 192 'title' => array( 193 'title' => \Lang:: line('field.header'),194 ), 195 'options' => array( 196 'title' => \Lang:: line('field.actions'),193 'title' => \Lang::get('field.header'), 194 ), 195 'options' => array( 196 'title' => \Lang::get('field.actions'), 197 197 'options' => array( 198 198 'style' => 'width:0px; white-space:nowrap; text-align:center;', … … 205 205 if ($recnbr = $this->param(1)) 206 206 { 207 $root = Model_Page::f actory()->find()207 $root = Model_Page::forge()->find() 208 208 ->where($this->model->tree_get_property('tree_field'), $recnbr) 209 209 ->where($this->model->tree_get_property('left_field'), 1) … … 213 213 { 214 214 // if we didn't find the site root, redirect to sites 215 is_null($root) and \ExiteCMS_Messages::set(\Lang:: line('message.notfound'), 'E');215 is_null($root) and \ExiteCMS_Messages::set(\Lang::get('message.notfound'), 'E'); 216 216 \ExiteCMS::redirect(\ExiteCMS::baseurl('sites')); 217 217 } … … 221 221 { 222 222 // reset the data array 223 $ this->view->data = array();223 $data = array(); 224 224 225 225 // loop through the records found … … 227 227 { 228 228 $is_folder = $record[$this->model->tree_get_property('right_field')] - $record[$this->model->tree_get_property('left_field')] > 1; 229 $ this->view->data[] = array(229 $data[] = array( 230 230 'content' => array( 231 231 'value' => array($record['name'], $record['title']), … … 246 246 array( 247 247 'icon' => 'edit', 248 'title' => \Lang:: line('icon.edit'),248 'title' => \Lang::get('icon.edit'), 249 249 'confirm' => false, 250 250 'enabled' => true, … … 253 253 array( 254 254 'icon' => 'layout', 255 'title' => \Lang:: line('icon.layout'),255 'title' => \Lang::get('icon.layout'), 256 256 'confirm' => false, 257 257 'enabled' => ! $is_folder, … … 260 260 array( 261 261 'icon' => 'up', 262 'title' => \Lang:: line('icon.up'),262 'title' => \Lang::get('icon.up'), 263 263 'confirm' => false, 264 264 'enabled' => $record['system'] == 0 and $record['_first_'] == false, … … 267 267 array( 268 268 'icon' => 'down', 269 'title' => \Lang:: line('icon.down'),269 'title' => \Lang::get('icon.down'), 270 270 'confirm' => false, 271 271 'enabled' => $record['system'] == 0 and $record['_last_'] == false, … … 274 274 array( 275 275 'icon' => 'delete', 276 'title' => \Lang:: line('icon.delete'),276 'title' => \Lang::get('icon.delete'), 277 277 'confirm' => false, 278 278 'enabled' => $record['system'] == 0, … … 283 283 ); 284 284 } 285 286 $this->view->set('data', $data); 285 287 } 286 288 287 289 // extra buttons to be placed under the table 288 290 $this->view->buttons['back'] = array( 289 'title' => \Lang:: line('button.back'),291 'title' => \Lang::get('button.back'), 290 292 'class' => 'back' 291 293 ); … … 301 303 if ($recnbr = $this->param(2)) 302 304 { 303 $this->root = Model_Page::f actory()->find()305 $this->root = Model_Page::forge()->find() 304 306 ->where($this->model->tree_get_property('tree_field'), $recnbr) 305 307 ->where($this->model->tree_get_property('left_field'), 1) … … 309 311 { 310 312 // if we didn't find the site root, redirect to sites 311 \ExiteCMS_Messages::set(\Lang:: line('message.notfound'), 'E');313 \ExiteCMS_Messages::set(\Lang::get('message.notfound'), 'E'); 312 314 \ExiteCMS::redirect(\ExiteCMS::baseurl('sites')); 313 315 } 314 316 315 317 // define the custom form header 316 $this->view->set('header', array('title' => \Lang:: line('action.add.form', array('site' => $this->root->name)), 'options' => array('colspan' => 2)));318 $this->view->set('header', array('title' => \Lang::get('action.add.form', array('site' => $this->root->name)), 'options' => array('colspan' => 2))); 317 319 } 318 320 … … 325 327 if ($recnbr = $this->param(2)) 326 328 { 327 $this->root = Model_Page::f actory()->find()329 $this->root = Model_Page::forge()->find() 328 330 ->where($this->model->tree_get_property('tree_field'), $recnbr) 329 331 ->where($this->model->tree_get_property('left_field'), 1) … … 333 335 { 334 336 // if we didn't find the site root, redirect to sites 335 \ExiteCMS_Messages::set(\Lang:: line('message.notfound'), 'E');337 \ExiteCMS_Messages::set(\Lang::get('message.notfound'), 'E'); 336 338 \ExiteCMS::redirect(\ExiteCMS::baseurl('sites')); 337 339 } … … 349 351 350 352 // define the custom form header 351 $this->view->set('header', array('title' => \Lang:: line('action.edit.form', array('site' => $this->root->name)), 'options' => array('colspan' => 2)));353 $this->view->set('header', array('title' => \Lang::get('action.edit.form', array('site' => $this->root->name)), 'options' => array('colspan' => 2))); 352 354 } 353 355 … … 359 361 if ($this->model->system == 1) 360 362 { 361 \ExiteCMS_Messages::set(\Lang:: line('message.deleted_noaccess'), 'E');363 \ExiteCMS_Messages::set(\Lang::get('message.deleted_noaccess'), 'E'); 362 364 $this->redirect_back(); 363 365 } … … 367 369 if ($recnbr = $this->param(2)) 368 370 { 369 $this->root = Model_Page::f actory()->find()371 $this->root = Model_Page::forge()->find() 370 372 ->where($this->model->tree_get_property('tree_field'), $recnbr) 371 373 ->where($this->model->tree_get_property('left_field'), 1) … … 375 377 { 376 378 // if we didn't find the site root, redirect to sites 377 \ExiteCMS_Messages::set(\Lang:: line('message.notfound'), 'E');379 \ExiteCMS_Messages::set(\Lang::get('message.notfound'), 'E'); 378 380 \ExiteCMS::redirect(\ExiteCMS::baseurl('sites')); 379 381 } 380 382 381 383 // set the form info block 382 $this->view->set('info', \Lang:: line('action.delete.info', array('name' => $this->model->name, 'site' => $this->root->name)), false);384 $this->view->set('info', \Lang::get('action.delete.info', array('name' => $this->model->name, 'site' => $this->root->name)), false); 383 385 } 384 386 … … 398 400 if ( is_null($recnbr) or ! $node = $this->model->find($recnbr)) 399 401 { 400 \ExiteCMS_Messages::set(\Lang:: line('message.notfound_template'), 'E');402 \ExiteCMS_Messages::set(\Lang::get('message.notfound_template'), 'E'); 401 403 \ExiteCMS::redirect(\ExiteCMS::baseurl('sites')); 402 404 } … … 411 413 if ($node->tree_make_previous_sibling_of($sibling)) 412 414 { 413 \ExiteCMS_Messages::set(\Lang:: line('message.up'), 'I');415 \ExiteCMS_Messages::set(\Lang::get('message.up'), 'I'); 414 416 } 415 417 else 416 418 { 417 \ExiteCMS_Messages::set(\Lang:: line('message.move_failed'), 'I');419 \ExiteCMS_Messages::set(\Lang::get('message.move_failed'), 'I'); 418 420 } 419 421 } 420 422 else 421 423 { 422 \ExiteCMS_Messages::set(\Lang:: line('message.move_failed'), 'I');424 \ExiteCMS_Messages::set(\Lang::get('message.move_failed'), 'I'); 423 425 } 424 426 } … … 440 442 if ( is_null($recnbr) or ! $node = $this->model->find($recnbr)) 441 443 { 442 \ExiteCMS_Messages::set(\Lang:: line('message.notfound_template'), 'E');444 \ExiteCMS_Messages::set(\Lang::get('message.notfound_template'), 'E'); 443 445 \ExiteCMS::redirect(\ExiteCMS::baseurl('sites')); 444 446 } … … 453 455 if ($node->tree_make_next_sibling_of($sibling)) 454 456 { 455 \ExiteCMS_Messages::set(\Lang:: line('message.down'), 'I');457 \ExiteCMS_Messages::set(\Lang::get('message.down'), 'I'); 456 458 } 457 459 else 458 460 { 459 \ExiteCMS_Messages::set(\Lang:: line('message.move_failed'), 'I');461 \ExiteCMS_Messages::set(\Lang::get('message.move_failed'), 'I'); 460 462 } 461 463 } 462 464 else 463 465 { 464 \ExiteCMS_Messages::set(\Lang:: line('message.move_failed'), 'I');466 \ExiteCMS_Messages::set(\Lang::get('message.move_failed'), 'I'); 465 467 } 466 468 } … … 478 480 { 479 481 // set the form title 480 $this->view->set('title', \Lang:: line('action.layout.title'), false);482 $this->view->set('title', \Lang::get('action.layout.title'), false); 481 483 482 484 // set the form info block 483 $this->view->set('info', \Lang:: line('action.layout.info'), false);485 $this->view->set('info', \Lang::get('action.layout.info'), false); 484 486 485 487 // define the form header 486 $this->view->set('header', array('title' => \Lang:: line('action.layout.form'), 'options' => array('colspan' => 2)));488 $this->view->set('header', array('title' => \Lang::get('action.layout.form'), 'options' => array('colspan' => 2))); 487 489 488 490 // define the theme page layout … … 493 495 494 496 // define the area's on the page 495 $div = \View::f actory('forms/layout_selector');497 $div = \View::forge('forms/layout_selector'); 496 498 $areas = array(); 497 499 foreach (\Theme::instance('exitecms')->get_areas() as $name => $area) … … 520 522 $this->view->buttons = array( 521 523 'templates' => array( 522 'title' => \Lang:: line('button.templates'),524 'title' => \Lang::get('button.templates'), 523 525 'class' => 'back' 524 526 ), -
trunk/modules/exitecms/classes/controller/themes.php
r73 r79 36 36 { 37 37 // define this controller's model 38 $this->model = Model_Theme::f actory();38 $this->model = Model_Theme::forge(); 39 39 40 40 parent::__construct($request, $response); … … 116 116 { 117 117 // get the theme controller instance 118 $theme = \Theme::f actory($this->param(1));118 $theme = \Theme::forge($this->param(1)); 119 119 120 120 // fetch the defined templates 121 121 $templates = $theme->templates(); 122 122 123 // and load their configs 124 foreach($templates as $template) 125 { 126 $theme->load_config($template); 127 } 128 129 // now fetch the entire info array 123 // fetch the theme info array 130 124 $themeinfo = $theme->info(); 131 125 } 132 126 catch (\Exception $e) 133 127 { 134 \ExiteCMS_Messages::set(\Lang:: line('forms.record_not_found'), 'E');128 \ExiteCMS_Messages::set(\Lang::get('forms.record_not_found'), 'E'); 135 129 \ExiteCMS::redirect($this->baseurl); 136 130 } 137 131 138 132 // set the form title 139 $this->view->set('title', \Lang:: line('action.info.title'), false);133 $this->view->set('title', \Lang::get('action.info.title'), false); 140 134 141 135 // set the form info block 142 $this->view->set('info', \Lang:: line('action.info.info'), false);136 $this->view->set('info', \Lang::get('action.info.info'), false); 143 137 144 138 // define the in-form headers 145 139 $this->view->set('header', array( 146 array('title' => \Lang:: line('action.info.form.1'), 'options' => array('colspan' => 2)),147 array('title' => \Lang:: line('action.info.form.2'), 'options' => array('colspan' => 2), 'before' => 'languages'),148 array('title' => \Lang:: line('action.info.form.3'), 'options' => array('colspan' => 2), 'before' => 'template.0'),140 array('title' => \Lang::get('action.info.form.1'), 'options' => array('colspan' => 2)), 141 array('title' => \Lang::get('action.info.form.2'), 'options' => array('colspan' => 2), 'before' => 'languages'), 142 array('title' => \Lang::get('action.info.form.3'), 'options' => array('colspan' => 2), 'before' => 'template.0'), 149 143 )); 150 144 … … 163 157 case 'system': 164 158 $this->data[$name] = array( 165 'label' => \Lang:: line('field.'.$name),166 'value' => $info ? \Lang:: line('global.yes') : \Lang::line('global.no'),159 'label' => \Lang::get('field.'.$name), 160 'value' => $info ? \Lang::get('global.yes') : \Lang::get('global.no'), 167 161 ); 168 162 break; … … 170 164 case 'version': 171 165 $this->data[$name] = array( 172 'label' => \Lang:: line('field.'.$name),166 'label' => \Lang::get('field.'.$name), 173 167 'value' => sprintf('%1.1f', $info), 168 ); 169 break; 170 171 case 'creationDate': 172 $this->data[$name] = array( 173 'label' => \Lang::get('field.'.$name), 174 'value' => strftime(\Config::get('exitecms.datetime.longdate'), $info), 174 175 ); 175 176 break; … … 182 183 default: 183 184 $this->data[$name] = array( 184 'label' => \Lang:: line('field.'.$name),185 'label' => \Lang::get('field.'.$name), 185 186 'value' => nl2br($info), 186 187 ); … … 192 193 { 193 194 $this->data['languages'] = array( 194 'label' => \Lang:: line('field.languages'),195 'value' => \Lang:: line('message.no_languages'),195 'label' => \Lang::get('field.languages'), 196 'value' => \Lang::get('message.no_languages'), 196 197 ); 197 198 } … … 208 209 { 209 210 $this->data['template.0'] = array( 210 'label' => \Lang:: line('field.name'),211 'value' => \Lang:: line('message.no_templates'),211 'label' => \Lang::get('field.name'), 212 'value' => \Lang::get('message.no_templates'), 212 213 ); 213 214 } … … 219 220 { 220 221 $this->data['template.'.$count] = array( 221 'label' => \Lang:: line('field.name'),222 'label' => \Lang::get('field.name'), 222 223 'value' => $name, 223 224 ); 224 225 $this->data['description.'.$count] = array( 225 'label' => \Lang:: line('field.description'),226 'value' => empty($template['description']) ? \Lang:: line('message.no_description') : $template['description'],226 'label' => \Lang::get('field.description'), 227 'value' => empty($template['description']) ? \Lang::get('message.no_description') : $template['description'], 227 228 ); 228 229 … … 230 231 { 231 232 $this->data['area.'.$count++] = array( 232 'label' => \Lang:: line('field.sections'),233 'value' => \Lang:: line('message.no_sections'),233 'label' => \Lang::get('field.sections'), 234 'value' => \Lang::get('message.no_sections'), 234 235 'extra' => array('separator' => $count < $templates), 235 236 ); … … 244 245 245 246 $this->data['area.'.$count++] = array( 246 'label' => \Lang:: line('field.sections'),247 'label' => \Lang::get('field.sections'), 247 248 'value' => $areas, 248 249 'extra' => array('separator' => $count < $templates), … … 258 259 $this->view->buttons = array( 259 260 'back' => array( 260 'title' => \Lang:: line('button.back'),261 'title' => \Lang::get('button.back'), 261 262 'class' => 'back' 262 263 ), … … 272 273 { 273 274 // get the theme controller instance 274 $theme = \Theme::factory($this->param(1)); 275 276 // fetch the defined templates 277 $templates = $theme->templates(); 278 279 // and load their configs 280 foreach($templates as $template) 281 { 282 $theme->load_config($template); 283 } 284 285 // now fetch the entire info array 286 $themeinfo = $theme->info(); 287 288 // create the theme record 289 $this->model->name = $this->param(1); 290 $this->model->description = $themeinfo['info']['description']; 291 $this->model->version = $themeinfo['info']['version']; 292 $this->model->revision = $themeinfo['info']['revision']; 293 $this->model->system = $themeinfo['info']['system'] ? '1' : '0'; 294 $this->model->active = '1'; 295 296 // add the theme templates 297 if ( ! empty($themeinfo['templates'])) 298 { 299 foreach ($themeinfo['templates'] as $name => $template) 300 { 301 $tplobj = new Model_ThemeTemplate(); 302 $tplobj->name = $name; 303 $tplobj->description = $template['description']; 304 $tplobj->active = '1'; 305 $areas = ''; 306 foreach ($template['areas'] as $name => $area) 307 { 308 $areas .= (empty($areas) ? '' : ',') . $name; 309 } 310 $tplobj->sections = $areas; 311 $this->model->themetemplate[] = $tplobj; 312 } 313 } 314 315 $this->model->save(); 316 317 \ExiteCMS_Messages::set(\Lang::line('action.install.success'), 'I'); 275 $theme = \Theme::forge($this->param(1)); 276 277 // start the installer 278 $theme->install($this->param(1), $this->model); 279 280 \ExiteCMS_Messages::set(\Lang::get('action.install.success'), 'I'); 318 281 } 319 282 catch (\Exception $e) 320 283 { 321 \ExiteCMS_Messages::set(\Lang:: line('forms.record_not_found'), 'E');284 \ExiteCMS_Messages::set(\Lang::get('forms.record_not_found'), 'E'); 322 285 } 323 286 … … 334 297 $this->model->save(); 335 298 336 \ExiteCMS_Messages::set(\Lang:: line('action.activate.success'), 'I');299 \ExiteCMS_Messages::set(\Lang::get('action.activate.success'), 'I'); 337 300 338 301 \ExiteCMS::redirect($this->baseurl); … … 348 311 $this->model->save(); 349 312 350 \ExiteCMS_Messages::set(\Lang:: line('action.deactivate.success'), 'I');313 \ExiteCMS_Messages::set(\Lang::get('action.deactivate.success'), 'I'); 351 314 352 315 \ExiteCMS::redirect($this->baseurl); … … 371 334 $this->view->set('headers', array( 372 335 'name' => array( 373 'title' => \Lang:: line('field.name'),336 'title' => \Lang::get('field.name'), 374 337 'options' => array( 375 338 'colspan' => '2', … … 377 340 ), 378 341 'description' => array( 379 'title' => \Lang:: line('field.description'),342 'title' => \Lang::get('field.description'), 380 343 ), 381 344 'options' => array( 382 'title' => \Lang:: line('field.actions'),345 'title' => \Lang::get('field.actions'), 383 346 'options' => array( 384 347 'style' => 'width:0px; white-space:nowrap; text-align:center;', … … 391 354 { 392 355 // reset the data array 393 $ this->view->data = array();356 $data = array(); 394 357 395 358 // loop through the records found 396 359 foreach($this->data as $record) 397 360 { 398 $ this->view->data[] = array(361 $data[] = array( 399 362 'default' => array( 400 363 'icon' => $record->system == -1 ? 'tbl_error' : 'tbl_opt_none', 401 'title' => $record->system == -1 ? \Lang:: line('message.missing') : '',364 'title' => $record->system == -1 ? \Lang::get('message.missing') : '', 402 365 'options' => array( 403 366 'style' => 'width:0px; text-align:center; white-space:nowrap;', … … 417 380 array( 418 381 'icon' => 'info', 419 'title' => \Lang:: line('icon.info'),382 'title' => \Lang::get('icon.info'), 420 383 'confirm' => false, 421 384 'enabled' => $record->system != -1, … … 424 387 array( 425 388 'icon' => 'install', 426 'title' => \Lang:: line('icon.install'),389 'title' => \Lang::get('icon.install'), 427 390 'confirm' => false, 428 'enabled' => $record->id == 0 ,391 'enabled' => $record->id == 0 and $record->system != -1, 429 392 'url' => $this->baseurl.'/install/'.$record->name, 430 393 ), 431 394 array( 432 395 'icon' => 'plus', 433 'title' => \Lang:: line('icon.activate'),396 'title' => \Lang::get('icon.activate'), 434 397 'confirm' => false, 435 398 'enabled' => $record->id != 0 and $record->system == 0 and $record->active == 0, … … 438 401 array( 439 402 'icon' => 'minus', 440 'title' => \Lang:: line('icon.deactivate'),403 'title' => \Lang::get('icon.deactivate'), 441 404 'confirm' => false, 442 405 'enabled' => $record->id != 0 and $record->system == 0 and $record->active != 0, … … 445 408 array( 446 409 'icon' => 'delete', 447 'title' => \Lang:: line('icon.remove'),410 'title' => \Lang::get('icon.remove'), 448 411 'confirm' => false, 449 412 'enabled' => $record->id != 0 and $record->system < 1, … … 454 417 ); 455 418 } 419 420 $this->view->set('data', $data); 456 421 } 457 422 … … 460 425 } 461 426 427 // ----------------------------------------------------------------- 428 462 429 protected function before_delete() 463 430 { … … 467 434 if ( ! empty($template->site)) 468 435 { 469 \ExiteCMS_Messages::set(\Lang:: line('action.delete.site_used'), 'W');436 \ExiteCMS_Messages::set(\Lang::get('action.delete.site_used'), 'W'); 470 437 } 471 438 if ( ! empty($template->page)) 472 439 { 473 \ExiteCMS_Messages::set(\Lang:: line('action.delete.page_used'), 'W');440 \ExiteCMS_Messages::set(\Lang::get('action.delete.page_used'), 'W'); 474 441 } 475 442 } 476 443 477 444 // set the form info block 478 $this->view->set('info', \Lang::line('action.delete.info', array('name' => $this->data['name']['value'], 'description' => $this->data['description']['value'])), false); 479 } 445 $this->view->set('info', \Lang::get('action.delete.info', array('name' => $this->data['name']['value'], 'description' => $this->data['description']['value'])), false); 446 } 447 448 // ----------------------------------------------------------------- 480 449 481 450 protected function after_delete() 482 451 { 483 // check if this theme is used anywhere 484 foreach($this->model->themetemplate as $template) 485 { 486 var_dump($template->site); 487 var_dump($template->page); 488 } 489 490 // set the form info block 491 $this->view->set('info', \Lang::line('action.delete.info', array('name' => $this->data['name']['value'], 'description' => $this->data['description']['value'])), false); 452 var_dump($this->model); 453 var_dump($this->data); 454 die(); 455 // fetch the information array of the selected theme 456 try 457 { 458 // get the theme controller instance 459 $theme = \Theme::forge($this->param(1)); 460 461 // start the installer 462 $theme->remove($this->param(1), $this->model); 463 } 464 catch (\Exception $e) 465 { 466 } 492 467 } 493 468 … … 532 507 $result->id = 0; 533 508 $result->active = 0; 534 $result->system = $info['info']['system'] ;509 $result->system = $info['info']['system'] ? '1' : '0'; 535 510 $result->description = $info['info']['description']; 536 511 $results[$theme] = $result; -
trunk/modules/exitecms/classes/controller/users.php
r72 r79 44 44 { 45 45 // define this controller's model 46 $this->model = Model_User::f actory();46 $this->model = Model_User::forge(); 47 47 48 48 parent::__construct($request, $response); … … 185 185 'type' => 'radio', 186 186 'value' => '', 187 'values' => \Lang:: line('other.genderlist'),187 'values' => \Lang::get('other.genderlist'), 188 188 ); 189 189 … … 211 211 'type' => 'select', 212 212 'value' => '', 213 'values' => \Lang:: line('timezones'),213 'values' => \Lang::get('timezones'), 214 214 ); 215 215 } … … 233 233 $this->view->set('headers', array( 234 234 'name' => array( 235 'title' => \Lang:: line('field.name'),235 'title' => \Lang::get('field.name'), 236 236 ), 237 237 'email' => array( 238 'title' => \Lang:: line('field.email'),238 'title' => \Lang::get('field.email'), 239 239 ), 240 240 'joined' => array( 241 'title' => \Lang:: line('field.joined'),242 ), 243 'options' => array( 244 'title' => \Lang:: line('field.actions'),241 'title' => \Lang::get('field.joined'), 242 ), 243 'options' => array( 244 'title' => \Lang::get('field.actions'), 245 245 'options' => array( 246 246 'style' => 'width:0px; white-space:nowrap; text-align:center;', … … 253 253 { 254 254 // reset the data array 255 $ this->view->data = array();255 $data = array(); 256 256 257 257 // loop through the records found 258 258 foreach($this->data as $record) 259 259 { 260 $ this->view->data[] = array(260 $data[] = array( 261 261 'name' => array( 262 262 'value' => $record->name … … 275 275 array( 276 276 'icon' => 'edit', 277 'title' => \Lang:: line('icon.edit'),277 'title' => \Lang::get('icon.edit'), 278 278 'confirm' => false, 279 279 'enabled' => true, … … 282 282 array( 283 283 'icon' => 'delete', 284 'title' => \Lang:: line('icon.delete'),284 'title' => \Lang::get('icon.delete'), 285 285 'confirm' => false, 286 286 'enabled' => $record->id != 1, … … 291 291 ); 292 292 } 293 294 $this->view->set('data', $data); 293 295 } 294 296 } … … 301 303 if ($this->model->id == 1) 302 304 { 303 \ExiteCMS::set_message(\Lang:: line('message.deleted_noaccess'), 'E');305 \ExiteCMS::set_message(\Lang::get('message.deleted_noaccess'), 'E'); 304 306 \ExiteCMS::redirect($this->baseurl); 305 307 } -
trunk/modules/exitecms/classes/model/page.php
r72 r79 82 82 public static function pages_dropdown($id, $field = '', $exclude_root = true, $allow_empty = false) 83 83 { 84 $page = static::f actory()->tree_select($id)->tree_get_root();84 $page = static::forge()->tree_select($id)->tree_get_root(); 85 85 return $page->tree_dump_dropdown($field, $exclude_root, $allow_empty); 86 86 } … … 95 95 { 96 96 // Create the update query and return the result 97 $query = \Orm\Query::f actory(get_called_class(), static::connection())97 $query = \Orm\Query::forge(get_called_class(), static::connection()) 98 98 ->where($this->tree_get_property('tree_field'), '=', $this->{$this->tree_get_property('tree_field')}) 99 99 ->order_by($this->tree_get_property('left_field'), 'ASC') -
trunk/modules/exitecms/classes/model/site.php
r72 r79 109 109 { 110 110 // Create the update query and return the result 111 return \Orm\Query::f actory(get_called_class(), static::connection())111 return \Orm\Query::forge(get_called_class(), static::connection()) 112 112 ->where('id', '<>', $this->id) 113 113 ->where('default', '=', '1') -
trunk/modules/exitecms/classes/model/template.php
r70 r79 63 63 public static function templates_dropdown($id, $field = '', $exclude_root = true, $allow_empty = false) 64 64 { 65 $template = static::f actory()->tree_select($id)->tree_get_root();65 $template = static::forge()->tree_select($id)->tree_get_root(); 66 66 return $template->tree_dump_dropdown($field, $exclude_root, $allow_empty); 67 67 } -
trunk/modules/exitecms/lang/en/linkset.php
r68 r79 10 10 'field' => array( 11 11 'id' => '', 12 'title' => 'Link name', 12 'name' => 'Link name', 13 'title' => 'Link title', 13 14 'actions' => 'Options', 14 'name' => 'Link name',15 15 'parent' => 'Parent link', 16 16 'type' => 'Link type', … … 26 26 'id' => '', 27 27 'name' => 'Link name', 28 'title' => 'Link title', 28 29 'parent' => 'Parent link', 29 30 'type' => 'Link type', -
trunk/modules/exitecms/lang/en/themes.php
r73 r79 31 31 // form field help texts 32 32 'help' => array( 33 'name' => '',34 'description' => '',35 33 ), 36 34 … … 39 37 'list' => array( 40 38 'title' => 'Themes', 41 'form' => '',42 39 'info' => 'This is the ExiteCMS theme management module.<br /> 43 40 Themes provide the look and feel of your ExiteCMS website. You use this module to control which themes will be … … 57 54 'install' => array( 58 55 'title' => 'Themes', 59 'form' => '',60 'info' => '',61 56 'success' => 'The new theme has been installed.', 62 57 'failure' => 'Error installing the new theme.', … … 69 64 <br /><br /><strong>Any sites or pages that use this theme will be reset to the default theme after deletion!</strong>', 70 65 'success' => 'The theme has been removed.', 71 'failure' => 'Error removing the newtheme.',66 'failure' => 'Error removing the theme.', 72 67 'site_used' => 'There are websites that are using this theme as the default theme!', 73 68 'page_used' => 'There are web pages that are using a template of this theme!', -
trunk/modules/exitecms/views/forms/dashboard.php
r72 r79 5 5 <fieldset> 6 6 <?php if (!empty($news)):?> 7 <legend><?php echo \Lang:: line('headers.news'); ?></legend>7 <legend><?php echo \Lang::get('headers.news'); ?></legend> 8 8 <div> 9 9 <ul style='margin-left:0px;margin-bottom:0px;'> … … 31 31 <?php if (!empty($exitecms)):?> 32 32 <fieldset> 33 <legend><?php echo \Lang:: line('headers.exitecms'); ?></legend>33 <legend><?php echo \Lang::get('headers.exitecms'); ?></legend> 34 34 <div class="info" style="background: url('/<?php echo Asset::find_file('admin_exitecms.png', 'img/')?>') no-repeat center left;"> 35 35 <?php echo $exitecms; ?> … … 40 40 <?php if (!empty($users)):?> 41 41 <fieldset> 42 <legend><?php echo \Lang:: line('headers.users'); ?></legend>42 <legend><?php echo \Lang::get('headers.users'); ?></legend> 43 43 <div class="info" style="background: url('/<?php echo Asset::find_file('admin_users.png', 'img/')?>') no-repeat center left;"> 44 44 <?php $key = 0; foreach($users as $name => $user): ?> 45 45 <div style="width:50%;float:left;overflow:hidden;"> 46 <?php echo \Lang:: line('info.users.'.$key++); ?>46 <?php echo \Lang::get('info.users.'.$key++); ?> 47 47 <span class="highlight"><?php echo $user; ?></span>. 48 48 </div> … … 54 54 <?php if (!empty($platform)):?> 55 55 <fieldset> 56 <legend><?php echo \Lang:: line('headers.platform'); ?></legend>56 <legend><?php echo \Lang::get('headers.platform'); ?></legend> 57 57 <div class="info" style="background: url('/<?php echo Asset::find_file('admin_platform.png', 'img/')?>') no-repeat center left;"> 58 58 <?php $key = 0; foreach($platform as $name => $platforminfo): ?> 59 59 <?php if ($key):?> 60 60 <div style="width:50%;float:left;overflow:hidden;"> 61 <?php echo \Lang:: line('info.platform.'.$key++); ?>61 <?php echo \Lang::get('info.platform.'.$key++); ?> 62 62 <span class="highlight"><?php echo $platforminfo; ?></span>. 63 63 </div> 64 64 <?php else: ?> 65 65 <div style="width:50%;float:left;overflow:hidden;"> 66 <?php echo \Lang:: line('info.platform.'.$key++); ?>66 <?php echo \Lang::get('info.platform.'.$key++); ?> 67 67 <span class="highlight"><?php echo $platforminfo; ?></span>. 68 68 </div> -
trunk/modules/exitecms/views/forms/datetime.php
r68 r79 1 1 <?php 2 2 // load the edit view for the datetime form 3 echo \View::f actory('forms/edit')->set($view_data, null, false);3 echo \View::forge('forms/edit')->set($view_data, null, false); 4 4 ?> 5 5 <table style="font-size:10px;"> 6 6 <tr> 7 <th style="text-align:center;"><?php echo \Lang:: line('other.legend.header_code'); ?></th>8 <th><?php echo \Lang:: line('other.legend.header_description'); ?></th>9 <th><?php echo \Lang:: line('other.legend.header_example'); ?></th>10 </tr> 11 <tr> 12 <td colspan="3" class="odd" style="font-weight:bold;"><?php echo \Lang:: line('other.legend.day.title'); ?></td>7 <th style="text-align:center;"><?php echo \Lang::get('other.legend.header_code'); ?></th> 8 <th><?php echo \Lang::get('other.legend.header_description'); ?></th> 9 <th><?php echo \Lang::get('other.legend.header_example'); ?></th> 10 </tr> 11 <tr> 12 <td colspan="3" class="odd" style="font-weight:bold;"><?php echo \Lang::get('other.legend.day.title'); ?></td> 13 13 </tr> 14 14 <tr> 15 15 <td style="text-align:center;">%a</td> 16 <td><?php echo \Lang:: line('other.legend.day.a_description'); ?></td>17 <td><?php echo \Lang:: line('other.legend.day.a_example'); ?></td>16 <td><?php echo \Lang::get('other.legend.day.a_description'); ?></td> 17 <td><?php echo \Lang::get('other.legend.day.a_example'); ?></td> 18 18 </tr> 19 19 <tr> 20 20 <td style="text-align:center;">%A</td> 21 <td><?php echo \Lang:: line('other.legend.day.A_description'); ?></td>22 <td><?php echo \Lang:: line('other.legend.day.A_example'); ?></td>21 <td><?php echo \Lang::get('other.legend.day.A_description'); ?></td> 22 <td><?php echo \Lang::get('other.legend.day.A_example'); ?></td> 23 23 </tr> 24 24 <tr> 25 25 <td style="text-align:center;">%d</td> 26 <td><?php echo \Lang:: line('other.legend.day.d_description'); ?></td>27 <td><?php echo \Lang:: line('other.legend.day.d_example'); ?></td>26 <td><?php echo \Lang::get('other.legend.day.d_description'); ?></td> 27 <td><?php echo \Lang::get('other.legend.day.d_example'); ?></td> 28 28 </tr> 29 29 <tr> 30 30 <td style="text-align:center;">%e</td> 31 <td><?php echo \Lang:: line('other.legend.day.e_description'); ?></td>32 <td><?php echo \Lang:: line('other.legend.day.e_example'); ?></td>31 <td><?php echo \Lang::get('other.legend.day.e_description'); ?></td> 32 <td><?php echo \Lang::get('other.legend.day.e_example'); ?></td> 33 33 </tr> 34 34 <tr> 35 35 <td style="text-align:center;">%j</td> 36 <td><?php echo \Lang:: line('other.legend.day.j_description'); ?></td>37 <td><?php echo \Lang:: line('other.legend.day.j_example'); ?></td>36 <td><?php echo \Lang::get('other.legend.day.j_description'); ?></td> 37 <td><?php echo \Lang::get('other.legend.day.j_example'); ?></td> 38 38 </tr> 39 39 <tr> 40 40 <td style="text-align:center;">%u</td> 41 <td><?php echo \Lang:: line('other.legend.day.u_description'); ?></td>42 <td><?php echo \Lang:: line('other.legend.day.u_example'); ?></td>41 <td><?php echo \Lang::get('other.legend.day.u_description'); ?></td> 42 <td><?php echo \Lang::get('other.legend.day.u_example'); ?></td> 43 43 </tr> 44 44 <tr> 45 45 <td style="text-align:center;">%w</td> 46 <td><?php echo \Lang:: line('other.legend.day.w_description'); ?></td>47 <td><?php echo \Lang:: line('other.legend.day.w_example'); ?></td>48 </tr> 49 <tr> 50 <td colspan="3" class="odd" style="font-weight:bold;"><?php echo \Lang:: line('other.legend.week.title'); ?></td>46 <td><?php echo \Lang::get('other.legend.day.w_description'); ?></td> 47 <td><?php echo \Lang::get('other.legend.day.w_example'); ?></td> 48 </tr> 49 <tr> 50 <td colspan="3" class="odd" style="font-weight:bold;"><?php echo \Lang::get('other.legend.week.title'); ?></td> 51 51 </tr> 52 52 <tr> 53 53 <td style="text-align:center;">%U</td> 54 <td><?php echo \Lang:: line('other.legend.week.U_description'); ?></td>55 <td><?php echo \Lang:: line('other.legend.week.U_example'); ?></td>54 <td><?php echo \Lang::get('other.legend.week.U_description'); ?></td> 55 <td><?php echo \Lang::get('other.legend.week.U_example'); ?></td> 56 56 </tr> 57 57 <tr> 58 58 <td style="text-align:center;">%V</td> 59 <td><?php echo \Lang:: line('other.legend.week.V_description'); ?></td>60 <td><?php echo \Lang:: line('other.legend.week.V_example'); ?></td>59 <td><?php echo \Lang::get('other.legend.week.V_description'); ?></td> 60 <td><?php echo \Lang::get('other.legend.week.V_example'); ?></td> 61 61 </tr> 62 62 <tr> 63 63 <td style="text-align:center;">%W</td> 64 <td><?php echo \Lang:: line('other.legend.week.W_description'); ?></td>65 <td><?php echo \Lang:: line('other.legend.week.W_example'); ?></td>66 </tr> 67 <tr> 68 <td colspan="3" class="odd" style="font-weight:bold;"><?php echo \Lang:: line('other.legend.month.title'); ?></td>64 <td><?php echo \Lang::get('other.legend.week.W_description'); ?></td> 65 <td><?php echo \Lang::get('other.legend.week.W_example'); ?></td> 66 </tr> 67 <tr> 68 <td colspan="3" class="odd" style="font-weight:bold;"><?php echo \Lang::get('other.legend.month.title'); ?></td> 69 69 </tr> 70 70 <tr> 71 71 <td style="text-align:center;">%b</td> 72 <td><?php echo \Lang:: line('other.legend.month.b_description'); ?></td>73 <td><?php echo \Lang:: line('other.legend.month.b_example'); ?></td>72 <td><?php echo \Lang::get('other.legend.month.b_description'); ?></td> 73 <td><?php echo \Lang::get('other.legend.month.b_example'); ?></td> 74 74 </tr> 75 75 <tr> 76 76 <td style="text-align:center;">%B</td> 77 <td><?php echo \Lang:: line('other.legend.month.B_description'); ?></td>78 <td><?php echo \Lang:: line('other.legend.month.B_example'); ?></td>77 <td><?php echo \Lang::get('other.legend.month.B_description'); ?></td> 78 <td><?php echo \Lang::get('other.legend.month.B_example'); ?></td> 79 79 </tr> 80 80 <tr> 81 81 <td style="text-align:center;">%h</td> 82 <td><?php echo \Lang:: line('other.legend.month.h_description'); ?></td>83 <td><?php echo \Lang:: line('other.legend.month.h_example'); ?></td>82 <td><?php echo \Lang::get('other.legend.month.h_description'); ?></td> 83 <td><?php echo \Lang::get('other.legend.month.h_example'); ?></td> 84 84 </tr> 85 85 <tr> 86 86 <td style="text-align:center;">%m</td> 87 <td><?php echo \Lang:: line('other.legend.month.m_description'); ?></td>88 <td><?php echo \Lang:: line('other.legend.month.m_example'); ?></td>89 </tr> 90 <tr> 91 <td colspan="3" class="odd" style="font-weight:bold;"><?php echo \Lang:: line('other.legend.year.title'); ?></td>87 <td><?php echo \Lang::get('other.legend.month.m_description'); ?></td> 88 <td><?php echo \Lang::get('other.legend.month.m_example'); ?></td> 89 </tr> 90 <tr> 91 <td colspan="3" class="odd" style="font-weight:bold;"><?php echo \Lang::get('other.legend.year.title'); ?></td> 92 92 </tr> 93 93 <tr> 94 94 <td style="text-align:center;">%C</td> 95 <td><?php echo \Lang:: line('other.legend.year.C_description'); ?></td>96 <td><?php echo \Lang:: line('other.legend.year.C_example'); ?></td>95 <td><?php echo \Lang::get('other.legend.year.C_description'); ?></td> 96 <td><?php echo \Lang::get('other.legend.year.C_example'); ?></td> 97 97 </tr> 98 98 <tr> 99 99 <td style="text-align:center;">%g</td> 100 <td><?php echo \Lang:: line('other.legend.year.g_description'); ?></td>101 <td><?php echo \Lang:: line('other.legend.year.g_example'); ?></td>100 <td><?php echo \Lang::get('other.legend.year.g_description'); ?></td> 101 <td><?php echo \Lang::get('other.legend.year.g_example'); ?></td> 102 102 </tr> 103 103 <tr> 104 104 <td style="text-align:center;">%G</td> 105 <td><?php echo \Lang:: line('other.legend.year.G_description'); ?></td>106 <td><?php echo \Lang:: line('other.legend.year.G_example'); ?></td>105 <td><?php echo \Lang::get('other.legend.year.G_description'); ?></td> 106 <td><?php echo \Lang::get('other.legend.year.G_example'); ?></td> 107 107 </tr> 108 108 <tr> 109 109 <td style="text-align:center;">%y</td> 110 <td><?php echo \Lang:: line('other.legend.year.y_description'); ?></td>111 <td><?php echo \Lang:: line('other.legend.year.y_example'); ?></td>110 <td><?php echo \Lang::get('other.legend.year.y_description'); ?></td> 111 <td><?php echo \Lang::get('other.legend.year.y_example'); ?></td> 112 112 </tr> 113 113 <tr> 114 114 <td style="text-align:center;">%Y</td> 115 <td><?php echo \Lang:: line('other.legend.year.Y_description'); ?></td>116 <td><?php echo \Lang:: line('other.legend.year.Y_example'); ?></td>117 </tr> 118 <tr> 119 <td colspan="3" class="odd" style="font-weight:bold;"><?php echo \Lang:: line('other.legend.time.title'); ?></td>115 <td><?php echo \Lang::get('other.legend.year.Y_description'); ?></td> 116 <td><?php echo \Lang::get('other.legend.year.Y_example'); ?></td> 117 </tr> 118 <tr> 119 <td colspan="3" class="odd" style="font-weight:bold;"><?php echo \Lang::get('other.legend.time.title'); ?></td> 120 120 </tr> 121 121 <tr> 122 122 <td style="text-align:center;">%H</td> 123 <td><?php echo \Lang:: line('other.legend.time.H_description'); ?></td>124 <td><?php echo \Lang:: line('other.legend.time.H_example'); ?></td>123 <td><?php echo \Lang::get('other.legend.time.H_description'); ?></td> 124 <td><?php echo \Lang::get('other.legend.time.H_example'); ?></td> 125 125 </tr> 126 126 <tr> 127 127 <td style="text-align:center;">%I</td> 128 <td><?php echo \Lang:: line('other.legend.time.I_description'); ?></td>129 <td><?php echo \Lang:: line('other.legend.time.I_example'); ?></td>128 <td><?php echo \Lang::get('other.legend.time.I_description'); ?></td> 129 <td><?php echo \Lang::get('other.legend.time.I_example'); ?></td> 130 130 </tr> 131 131 <tr> 132 132 <td style="text-align:center;">%l</td> 133 <td><?php echo \Lang:: line('other.legend.time.l_description'); ?></td>134 <td><?php echo \Lang:: line('other.legend.time.l_example'); ?></td>133 <td><?php echo \Lang::get('other.legend.time.l_description'); ?></td> 134 <td><?php echo \Lang::get('other.legend.time.l_example'); ?></td> 135 135 </tr> 136 136 <tr> 137 137 <td style="text-align:center;">%M</td> 138 <td><?php echo \Lang:: line('other.legend.time.M_description'); ?></td>139 <td><?php echo \Lang:: line('other.legend.time.M_example'); ?></td>138 <td><?php echo \Lang::get('other.legend.time.M_description'); ?></td> 139 <td><?php echo \Lang::get('other.legend.time.M_example'); ?></td> 140 140 </tr> 141 141 <tr> 142 142 <td style="text-align:center;">%p</td> 143 <td><?php echo \Lang:: line('other.legend.time.p_description'); ?></td>144 <td><?php echo \Lang:: line('other.legend.time.p_example'); ?></td>143 <td><?php echo \Lang::get('other.legend.time.p_description'); ?></td> 144 <td><?php echo \Lang::get('other.legend.time.p_example'); ?></td> 145 145 </tr> 146 146 <tr> 147 147 <td style="text-align:center;">%P</td> 148 <td><?php echo \Lang:: line('other.legend.time.P_description'); ?></td>149 <td><?php echo \Lang:: line('other.legend.time.P_example'); ?></td>148 <td><?php echo \Lang::get('other.legend.time.P_description'); ?></td> 149 <td><?php echo \Lang::get('other.legend.time.P_example'); ?></td> 150 150 </tr> 151 151 <tr> 152 152 <td style="text-align:center;">%r</td> 153 <td><?php echo \Lang:: line('other.legend.time.r_description'); ?></td>154 <td><?php echo \Lang:: line('other.legend.time.r_example'); ?></td>153 <td><?php echo \Lang::get('other.legend.time.r_description'); ?></td> 154 <td><?php echo \Lang::get('other.legend.time.r_example'); ?></td> 155 155 </tr> 156 156 <tr> 157 157 <td style="text-align:center;">%R</td> 158 <td><?php echo \Lang:: line('other.legend.time.R_description'); ?></td>159 <td><?php echo \Lang:: line('other.legend.time.R_example'); ?></td>158 <td><?php echo \Lang::get('other.legend.time.R_description'); ?></td> 159 <td><?php echo \Lang::get('other.legend.time.R_example'); ?></td> 160 160 </tr> 161 161 <tr> 162 162 <td style="text-align:center;">%S</td> 163 <td><?php echo \Lang:: line('other.legend.time.S_description'); ?></td>164 <td><?php echo \Lang:: line('other.legend.time.S_example'); ?></td>163 <td><?php echo \Lang::get('other.legend.time.S_description'); ?></td> 164 <td><?php echo \Lang::get('other.legend.time.S_example'); ?></td> 165 165 </tr> 166 166 <tr> 167 167 <td style="text-align:center;">%T</td> 168 <td><?php echo \Lang:: line('other.legend.time.T_description'); ?></td>169 <td><?php echo \Lang:: line('other.legend.time.T_example'); ?></td>168 <td><?php echo \Lang::get('other.legend.time.T_description'); ?></td> 169 <td><?php echo \Lang::get('other.legend.time.T_example'); ?></td> 170 170 </tr> 171 171 <tr> 172 172 <td style="text-align:center;">%X</td> 173 <td><?php echo \Lang:: line('other.legend.time.X_description'); ?></td>174 <td><?php echo \Lang:: line('other.legend.time.X_example'); ?></td>173 <td><?php echo \Lang::get('other.legend.time.X_description'); ?></td> 174 <td><?php echo \Lang::get('other.legend.time.X_example'); ?></td> 175 175 </tr> 176 176 <tr> 177 177 <td style="text-align:center;">%z</td> 178 <td><?php echo \Lang:: line('other.legend.time.z_description'); ?></td>179 <td><?php echo \Lang:: line('other.legend.time.z_example'); ?></td>178 <td><?php echo \Lang::get('other.legend.time.z_description'); ?></td> 179 <td><?php echo \Lang::get('other.legend.time.z_example'); ?></td> 180 180 </tr> 181 181 <tr> 182 182 <td style="text-align:center;">%Z</td> 183 <td><?php echo \Lang:: line('other.legend.time.Z_description'); ?></td>184 <td><?php echo \Lang:: line('other.legend.time.Z_example'); ?></td>185 </tr> 186 <tr> 187 <td colspan="3" class="odd" style="font-weight:bold;"><?php echo \Lang:: line('other.legend.timestamps.title'); ?></td>183 <td><?php echo \Lang::get('other.legend.time.Z_description'); ?></td> 184 <td><?php echo \Lang::get('other.legend.time.Z_example'); ?></td> 185 </tr> 186 <tr> 187 <td colspan="3" class="odd" style="font-weight:bold;"><?php echo \Lang::get('other.legend.timestamps.title'); ?></td> 188 188 </tr> 189 189 <tr> 190 190 <td style="text-align:center;">%c</td> 191 <td><?php echo \Lang:: line('other.legend.timestamps.c_description'); ?></td>192 <td><?php echo \Lang:: line('other.legend.timestamps.c_example'); ?></td>191 <td><?php echo \Lang::get('other.legend.timestamps.c_description'); ?></td> 192 <td><?php echo \Lang::get('other.legend.timestamps.c_example'); ?></td> 193 193 </tr> 194 194 <tr> 195 195 <td style="text-align:center;">%D</td> 196 <td><?php echo \Lang:: line('other.legend.timestamps.D_description'); ?></td>197 <td><?php echo \Lang:: line('other.legend.timestamps.D_example'); ?></td>196 <td><?php echo \Lang::get('other.legend.timestamps.D_description'); ?></td> 197 <td><?php echo \Lang::get('other.legend.timestamps.D_example'); ?></td> 198 198 </tr> 199 199 <tr> 200 200 <td style="text-align:center;">%F</td> 201 <td><?php echo \Lang:: line('other.legend.timestamps.F_description'); ?></td>202 <td><?php echo \Lang:: line('other.legend.timestamps.F_example'); ?></td>201 <td><?php echo \Lang::get('other.legend.timestamps.F_description'); ?></td> 202 <td><?php echo \Lang::get('other.legend.timestamps.F_example'); ?></td> 203 203 </tr> 204 204 <tr> 205 205 <td style="text-align:center;">%s</td> 206 <td><?php echo \Lang:: line('other.legend.timestamps.s_description'); ?></td>207 <td><?php echo \Lang:: line('other.legend.timestamps.s_example'); ?></td>206 <td><?php echo \Lang::get('other.legend.timestamps.s_description'); ?></td> 207 <td><?php echo \Lang::get('other.legend.timestamps.s_example'); ?></td> 208 208 </tr> 209 209 <tr> 210 210 <td style="text-align:center;">%x</td> 211 <td><?php echo \Lang:: line('other.legend.timestamps.x_description'); ?></td>212 <td><?php echo \Lang:: line('other.legend.timestamps.x_example'); ?></td>213 </tr> 214 <tr> 215 <td colspan="3" class="odd" style="font-weight:bold;"><?php echo \Lang:: line('other.legend.misc.title'); ?></td>211 <td><?php echo \Lang::get('other.legend.timestamps.x_description'); ?></td> 212 <td><?php echo \Lang::get('other.legend.timestamps.x_example'); ?></td> 213 </tr> 214 <tr> 215 <td colspan="3" class="odd" style="font-weight:bold;"><?php echo \Lang::get('other.legend.misc.title'); ?></td> 216 216 </tr> 217 217 <tr> 218 218 <td style="text-align:center;">%%</td> 219 <td colspan="2"><?php echo \Lang:: line('other.legend.misc.percentage'); ?></td>219 <td colspan="2"><?php echo \Lang::get('other.legend.misc.percentage'); ?></td> 220 220 </tr> 221 221 <tr> 222 222 <td style="width:1px; white-space:nowrap;text-align:center;">use locale</td> 223 <td colspan="2"><?php echo \Lang:: line('other.legend.misc.use_locale'); ?></td>223 <td colspan="2"><?php echo \Lang::get('other.legend.misc.use_locale'); ?></td> 224 224 </tr> 225 225 </table> -
trunk/modules/exitecms/views/forms/layout.php
r73 r79 22 22 { 23 23 echo '<fieldset>', "\n"; 24 echo "\t", '<legend>', \Lang:: line('global.information'), '</legend>', "\n";24 echo "\t", '<legend>', \Lang::get('global.information'), '</legend>', "\n"; 25 25 echo "\t", '<div class="info">', $info, '</div>', "\n"; 26 26 echo '</fieldset>', "\n"; -
trunk/modules/exitecms/views/forms/layout_selector.php
r73 r79 1 1 <div class="layout_background" style="height:100%;"> 2 <fieldset class="layout_fieldset" title="<?php echo \Lang:: line('other.layout.title', array('desc' => $description));?>" onclick="location.href='<?php echo $url;?>';" <?php if(isset($height)) echo 'style="height:',$height,'px;"';?>>2 <fieldset class="layout_fieldset" title="<?php echo \Lang::get('other.layout.title', array('desc' => $description));?>" onclick="location.href='<?php echo $url;?>';" <?php if(isset($height)) echo 'style="height:',$height,'px;"';?>> 3 3 <legend class="layout_legend"><?php echo strtoupper($name);?></legend> 4 <div class="layout_section"><?php echo \Lang:: line('other.layout.supported');?><span class="layout_info"> <?php echo $type;?></span>.</div>5 <div class="layout_section"><?php echo \Lang:: line('other.layout.count');?><span class="layout_info"> <?php echo $count;?></span>.</div>4 <div class="layout_section"><?php echo \Lang::get('other.layout.supported');?><span class="layout_info"> <?php echo $type;?></span>.</div> 5 <div class="layout_section"><?php echo \Lang::get('other.layout.count');?><span class="layout_info"> <?php echo $count;?></span>.</div> 6 6 </fieldset> 7 7 </div> -
trunk/modules/exitecms/views/forms/linkset.php
r68 r79 14 14 15 15 // load the edit view for the linkset form 16 echo \View::f actory('forms/edit')->set($view_data, null, false);16 echo \View::forge('forms/edit')->set($view_data, null, false); 17 17 ?> 18 18 <script type="text/javascript"> -
trunk/modules/linksets/classes/controller/multi.php
r68 r79 34 34 35 35 // load the model 36 $this->model = \Exitecms\Model_Link::f actory();36 $this->model = \Exitecms\Model_Link::forge(); 37 37 38 38 // load the linkset -
trunk/modules/linksets/classes/controller/single.php
r60 r79 29 29 30 30 // load the model 31 $model = \Exitecms\Model_Link::f actory();31 $model = \Exitecms\Model_Link::forge(); 32 32 33 33 // load the linkset -
trunk/public/assets/themes
- Property svn:ignore
-
old new 1 1 exitecms
-
- Property svn:ignore
-
trunk/public/index.php
r68 r79 42 42 try 43 43 { 44 $response = Request::f actory()->execute()->response();44 $response = Request::forge()->execute()->response(); 45 45 } 46 46 catch (Request404Exception $e) … … 50 50 if ($route = Config::get('routes._404_')) 51 51 { 52 $response = Request::f actory($route)->execute()->response();52 $response = Request::forge($route)->execute()->response(); 53 53 } 54 54 else … … 61 61 try 62 62 { 63 $response = new \Response(\View::f actory($e->getMessage()), 500);63 $response = new \Response(\View::forge($e->getMessage()), 500); 64 64 } 65 65 catch(Exception $e) -
trunk/themes/theme_exitecms/assets/css/global.css
r75 r79 694 694 padding: 0px 0px; 695 695 text-align: center; 696 font-size: 1 2px;697 color: # 222;696 font-size: 11px; 697 color: #666; 698 698 } 699 699 -
trunk/themes/theme_exitecms/config/info.php
r73 r79 33 33 * short description of this theme 34 34 */ 35 'description' => ' This is the default ExiteCMS v8.0theme',35 'description' => 'ExiteCMS v8.0 default theme', 36 36 37 37 /* … … 43 43 44 44 /* 45 * theme creation date, format YYYYMMDD45 * theme creation date, something that can be parsed by strtotime() 46 46 */ 47 47 'creationDate' => '20100930', -
trunk/themes/theme_exitecms/views/widgets/404.php
r75 r79 1 <div style="text-align:center;margin-left: auto; margin-right: auto; padding : 50px 0px 0px 50px;">2 <p style="font-size:3em;font-weight:bold; padding-right:50px;">404 - PAGE NOT FOUND</p>3 < ?php echo \Asset::img('notfound.png'); ?>1 <div style="text-align:center;margin-left: auto; margin-right: auto; padding-top: 25px;"> 2 <p style="font-size:3em;font-weight:bold;">404 - PAGE NOT FOUND</p> 3 <div><?php echo \Asset::img('notfound.png'); ?></div> 4 4 </div>
Note: See TracChangeset
for help on using the changeset viewer.
