Changeset 79 in ExiteCMS8


Ignore:
Timestamp:
08/30/11 20:48:14 (9 months ago)
Author:
WanWizard
Message:

removed config/db.php from the repo
more admin module updates

Location:
trunk
Files:
10 added
1 deleted
50 edited

Legend:

Unmodified
Added
Removed
  • trunk/exitecms/bootstrap.php

    r49 r79  
    44require_once COREPATH.'bootstrap.php'; 
    55 
    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 
    177Autoloader::add_classes(array( 
    188    'View' => APPPATH.'classes/view.php', 
     
    2212Autoloader::register(); 
    2313 
     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*/ 
     22Fuel::$env = (isset($_SERVER['FUEL_ENV']) ? $_SERVER['FUEL_ENV'] : Fuel::DEVELOPMENT); 
     23 
     24/* 
     25 * default environment settings 
     26 */ 
     27if (\Fuel::$is_test) 
     28{ 
     29    Fuel::$env = Fuel::TEST; 
     30    ! defined('DEBUG') && define('DEBUG', true); 
     31} 
     32elseif (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} 
     41elseif (isset($_SERVER['FUEL_ENV'])) 
     42{ 
     43    Fuel::$env = $_SERVER['FUEL_ENV']; 
     44} 
     45else 
     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 
    2456// Initialize the framework with the config file. 
    2557Fuel::init(include(APPPATH.'config/config.php')); 
  • trunk/exitecms/classes/controller/bootstrap.php

    r72 r79  
    6060    { 
    6161        // start the session 
    62         $session = \Session::factory(); 
     62        $session = \Session::forge(); 
    6363 
    6464        // get the current flash_id and set it to exitecms 
     
    9090        { 
    9191            // load the defined theme controller 
    92             static::$theme = \Theme::factory($layout['theme']); 
     92            static::$theme = \Theme::forge($layout['theme']); 
    9393 
    9494            // load the defined theme template 
     
    119119 
    120120                    // 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': 
    136156                                if ($widget['delay']) 
    137157                                { 
    138                                     $result->content(\View::factory($widget['uri'], $widget)); 
     158                                    $result->content(\View::forge('theme_'.$layout['theme'].'::widgets/'.$widget['uri'], $widget)); 
    139159                                } 
    140160                                else 
    141161                                { 
    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.'"'); 
    148193                                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()); 
    193200                    } 
    194201 
     
    202209 
    203210        // store the current URI in the session 
    204         $session->set('last_uri', \Uri::detect()); 
     211        $session->set('last_uri', \Input::uri()); 
    205212    } 
    206213 
     
    231238        if ( is_null($site_id) ) 
    232239        { 
    233             if ( ! $result = \Exitecms\Model_Site::factory()->current_website() ) 
     240            if ( ! $result = \Exitecms\Model_Site::forge()->current_website() ) 
    234241            { 
    235242                return false; 
     
    253260        if (is_null($segments)) 
    254261        { 
    255             $segments = ltrim(URI::detect(), '/'); 
     262            $segments = ltrim(\Input::uri(), '/'); 
    256263            $segments = empty($segments) ? '/' : $segments; 
    257264        } 
  • trunk/exitecms/classes/exitecms.php

    r73 r79  
    111111    } 
    112112 
     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 
    113196} 
    114197 
  • trunk/exitecms/classes/exitecms/forms.php

    r73 r79  
    120120        if ( ! method_exists($this, 'action_'.$this->action)) 
    121121        { 
    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'); 
    123123            $this->invalid_action(); 
    124124        } 
     
    134134                if ( ! $this->view instanceOf View and ! $this->view instanceOf ViewModel) 
    135135                { 
    136                     $this->set_view(\View::factory($this->view)); 
     136                    $this->set_view(\View::forge($this->view)); 
    137137                } 
    138138                else 
     
    205205    { 
    206206        // 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); 
    208208 
    209209        // 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); 
    211211 
    212212        // buttons to be placed under the form 
    213213        $this->view->buttons = array( 
    214214            'add' => array( 
    215                 'title' => \Lang::line('button.add'), 
     215                'title' => \Lang::get('button.add'), 
    216216                'class' => 'add' 
    217217            ), 
     
    246246 
    247247        // 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); 
    249249 
    250250        // 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); 
    252252 
    253253        // buttons to be placed under the form 
    254254        $this->view->buttons = array( 
    255255            'add' => array( 
    256                 'title' => \Lang::line('button.add'), 
     256                'title' => \Lang::get('button.add'), 
    257257                'class' => 'add' 
    258258            ), 
     
    273273    { 
    274274        // 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); 
    276276 
    277277        // 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); 
    279279 
    280280        // 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))); 
    282282 
    283283        // buttons to be placed under the form 
    284284        $this->view->buttons = array( 
    285285            'save' => array( 
    286                 'title' => \Lang::line('global.save'), 
     286                'title' => \Lang::get('global.save'), 
    287287                'class' => 'positive' 
    288288            ), 
    289289            'refresh' => array( 
    290                 'title' => \Lang::line('global.refresh'), 
     290                'title' => \Lang::get('global.refresh'), 
    291291                'class' => '' 
    292292            ), 
    293293            'cancel' => array( 
    294                 'title' => \Lang::line('global.cancel'), 
     294                'title' => \Lang::get('global.cancel'), 
    295295                'class' => 'negative' 
    296296            ), 
     
    304304 
    305305        // assign the data to the view 
    306         $this->view->set('data', $this->data); 
     306        $this->view->set('data', $this->data, false); 
    307307 
    308308        // run the validation 
     
    326326                method_exists($this, 'after_add') and $this->after_add(true); 
    327327 
    328                 \ExiteCMS_Messages::set(\Lang::line('action.add.success'), 'C'); 
     328                \ExiteCMS_Messages::set(\Lang::get('action.add.success'), 'C'); 
    329329            } 
    330330            else 
     
    333333                method_exists($this, 'after_add') and $this->after_add(false); 
    334334 
    335                 \ExiteCMS_Messages::set(\Lang::line('action.add.failure'), 'E'); 
     335                \ExiteCMS_Messages::set(\Lang::get('action.add.failure'), 'E'); 
    336336            } 
    337337 
     
    355355    { 
    356356        // 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); 
    358358 
    359359        // 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); 
    361361 
    362362        // 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))); 
    364364 
    365365        // buttons to be placed under the form 
    366366        $this->view->buttons = array( 
    367367            'save' => array( 
    368                 'title' => \Lang::line('global.save'), 
     368                'title' => \Lang::get('global.save'), 
    369369                'class' => 'positive' 
    370370            ), 
    371371            'refresh' => array( 
    372                 'title' => \Lang::line('global.refresh'), 
     372                'title' => \Lang::get('global.refresh'), 
    373373                'class' => '' 
    374374            ), 
    375375            'cancel' => array( 
    376                 'title' => \Lang::line('global.cancel'), 
     376                'title' => \Lang::get('global.cancel'), 
    377377                'class' => 'negative' 
    378378            ), 
     
    400400                    method_exists($this, 'after_edit') and $this->after_edit(true); 
    401401 
    402                     \ExiteCMS_Messages::set(\Lang::line('action.edit.success'), 'C'); 
     402                    \ExiteCMS_Messages::set(\Lang::get('action.edit.success'), 'C'); 
    403403                } 
    404404                else 
     
    407407                    method_exists($this, 'after_edit') and $this->after_edit(false); 
    408408 
    409                     \ExiteCMS_Messages::set(\Lang::line('action.edit.failure'), 'E'); 
     409                    \ExiteCMS_Messages::set(\Lang::get('action.edit.failure'), 'E'); 
    410410                } 
    411411            } 
    412412            else 
    413413            { 
    414                 \ExiteCMS_Messages::set(\Lang::line('forms.record_not_changed'), 'W'); 
     414                \ExiteCMS_Messages::set(\Lang::get('forms.record_not_changed'), 'W'); 
    415415            } 
    416416 
     
    426426 
    427427        // assign the data to the view 
    428         $this->view->set('data', $this->data); 
     428        $this->view->set('data', $this->data, false); 
    429429    } 
    430430 
     
    436436    { 
    437437        // 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); 
    439439 
    440440        // 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); 
    442442 
    443443        // 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))); 
    445445 
    446446        // buttons to be placed under the table 
    447447        $this->view->buttons = array( 
    448448            'delete' => array( 
    449                 'title' => \Lang::line('global.delete'), 
     449                'title' => \Lang::get('global.delete'), 
    450450                'class' => 'positive' 
    451451            ), 
    452452            'cancel' => array( 
    453                 'title' => \Lang::line('global.cancel'), 
     453                'title' => \Lang::get('global.cancel'), 
    454454                'class' => 'negative' 
    455455            ), 
     
    472472                if (isset($_POST['formbutton']['delete'])) 
    473473                { 
    474                     // call the delete cleanup method 
    475                     method_exists($this, 'after_delete') and $this->after_delete(); 
    476  
    477474                    // save the added record 
    478475                    if ( $this->model instanceOf \NestedSets\Model) 
     
    485482                    } 
    486483 
    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'); 
    488488                    \ExiteCMS::redirect($this->baseurl); 
    489489                } 
     
    523523    protected function button_cancel() 
    524524    { 
    525         \ExiteCMS_Messages::set(\Lang::line('forms.action_canceled'), 'I'); 
     525        \ExiteCMS_Messages::set(\Lang::get('forms.action_canceled'), 'I'); 
    526526        \ExiteCMS::redirect($this->baseurl); 
    527527    } 
     
    550550        { 
    551551            // 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); 
    553553 
    554554            // 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); 
    556556 
    557557            // check for missing options array 
     
    597597                } 
    598598                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'); 
    600600                    \ExiteCMS::redirect($this->baseurl); 
    601601                } 
     
    603603            else 
    604604            { 
    605                 \ExiteCMS_Messages::set(\Lang::line('forms.record_not_found'), 'E'); 
     605                \ExiteCMS_Messages::set(\Lang::get('forms.record_not_found'), 'E'); 
    606606                \ExiteCMS::redirect($this->baseurl); 
    607607            } 
     
    660660                if ($this->model_options['offset'] > $records) 
    661661                { 
    662                     \ExiteCMS_Messages::set(\Lang::line('forms.page_not_found'), 'E'); 
     662                    \ExiteCMS_Messages::set(\Lang::get('forms.page_not_found'), 'E'); 
    663663                    \ExiteCMS::redirect($this->baseurl); 
    664664                } 
     
    782782            if ( ! \Security::check_token()) 
    783783            { 
    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()); 
    786786            } 
    787787 
     
    807807 
    808808        // define the validation rules 
    809         $this->validation = \Validation::factory(get_class($this)); 
     809        $this->validation = \Validation::forge(get_class($this)); 
    810810        $this->validation->add_callable($this); 
    811811 
  • trunk/exitecms/classes/exitecms/messages.php

    r65 r79  
    144144    public static function to_flash() 
    145145    { 
    146         $session = \Session::factory(); 
     146        $session = \Session::forge(); 
    147147 
    148148        // get the current flash_id and set it to exitecms 
  • trunk/exitecms/classes/exitecms/theme.php

    r73 r79  
    9494            } 
    9595 
     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 
    96104            // mark the info loaded 
    97105            unset($this->info['init']); 
     
    103111 
    104112    /* 
     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    /* 
    105176     * Load and return the view object for the requested layout 
    106177     * 
     
    114185        \Request::active()->add_path($this->path, true); 
    115186 
    116         return \View::factory('layouts/'.$layout); 
     187        return \View::forge('layouts/'.$layout); 
    117188    } 
    118189 
     
    131202        \Request::active()->add_path($this->path, true); 
    132203 
    133         $this->view = \View::factory('templates/'.$layout); 
     204        $this->view = \View::forge('templates/'.$layout); 
    134205 
    135206        return $this->view; 
     
    187258                if ( ! empty($this->areas[$area]['chrome']['widget'])) 
    188259                { 
    189                     $output .= \View::factory('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(); 
    190261                } 
    191262                else 
     
    197268            if ( ! empty($this->areas[$area]['chrome']['area'])) 
    198269            { 
    199                 return \View::factory('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(); 
    200271            } 
    201272            else 
     
    285356     * load the config of a theme template 
    286357     */ 
    287     public function load_config($template) 
    288     { 
    289         // load the config if it isn't loaded yet 
     358    protected function load_config($template) 
     359    { 
     360        // load the theme info if it isn't loaded yet 
    290361        if ( isset($this->info['init'])) 
    291362        { 
     
    316387        } 
    317388 
    318         // validate the config file **TODO** 
    319  
    320389        // define the area's for the loaded template 
    321390        foreach ($this->info['templates'][$template]['areas'] as $name => $area) 
  • trunk/exitecms/classes/exitecms/widget.php

    r72 r79  
    3434     * factory to produce widget objects 
    3535     */ 
    36      public static function factory() 
     36     public static function forge() 
    3737     { 
    3838         return new static(); 
  • trunk/exitecms/classes/exitecmsexception.php

    r68 r79  
    1010    { 
    1111        ob_end_clean(); 
    12         echo View::factory('exception', array('exception' => $this), false); 
     12        echo \View::forge('exception', array('exception' => $this), false); 
    1313    } 
    1414} 
  • trunk/exitecms/classes/theme.php

    r73 r79  
    7070     * @return  object  theme controller instance 
    7171     */ 
    72     public static function factory($theme= '') 
     72    public static function forge($theme= '') 
    7373    { 
    7474        // check if the theme exists 
     
    116116            else 
    117117            { 
    118                 return static::factory($instance); 
     118                return static::forge($instance); 
    119119            } 
    120120        } 
     
    161161                    { 
    162162                        // load the theme controller 
    163                         $value = substr($key, 6); 
    164                         $themes[$value] = static::factory($value); 
     163                        $value = substr(rtrim($key,'/'), 6); 
     164                        $themes[$value] = static::forge($value); 
    165165                    } 
    166166                } 
  • trunk/exitecms/classes/view.php

    r49 r79  
    1111    public function hash() 
    1212    { 
    13         return md5($this->_file); 
     13        return md5($this->file_name); 
    1414    } 
    1515} 
  • trunk/exitecms/config/config.php

    r70 r79  
    1313 */ 
    1414 
    15 /* 
    16  * default environment settings 
    17  */ 
    18 if (\Fuel::$is_test) 
    19 { 
    20     $env = array( 
    21         'environment'   => Fuel::TEST, 
    22         'profiling'     => false, 
    23         'log'           => Fuel::L_ALL 
    24     ); 
    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_ALL 
    33     ); 
    34     ! defined('DEBUG') && define('DEBUG', true); 
    35  
    36     // make sure this is enabled in development 
    37     error_reporting(E_ALL); 
    38     ini_set('display_errors', '1'); 
    39 } 
    40 else 
    41 { 
    42     $env = array( 
    43         'environment'   => Fuel::PRODUCTION, 
    44         'profiling'     => false, 
    45         'log'           => Fuel::L_ERROR 
    46     ); 
    47  
    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 } 
    5415 
    5516/* 
     
    8950    'index_file'    => false, 
    9051 
    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, 
    10253 
    10354    'caching'           => false, 
     
    10556    'cache_lifetime'    => 3600, // In Seconds 
    10657 
     58    /** 
     59    * Callback to use with ob_start(), set this to 'ob_gzhandler' for gzip encodign of output 
     60    */ 
     61    'ob_callback' => null, 
     62 
    10763    'errors'  => array( 
    10864 
     
    11672    ), 
    11773 
    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', 
    12182 
    12283    /** 
     
    12687     * default_timezone     optional, if you want to change the server's default timezone 
    12788     */ 
    128     'server_gmt_offset' => 0, 
     89    'server_gmt_offset' => 3600, 
    12990 
    13091    'default_timezone'  => 'Europe/Amsterdam', 
     
    139100     * Fuel::L_ALL 
    140101     */ 
    141     'log_threshold'     => $env['log'], 
     102    'log_threshold'     => Fuel::L_ALL, 
    142103    'log_path'          => APPPATH.'../logs/', 
    143104    'log_date_format'   => 'Y-m-d H:i:s', 
     
    161122 
    162123        /** 
    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, 
    166135 
    167136        /** 
     
    169138         * throw exceptions unless they are instances of the classes in this array. 
    170139         */ 
    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') 
    172141    ), 
    173142 
  • trunk/exitecms/config/version.php

    r72 r79  
    1414 
    1515/* 
    16  * revision number added by SubVersion on checkout/export 
     16 * revision number added by SubVersion on checkout/export ** 
    1717 */ 
    1818$revision = explode(' ', "\$Rev$"); 
  • trunk/exitecms/config/website.1.php

    r73 r79  
    164164                'content' => array( 
    165165                    array( 
    166                         'type' => 'text', 
    167                         'uri' => 'Content module here' 
     166                        'type' => 'module', 
     167                        'uri' => 'exitecms/content' 
    168168                    ), 
    169169                ), 
     
    216216                'content' => array( 
    217217                    array( 
    218                         'type' => 'text', 
    219                         'uri' => 'Groups module here' 
     218                        'type' => 'module', 
     219                        'uri' => 'exitecms/groups' 
    220220                    ), 
    221221                ), 
     
    229229                'content' => array( 
    230230                    array( 
    231                         'type' => 'text', 
    232                         'uri' => 'Roles module here' 
     231                        'type' => 'module', 
     232                        'uri' => 'exitecms/roles' 
    233233                    ), 
    234234                ), 
     
    242242                'content' => array( 
    243243                    array( 
    244                         'type' => 'text', 
    245                         'uri' => 'Tasks module here' 
     244                        'type' => 'module', 
     245                        'uri' => 'exitecms/tasks' 
    246246                    ), 
    247247                ), 
     
    255255                'content' => array( 
    256256                    array( 
    257                         'type' => 'text', 
    258                         'uri' => 'Workflow module here' 
     257                        'type' => 'module', 
     258                        'uri' => 'exitecms/workflow' 
    259259                    ), 
    260260                ), 
     
    281281                'content' => array( 
    282282                    array( 
    283                         'type' => 'text', 
    284                         'uri' => 'Modules module here' 
     283                        'type' => 'module', 
     284                        'uri' => 'exitecms/modules' 
    285285                    ), 
    286286                ), 
     
    294294                'content' => array( 
    295295                    array( 
    296                         'type' => 'text', 
    297                         'uri' => 'Plugins module here' 
     296                        'type' => 'module', 
     297                        'uri' => 'exitecms/plugins' 
    298298                    ), 
    299299                ), 
  • trunk/exitecms/views/forms/add.php

    r70 r79  
    2222{ 
    2323    echo '<fieldset>', "\n"; 
    24     echo "\t", '<legend>', \Lang::line('global.information'), '</legend>', "\n"; 
     24    echo "\t", '<legend>', \Lang::get('global.information'), '</legend>', "\n"; 
    2525    echo "\t", '<div class="info">', $info, '</div>', "\n"; 
    2626    echo '</fieldset>', "\n"; 
  • trunk/exitecms/views/forms/delete.php

    r70 r79  
    1414{ 
    1515    echo '<fieldset>', "\n"; 
    16     echo "\t", '<legend>', \Lang::line('global.information'), '</legend>', "\n"; 
     16    echo "\t", '<legend>', \Lang::get('global.information'), '</legend>', "\n"; 
    1717    echo "\t", '<div class="info">', $info, '</div>', "\n"; 
    1818    echo '</fieldset>', "\n"; 
  • trunk/exitecms/views/forms/edit.php

    r70 r79  
    2222{ 
    2323    echo '<fieldset>', "\n"; 
    24     echo "\t", '<legend>', \Lang::line('global.information'), '</legend>', "\n"; 
     24    echo "\t", '<legend>', \Lang::get('global.information'), '</legend>', "\n"; 
    2525    echo "\t", '<div class="info">', $info, '</div>', "\n"; 
    2626    echo '</fieldset>', "\n"; 
  • trunk/exitecms/views/forms/info.php

    r73 r79  
    2222{ 
    2323    echo '<fieldset>', "\n"; 
    24     echo "\t", '<legend>', \Lang::line('global.information'), '</legend>', "\n"; 
     24    echo "\t", '<legend>', \Lang::get('global.information'), '</legend>', "\n"; 
    2525    echo "\t", '<div class="info">', $info, '</div>', "\n"; 
    2626    echo '</fieldset>', "\n"; 
  • trunk/exitecms/views/forms/list.php

    r73 r79  
    1414{ 
    1515    echo '<fieldset>', "\n"; 
    16     echo "\t", '<legend>', \Lang::line('global.information'), '</legend>', "\n"; 
     16    echo "\t", '<legend>', \Lang::get('global.information'), '</legend>', "\n"; 
    1717    echo "\t", '<div class="info">', $info, '</div>', "\n"; 
    1818    echo '</fieldset>', "\n"; 
     
    9898if ( empty($data)) 
    9999{ 
    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>'; 
    101101} 
    102102 
  • trunk/exitecms/views/forms/tree.php

    r72 r79  
    2929{ 
    3030    echo '<fieldset>', "\n"; 
    31     echo "\t", '<legend>', \Lang::line('global.information'), '</legend>', "\n"; 
     31    echo "\t", '<legend>', \Lang::get('global.information'), '</legend>', "\n"; 
    3232    echo "\t", '<div class="info">', $info, '</div>', "\n"; 
    3333    echo '</fieldset>', "\n"; 
     
    126126if ( empty($data)) 
    127127{ 
    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>'; 
    129129} 
    130130 
  • trunk/modules/exitecms/classes/controller/dashboard.php

    r72 r79  
    4646    public function __construct(\Request $request, \Response $response) 
    4747    { 
    48         $this->model = Model_User::factory(); 
     48        $this->model = Model_User::forge(); 
    4949 
    5050        parent::__construct($request, $response); 
     
    6969    { 
    7070        // set the title 
    71         $this->view->title = \Lang::line('title.index'); 
     71        $this->view->title = \Lang::get('title.index'); 
    7272 
    7373        // load the SimplePie package 
     
    9595        if (true) 
    9696        { 
    97             $status = \Lang::line('info.status_ok'); 
     97            $status = \Lang::get('info.status_ok'); 
    9898        } 
    9999        else 
    100100        { 
    101             $status = \Lang::line('info.status_nok'); 
     101            $status = \Lang::get('info.status_nok'); 
    102102        } 
    103103        // fetch the exitecms information 
    104104        $this->view->set('exitecms', 
    105             \Lang::line('info.exitecms', 
     105            \Lang::get('info.exitecms', 
    106106                array( 
    107107                    'version' => \Config::get('version.version', '?'), 
     
    146146        if ( true ) 
    147147        { 
    148             $this->view->update = \Lang::line('info.current'); 
     148            $this->view->update = \Lang::get('info.current'); 
    149149        } 
    150150        else 
    151151        { 
    152             $this->view->update = \Lang::line('info.update'); 
     152            $this->view->update = \Lang::get('info.update'); 
    153153        } 
    154154    } 
  • trunk/modules/exitecms/classes/controller/datetime.php

    r72 r79  
    173173        // define the in-form headers 
    174174        $this->view->headers = array( 
    175             array('title' => \Lang::line('action.edit.form'), 'colspan' => 2) 
     175            array('title' => \Lang::get('action.edit.form'), 'colspan' => 2) 
    176176        ); 
    177177 
     
    199199        if ( \Config::save('exitecms', 'exitecms')) 
    200200        { 
    201             \ExiteCMS_Messages::set(\Lang::line('action.edit.success'), 'C'); 
     201            \ExiteCMS_Messages::set(\Lang::get('action.edit.success'), 'C'); 
    202202        } 
    203203        else 
    204204        { 
    205             \ExiteCMS_Messages::set(\Lang::line('action.edit.failure'), 'E'); 
     205            \ExiteCMS_Messages::set(\Lang::get('action.edit.failure'), 'E'); 
    206206        } 
    207207 
  • trunk/modules/exitecms/classes/controller/install.php

    r72 r79  
    9292            'type' => 'select', 
    9393            'value' => 0, 
    94             'values' => array(0 => \Lang::line('global.none_selected')), 
     94            'values' => array(0 => \Lang::get('global.none_selected')), 
    9595        ); 
    9696 
     
    143143            'type' => 'radio', 
    144144            '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')), 
    146146        ); 
    147147 
     
    170170            'type' => 'radio', 
    171171            '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')), 
    173173        ); 
    174174 
     
    183183            'type' => 'radio', 
    184184            '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')), 
    186186        ); 
    187187 
     
    208208        // define the in-form headers 
    209209        $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'), 
    214214        )); 
    215215 
     
    231231        if ( \Config::save('exitecms', 'exitecms')) 
    232232        { 
    233             \ExiteCMS_Messages::set(\Lang::line('action.edit.success'), 'C'); 
     233            \ExiteCMS_Messages::set(\Lang::get('action.edit.success'), 'C'); 
    234234        } 
    235235        else 
    236236        { 
    237             \ExiteCMS_Messages::set(\Lang::line('action.edit.failure'), 'E'); 
     237            \ExiteCMS_Messages::set(\Lang::get('action.edit.failure'), 'E'); 
    238238        } 
    239239 
  • trunk/modules/exitecms/classes/controller/links.php

    r72 r79  
    4444    { 
    4545        // define this controller's model 
    46         $this->model = Model_Link::factory(); 
     46        $this->model = Model_Link::forge(); 
    4747 
    4848        parent::__construct($request, $response); 
     
    123123        $this->view->set('headers', array( 
    124124            'header' => array( 
    125                 'title' => \Lang::line('field.header'), 
     125                'title' => \Lang::get('field.header'), 
    126126                'options' => array( 
    127127                    'colspan' => '2', 
     
    129129            ), 
    130130            'options' => array( 
    131                 'title' => \Lang::line('field.actions'), 
     131                'title' => \Lang::get('field.actions'), 
    132132                'options' => array( 
    133133                    'style' => 'width:0px; white-space:nowrap; text-align:center;', 
     
    140140        { 
    141141            // reset the data array 
    142             $this->view->data = array(); 
     142            $data = array(); 
    143143 
    144144            // loop through the records found 
    145145            foreach($this->data as $record) 
    146146            { 
    147                 $this->view->data[] = array( 
     147                $data[] = array( 
    148148                    'name' => array( 
    149149                        'value' => $record->name 
     
    159159                            array( 
    160160                                'icon' => 'edit', 
    161                                 'title' => \Lang::line('icon.edit'), 
     161                                'title' => \Lang::get('icon.edit'), 
    162162                                'confirm' => false, 
    163163                                'enabled' => true, 
     
    166166                            array( 
    167167                                'icon' => 'sitemap', 
    168                                 'title' => \Lang::line('icon.sitemap'), 
     168                                'title' => \Lang::get('icon.sitemap'), 
    169169                                'confirm' => false, 
    170170                                'enabled' => $record->system != 1, 
     
    173173                            array( 
    174174                                'icon' => 'delete', 
    175                                 'title' => \Lang::line('icon.delete'), 
     175                                'title' => \Lang::get('icon.delete'), 
    176176                                'confirm' => false, 
    177177                                'enabled' => $record->system != 1, 
     
    182182                ); 
    183183            } 
     184 
     185            $this->view->set('data', $data); 
    184186        } 
    185187    } 
     
    192194        if ($this->model->system == 1) 
    193195        { 
    194             \ExiteCMS::set_message(\Lang::line('message.deleted_noaccess'), 'E'); 
     196            \ExiteCMS::set_message(\Lang::get('message.deleted_noaccess'), 'E'); 
    195197            \ExiteCMS::redirect($this->baseurl); 
    196198        } 
    197199 
    198200        // 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); 
    200202    } 
    201203 
  • trunk/modules/exitecms/classes/controller/linkset.php

    r72 r79  
    4444    { 
    4545        // define this controller's model 
    46         $this->model = Model_Link::factory(); 
     46        $this->model = Model_Link::forge(); 
    4747 
    4848        parent::__construct($request, $response); 
     
    9494        ); 
    9595 
     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 
    96108        // field: parent 
    97109        $this->fields['parent'] = array( 
     
    119131            'type' => 'select', 
    120132            'value' => 'P', 
    121             'values' => \Lang::line('other.type'), 
     133            'values' => \Lang::get('other.type'), 
    122134        ); 
    123135 
     
    156168            'value' => 0, 
    157169            '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')), 
    159171        ); 
    160172 
     
    166178            'type' => 'select', 
    167179            'value' => '?', 
    168             'values' => \Lang::line('other.security'), 
     180            'values' => \Lang::get('other.security'), 
    169181        ); 
    170182    } 
     
    183195    public function button_cancel() 
    184196    { 
    185         \ExiteCMS_Messages::set(\Lang::line('forms.action_canceled'), 'I'); 
     197        \ExiteCMS_Messages::set(\Lang::get('forms.action_canceled'), 'I'); 
    186198 
    187199        $this->redirect_back(); 
     
    213225        // define the list headers structure 
    214226        $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'), 
    220232                'options' => array( 
    221233                    'style' => 'width:0px; white-space:nowrap; text-align:center;', 
     
    228240        if ($recnbr = $this->param(1)) 
    229241        { 
    230             $root = Model_Link::factory()->find() 
     242            $root = Model_Link::forge()->find() 
    231243                ->where($this->model->tree_get_property('tree_field'), $recnbr) 
    232244                ->where($this->model->tree_get_property('left_field'), 1) 
     
    236248        { 
    237249            // 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'); 
    239251            \ExiteCMS::redirect(\ExiteCMS::baseurl('links')); 
    240252        } 
     
    242254        { 
    243255            // 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); 
    245257        } 
    246258 
     
    249261        { 
    250262            // reset the data array 
    251             $this->view->data = array(); 
     263            $data = array(); 
    252264 
    253265            // loop through the records found 
     
    255267            { 
    256268                $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( 
    258270                    'content' => array( 
    259271                        'value' => $record['name'], 
     
    274286                            array( 
    275287                                'icon' => 'edit', 
    276                                 'title' => \Lang::line('icon.edit'), 
     288                                'title' => \Lang::get('icon.edit'), 
    277289                                'confirm' => false, 
    278290                                'enabled' => true, 
     
    281293                            array( 
    282294                                'icon' => 'delete', 
    283                                 'title' => \Lang::line('icon.delete'), 
     295                                'title' => \Lang::get('icon.delete'), 
    284296                                'confirm' => false, 
    285297                                'enabled' => $record['system'] == 0, 
     
    288300                            array( 
    289301                                'icon' => 'leftup', 
    290                                 'title' => \Lang::line('icon.left'), 
     302                                'title' => \Lang::get('icon.left'), 
    291303                                'confirm' => false, 
    292304                                'enabled' => $record['system'] == 0 and ! is_null($record['_parent_']), 
     
    295307                            array( 
    296308                                'icon' => 'up', 
    297                                 'title' => \Lang::line('icon.up'), 
     309                                'title' => \Lang::get('icon.up'), 
    298310                                'confirm' => false, 
    299311                                'enabled' => $record['system'] == 0 and $record['_first_'] == false, 
     
    302314                            array( 
    303315                                'icon' => 'down', 
    304                                 'title' => \Lang::line('icon.down'), 
     316                                'title' => \Lang::get('icon.down'), 
    305317                                'confirm' => false, 
    306318                                'enabled' => $record['system'] == 0 and $record['_last_'] == false, 
     
    311323                ); 
    312324            } 
     325 
     326            $this->view->set('data', $data); 
    313327        } 
    314328 
    315329        // extra buttons to be placed under the table 
    316330        $this->view->buttons['back'] = array( 
    317             'title' => \Lang::line('button.back'), 
     331            'title' => \Lang::get('button.back'), 
    318332            'class' => 'back' 
    319333        ); 
     
    329343        if ($recnbr = $this->param(2)) 
    330344        { 
    331             $this->root  = Model_Link::factory()->find() 
     345            $this->root  = Model_Link::forge()->find() 
    332346                ->where($this->model->tree_get_property('tree_field'), $recnbr) 
    333347                ->where($this->model->tree_get_property('left_field'), 1) 
     
    337351        { 
    338352            // 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'); 
    340354            \ExiteCMS::redirect(\ExiteCMS::baseurl('links')); 
    341355        } 
     
    348362 
    349363        // 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))); 
    351365    } 
    352366 
     
    359373        if ($recnbr = $this->param(2)) 
    360374        { 
    361             $this->root  = Model_Link::factory()->find() 
     375            $this->root  = Model_Link::forge()->find() 
    362376                ->where($this->model->tree_get_property('tree_field'), $recnbr) 
    363377                ->where($this->model->tree_get_property('left_field'), 1) 
     
    367381        { 
    368382            // 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'); 
    370384            \ExiteCMS::redirect(\ExiteCMS::baseurl('links')); 
    371385        } 
     
    381395 
    382396        // 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))); 
    384398    } 
    385399 
     
    402416        if ($this->model->system == 1) 
    403417        { 
    404             \ExiteCMS_Messages::set(\Lang::line('message.deleted_noaccess'), 'E'); 
     418            \ExiteCMS_Messages::set(\Lang::get('message.deleted_noaccess'), 'E'); 
    405419            \ExiteCMS::redirect($this->baseurl); 
    406420        } 
     
    409423 
    410424        // 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); 
    412426    } 
    413427 
     
    475489        if ( is_null($recnbr) or ! $node = $this->model->find($recnbr)) 
    476490        { 
    477             \ExiteCMS_Messages::set(\Lang::line('message.notfound_link'), 'E'); 
     491            \ExiteCMS_Messages::set(\Lang::get('message.notfound_link'), 'E'); 
    478492            \ExiteCMS::redirect(\ExiteCMS::baseurl('links')); 
    479493        } 
     
    488502                if ($node->tree_make_previous_sibling_of($sibling)) 
    489503                { 
    490                     \ExiteCMS_Messages::set(\Lang::line('message.up'), 'I'); 
     504                    \ExiteCMS_Messages::set(\Lang::get('message.up'), 'I'); 
    491505                } 
    492506                else 
    493507                { 
    494                     \ExiteCMS_Messages::set(\Lang::line('message.move_failed'), 'I'); 
     508                    \ExiteCMS_Messages::set(\Lang::get('message.move_failed'), 'I'); 
    495509                } 
    496510            } 
    497511            else 
    498512            { 
    499                 \ExiteCMS_Messages::set(\Lang::line('message.move_failed'), 'I'); 
     513                \ExiteCMS_Messages::set(\Lang::get('message.move_failed'), 'I'); 
    500514            } 
    501515        } 
     
    517531        if ( is_null($recnbr) or ! $node = $this->model->find($recnbr)) 
    518532        { 
    519             \ExiteCMS_Messages::set(\Lang::line('message.notfound_link'), 'E'); 
     533            \ExiteCMS_Messages::set(\Lang::get('message.notfound_link'), 'E'); 
    520534            \ExiteCMS::redirect(\ExiteCMS::baseurl('links')); 
    521535        } 
     
    530544                if ($node->tree_make_next_sibling_of($sibling)) 
    531545                { 
    532                     \ExiteCMS_Messages::set(\Lang::line('message.down'), 'I'); 
     546                    \ExiteCMS_Messages::set(\Lang::get('message.down'), 'I'); 
    533547                } 
    534548                else 
    535549                { 
    536                     \ExiteCMS_Messages::set(\Lang::line('message.move_failed'), 'I'); 
     550                    \ExiteCMS_Messages::set(\Lang::get('message.move_failed'), 'I'); 
    537551                } 
    538552            } 
    539553            else 
    540554            { 
    541                 \ExiteCMS_Messages::set(\Lang::line('message.move_failed'), 'I'); 
     555                \ExiteCMS_Messages::set(\Lang::get('message.move_failed'), 'I'); 
    542556            } 
    543557        } 
     
    559573        if ( is_null($recnbr) or ! $node = $this->model->find($recnbr)) 
    560574        { 
    561             \ExiteCMS_Messages::set(\Lang::line('message.notfound_link'), 'E'); 
     575            \ExiteCMS_Messages::set(\Lang::get('message.notfound_link'), 'E'); 
    562576            \ExiteCMS::redirect(\ExiteCMS::baseurl('links')); 
    563577        } 
     
    572586                if ($node->tree_make_next_sibling_of($parent)) 
    573587                { 
    574                     \ExiteCMS_Messages::set(\Lang::line('message.left'), 'I'); 
     588                    \ExiteCMS_Messages::set(\Lang::get('message.left'), 'I'); 
    575589                } 
    576590                else 
    577591                { 
    578                     \ExiteCMS_Messages::set(\Lang::line('message.move_failed'), 'I'); 
     592                    \ExiteCMS_Messages::set(\Lang::get('message.move_failed'), 'I'); 
    579593                } 
    580594            } 
    581595            else 
    582596            { 
    583                 \ExiteCMS_Messages::set(\Lang::line('message.move_failed'), 'I'); 
     597                \ExiteCMS_Messages::set(\Lang::get('message.move_failed'), 'I'); 
    584598            } 
    585599        } 
  • trunk/modules/exitecms/classes/controller/locales.php

    r72 r79  
    7575            'value' => 1, 
    7676            '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')), 
    7878        ); 
    7979 
     
    8989            'value' => 'T405', 
    9090            'type' => 'select', 
    91             'values' => \Lang::line('timezones'), 
     91            'values' => \Lang::get('timezones'), 
    9292        ); 
    9393 
     
    103103            'value' => 0, 
    104104            'type' => 'select', 
    105             'values' => \Lang::line('countries'), 
     105            'values' => \Lang::get('countries'), 
    106106        ); 
    107107    } 
     
    115115        // define the in-form headers 
    116116        $this->view->headers = array( 
    117             array('title' => \Lang::line('action.edit.form'), 'colspan' => 2) 
     117            array('title' => \Lang::get('action.edit.form'), 'colspan' => 2) 
    118118        ); 
    119119 
     
    135135        if ( \Config::save('exitecms', 'exitecms')) 
    136136        { 
    137             \ExiteCMS_Messages::set(\Lang::line('action.edit.success'), 'C'); 
     137            \ExiteCMS_Messages::set(\Lang::get('action.edit.success'), 'C'); 
    138138        } 
    139139        else 
    140140        { 
    141             \ExiteCMS_Messages::set(\Lang::line('action.edit.failure'), 'E'); 
     141            \ExiteCMS_Messages::set(\Lang::get('action.edit.failure'), 'E'); 
    142142        } 
    143143 
  • trunk/modules/exitecms/classes/controller/messages.php

    r61 r79  
    3131    { 
    3232        // load the messages viewmodel 
    33         \ViewModel::factory('messages/show'); 
     33        \ViewModel::forge('messages/show'); 
    3434    } 
    3535 
  • trunk/modules/exitecms/classes/controller/pages.php

    r72 r79  
    3636    { 
    3737        // define this controller's model 
    38         $this->model = Model_Page::factory(); 
     38        $this->model = Model_Page::forge(); 
    3939 
    4040        parent::__construct($request, $response); 
     
    157157            ), 
    158158            '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')), 
    160160        ); 
    161161 
     
    171171            ), 
    172172            'value' => 0, 
    173             'values' => Model_ThemeTemplate::templates_dropdown(\Lang::line('message.global_theme')), 
     173            'values' => Model_ThemeTemplate::templates_dropdown(\Lang::get('message.global_theme')), 
    174174        ); 
    175175 
     
    206206    protected function button_cancel() 
    207207    { 
    208         \ExiteCMS_Messages::set(\Lang::line('forms.action_canceled'), 'I'); 
     208        \ExiteCMS_Messages::set(\Lang::get('forms.action_canceled'), 'I'); 
    209209 
    210210        $this->redirect_back(); 
     
    237237        $this->view->set('headers', array( 
    238238            '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'), 
    243243                'options' => array( 
    244244                    'style' => 'width:0px; white-space:nowrap; text-align:center;', 
     
    251251        if ($recnbr = $this->param(1)) 
    252252        { 
    253             $root = Model_Page::factory()->find() 
     253            $root = Model_Page::forge()->find() 
    254254                ->where($this->model->tree_get_property('tree_field'), $recnbr) 
    255255                ->where($this->model->tree_get_property('left_field'), 1) 
     
    259259        { 
    260260            // 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'); 
    262262            \ExiteCMS::redirect(\ExiteCMS::baseurl('sites')); 
    263263        } 
     
    267267        { 
    268268            // reset the data array 
    269             $this->view->data = array(); 
     269            $data = array(); 
    270270 
    271271            // loop through the records found 
     
    273273            { 
    274274                $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( 
    276276                    'content' => array( 
    277277                        'value' => array($record['name'], $record['title']), 
    278278                        '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') : ''), 
    280280                    ), 
    281281                    'tree' => array( 
     
    293293                            array( 
    294294                                'icon' => 'edit', 
    295                                 'title' => \Lang::line('icon.edit'), 
     295                                'title' => \Lang::get('icon.edit'), 
    296296                                'confirm' => false, 
    297297                                'enabled' => true, 
     
    300300                            array( 
    301301                                'icon' => 'layout', 
    302                                 'title' => \Lang::line('icon.layout'), 
     302                                'title' => \Lang::get('icon.layout'), 
    303303                                'confirm' => false, 
    304304                                'enabled' => ! $is_folder, 
     
    307307                            array( 
    308308                                'icon' => 'leftup', 
    309                                 'title' => \Lang::line('icon.left'), 
     309                                'title' => \Lang::get('icon.left'), 
    310310                                'confirm' => false, 
    311311                                'enabled' => $record['system'] == 0 and ! is_null($record['_parent_']), 
     
    314314                            array( 
    315315                                'icon' => 'up', 
    316                                 'title' => \Lang::line('icon.up'), 
     316                                'title' => \Lang::get('icon.up'), 
    317317                                'confirm' => false, 
    318318                                'enabled' => $record['system'] == 0 and $record['_first_'] == false, 
     
    321321                            array( 
    322322                                'icon' => 'down', 
    323                                 'title' => \Lang::line('icon.down'), 
     323                                'title' => \Lang::get('icon.down'), 
    324324                                'confirm' => false, 
    325325                                'enabled' => $record['system'] == 0 and $record['_last_'] == false, 
     
    328328                            array( 
    329329                                'icon' => 'delete', 
    330                                 'title' => \Lang::line('icon.delete'), 
     330                                'title' => \Lang::get('icon.delete'), 
    331331                                'confirm' => false, 
    332332                                'enabled' => $record['system'] == 0, 
     
    337337                ); 
    338338            } 
     339 
     340            $this->view->set('data', $data); 
    339341        } 
    340342 
    341343        // extra buttons to be placed under the table 
    342344        $this->view->buttons['back'] = array( 
    343             'title' => \Lang::line('button.back'), 
     345            'title' => \Lang::get('button.back'), 
    344346            'class' => 'back' 
    345347        ); 
     
    356358        if ($recnbr = $this->param(2)) 
    357359        { 
    358             $this->root  = Model_Page::factory()->find() 
     360            $this->root  = Model_Page::forge()->find() 
    359361                ->where($this->model->tree_get_property('tree_field'), $recnbr) 
    360362                ->where($this->model->tree_get_property('left_field'), 1) 
     
    364366        { 
    365367            // 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'); 
    367369            \ExiteCMS::redirect(\ExiteCMS::baseurl('sites')); 
    368370        } 
     
    375377 
    376378        // 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')); 
    378380 
    379381        // 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))); 
    381383    } 
    382384 
     
    389391        if ($recnbr = $this->param(2)) 
    390392        { 
    391             $this->root  = Model_Page::factory()->find() 
     393            $this->root  = Model_Page::forge()->find() 
    392394                ->where($this->model->tree_get_property('tree_field'), $recnbr) 
    393395                ->where($this->model->tree_get_property('left_field'), 1) 
     
    397399        { 
    398400            // 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'); 
    400402            \ExiteCMS::redirect(\ExiteCMS::baseurl('sites')); 
    401403        } 
     
    426428 
    427429        // 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')); 
    429431 
    430432        // 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))); 
    432434    } 
    433435 
     
    439441        if ($this->model->system == 1) 
    440442        { 
    441             \ExiteCMS_Messages::set(\Lang::line('message.deleted_noaccess'), 'E'); 
     443            \ExiteCMS_Messages::set(\Lang::get('message.deleted_noaccess'), 'E'); 
    442444            $this->redirect_back(); 
    443445        } 
     
    447449        if ($recnbr = $this->param(2)) 
    448450        { 
    449             $this->root  = Model_Page::factory()->find() 
     451            $this->root  = Model_Page::forge()->find() 
    450452                ->where($this->model->tree_get_property('tree_field'), $recnbr) 
    451453                ->where($this->model->tree_get_property('left_field'), 1) 
     
    455457        { 
    456458            // 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'); 
    458460            \ExiteCMS::redirect(\ExiteCMS::baseurl('sites')); 
    459461        } 
    460462 
    461463        // 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); 
    463465    } 
    464466 
     
    521523        if ( is_null($recnbr) or ! $node = $this->model->find($recnbr)) 
    522524        { 
    523             \ExiteCMS_Messages::set(\Lang::line('message.notfound_page'), 'E'); 
     525            \ExiteCMS_Messages::set(\Lang::get('message.notfound_page'), 'E'); 
    524526            \ExiteCMS::redirect(\ExiteCMS::baseurl('sites')); 
    525527        } 
     
    534536                if ($node->tree_make_previous_sibling_of($sibling)) 
    535537                { 
    536                     \ExiteCMS_Messages::set(\Lang::line('message.up'), 'I'); 
     538                    \ExiteCMS_Messages::set(\Lang::get('message.up'), 'I'); 
    537539                } 
    538540                else 
    539541                { 
    540                     \ExiteCMS_Messages::set(\Lang::line('message.move_failed'), 'I'); 
     542                    \ExiteCMS_Messages::set(\Lang::get('message.move_failed'), 'I'); 
    541543                } 
    542544            } 
    543545            else 
    544546            { 
    545                 \ExiteCMS_Messages::set(\Lang::line('message.move_failed'), 'I'); 
     547                \ExiteCMS_Messages::set(\Lang::get('message.move_failed'), 'I'); 
    546548            } 
    547549        } 
     
    563565        if ( is_null($recnbr) or ! $node = $this->model->find($recnbr)) 
    564566        { 
    565             \ExiteCMS_Messages::set(\Lang::line('message.notfound_page'), 'E'); 
     567            \ExiteCMS_Messages::set(\Lang::get('message.notfound_page'), 'E'); 
    566568            \ExiteCMS::redirect(\ExiteCMS::baseurl('sites')); 
    567569        } 
     
    576578                if ($node->tree_make_next_sibling_of($sibling)) 
    577579                { 
    578                     \ExiteCMS_Messages::set(\Lang::line('message.down'), 'I'); 
     580                    \ExiteCMS_Messages::set(\Lang::get('message.down'), 'I'); 
    579581                } 
    580582                else 
    581583                { 
    582                     \ExiteCMS_Messages::set(\Lang::line('message.move_failed'), 'I'); 
     584                    \ExiteCMS_Messages::set(\Lang::get('message.move_failed'), 'I'); 
    583585                } 
    584586            } 
    585587            else 
    586588            { 
    587                 \ExiteCMS_Messages::set(\Lang::line('message.move_failed'), 'I'); 
     589                \ExiteCMS_Messages::set(\Lang::get('message.move_failed'), 'I'); 
    588590            } 
    589591        } 
     
    605607        if ( is_null($recnbr) or ! $node = $this->model->find($recnbr)) 
    606608        { 
    607             \ExiteCMS_Messages::set(\Lang::line('message.notfound_page'), 'E'); 
     609            \ExiteCMS_Messages::set(\Lang::get('message.notfound_page'), 'E'); 
    608610            \ExiteCMS::redirect(\ExiteCMS::baseurl('sites')); 
    609611        } 
     
    618620                if ($node->tree_make_next_sibling_of($parent)) 
    619621                { 
    620                     \ExiteCMS_Messages::set(\Lang::line('message.left'), 'I'); 
     622                    \ExiteCMS_Messages::set(\Lang::get('message.left'), 'I'); 
    621623                } 
    622624                else 
    623625                { 
    624                     \ExiteCMS_Messages::set(\Lang::line('message.move_failed'), 'I'); 
     626                    \ExiteCMS_Messages::set(\Lang::get('message.move_failed'), 'I'); 
    625627                } 
    626628            } 
    627629            else 
    628630            { 
    629                 \ExiteCMS_Messages::set(\Lang::line('message.move_failed'), 'I'); 
     631                \ExiteCMS_Messages::set(\Lang::get('message.move_failed'), 'I'); 
    630632            } 
    631633        } 
     
    679681            if ($parent and $this->model->tree_make_last_child_of($parent)) 
    680682            { 
    681                 \ExiteCMS_Messages::set(\Lang::line('message.newparent'), 'I'); 
     683                \ExiteCMS_Messages::set(\Lang::get('message.newparent'), 'I'); 
    682684            } 
    683685            else 
    684686            { 
    685                 \ExiteCMS_Messages::set(\Lang::line('message.move_failed'), 'E'); 
     687                \ExiteCMS_Messages::set(\Lang::get('message.move_failed'), 'E'); 
    686688            } 
    687689        } 
  • trunk/modules/exitecms/classes/controller/phpinfo.php

    r68 r79  
    3232        iconv_set_encoding("internal_encoding", "UTF-8"); 
    3333        // load the phpinfo viewmodel 
    34         \ViewModel::factory('phpinfo/phpinfo'); 
     34        \ViewModel::forge('phpinfo/phpinfo'); 
    3535    } 
    3636} 
  • trunk/modules/exitecms/classes/controller/security.php

    r72 r79  
    5555            'type' => 'radio', 
    5656            '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')), 
    5858        ); 
    5959 
     
    6868            'type' => 'radio', 
    6969            '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')), 
    7171        ); 
    7272 
     
    8181            'type' => 'radio', 
    8282            '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')), 
    8484        ); 
    8585 
     
    9494            'type' => 'radio', 
    9595            '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')), 
    9797        ); 
    9898 
     
    107107            'type' => 'radio', 
    108108            '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')), 
    110110        ); 
    111111 
     
    120120            'type' => 'radio', 
    121121            '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')), 
    123123        ); 
    124124 
     
    133133            'type' => 'radio', 
    134134            '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')), 
    136136        ); 
    137137 
     
    159159            'type' => 'radio', 
    160160            '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')), 
    162162        ); 
    163163 
     
    172172            'type' => 'radio', 
    173173            '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')), 
    175175        ); 
    176176 
     
    198198            'type' => 'select', 
    199199            'value' => 0, 
    200             'values' => array(0 => \Lang::line('global.none_selected')), 
     200            'values' => array(0 => \Lang::get('global.none_selected')), 
    201201        ); 
    202202    } 
     
    210210        // define the in-form headers 
    211211        $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'), 
    216216        )); 
    217217 
     
    233233        if ( \Config::save('exitecms', 'exitecms')) 
    234234        { 
    235             \ExiteCMS_Messages::set(\Lang::line('action.edit.success'), 'C'); 
     235            \ExiteCMS_Messages::set(\Lang::get('action.edit.success'), 'C'); 
    236236        } 
    237237        else 
    238238        { 
    239             \ExiteCMS_Messages::set(\Lang::line('action.edit.failure'), 'E'); 
     239            \ExiteCMS_Messages::set(\Lang::get('action.edit.failure'), 'E'); 
    240240        } 
    241241 
  • trunk/modules/exitecms/classes/controller/sites.php

    r72 r79  
    4444    { 
    4545        // define this controller's model 
    46         $this->model = Model_Site::factory(); 
     46        $this->model = Model_Site::forge(); 
    4747 
    4848        parent::__construct($request, $response); 
     
    9999        // field: post 
    100100        $this->fields['port'] = array( 
    101             'label' => \Lang::line('field.portnr'), 
     101            'label' => \Lang::get('field.portnr'), 
    102102            'validation' => array( 
    103103                'rules' => 'trim|match_pattern["/^[0-9]{1,}$/"]', 
    104104                'flags' => 'numeric', 
    105105                'messages' => array( 
    106                     'match_pattern' => \Lang::line('message.port_invalid'), 
     106                    'match_pattern' => \Lang::get('message.port_invalid'), 
    107107                ), 
    108108            ), 
     
    123123            ), 
    124124            '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')), 
    126126        ); 
    127127 
     
    136136            ), 
    137137            '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')), 
    139139        ); 
    140140 
     
    236236        $this->view->set('headers', array( 
    237237            'name' => array( 
    238                 'title' => \Lang::line('field.name'), 
     238                'title' => \Lang::get('field.name'), 
    239239                'options' => array( 
    240240                    'colspan' => '2', 
     
    242242            ), 
    243243            'host' => array( 
    244                 'title' => \Lang::line('field.host'), 
     244                'title' => \Lang::get('field.host'), 
    245245            ), 
    246246            'port' => array( 
    247                 'title' => \Lang::line('field.port'), 
     247                'title' => \Lang::get('field.port'), 
    248248                'options' => array( 
    249249                    'style' => 'width:0px; white-space:nowrap; text-align:center;', 
     
    251251            ), 
    252252            'options' => array( 
    253                 'title' => \Lang::line('field.actions'), 
     253                'title' => \Lang::get('field.actions'), 
    254254                'options' => array( 
    255255                    'style' => 'width:0px; white-space:nowrap; text-align:center;', 
     
    262262        { 
    263263            // reset the data array 
    264             $this->view->data = array(); 
     264            $data = array(); 
    265265 
    266266            // loop through the records found 
    267267            foreach($this->data as $record) 
    268268            { 
    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( 
    273273                    'default' => array( 
    274274                        'icon' => $record->default ? 'tbl_default' : 'tbl_opt_none', 
     
    297297                            array( 
    298298                                'icon' => 'edit', 
    299                                 'title' => \Lang::line('icon.edit'), 
     299                                'title' => \Lang::get('icon.edit'), 
    300300                                'confirm' => false, 
    301301                                'enabled' => true, 
     
    304304                            array( 
    305305                                'icon' => 'sitemap', 
    306                                 'title' => \Lang::line('icon.sitemap'), 
     306                                'title' => \Lang::get('icon.sitemap'), 
    307307                                'confirm' => false, 
    308308                                'enabled' => $record->system != 1, 
     
    311311                            array( 
    312312                                'icon' => 'templates', 
    313                                 'title' => \Lang::line('icon.templates'), 
     313                                'title' => \Lang::get('icon.templates'), 
    314314                                'confirm' => false, 
    315315                                'enabled' => $record->system != 1, 
     
    318318                            array( 
    319319                                'icon' => 'delete', 
    320                                 'title' => \Lang::line('icon.delete'), 
     320                                'title' => \Lang::get('icon.delete'), 
    321321                                'confirm' => false, 
    322322                                'enabled' => $record->system != 1, 
     
    327327                ); 
    328328            } 
     329            $this->view->set('data', $data); 
    329330        } 
    330331    } 
     
    350351        $this->data['page_403']['values'] = 
    351352        $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')); 
    353354    } 
    354355 
     
    369370        if ($this->model->system == 1) 
    370371        { 
    371             \ExiteCMS::set_message(\Lang::line('message.deleted_noaccess'), 'E'); 
     372            \ExiteCMS::set_message(\Lang::get('message.deleted_noaccess'), 'E'); 
    372373            \ExiteCMS::redirect($this->baseurl); 
    373374        } 
    374375 
    375376        // 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); 
    377378    } 
    378379 
     
    439440        if (preg_match($pattern, $this->model->host) !== 1) 
    440441        { 
    441             \ExiteCMS::set_message(\Lang::line('message.invalid_hostname'), 'W'); 
     442            \ExiteCMS::set_message(\Lang::get('message.invalid_hostname'), 'W'); 
    442443        } 
    443444    } 
  • trunk/modules/exitecms/classes/controller/templates.php

    r73 r79  
    3636    { 
    3737        // define this controller's model 
    38         $this->model = Model_Template::factory(); 
     38        $this->model = Model_Template::forge(); 
    3939 
    4040        parent::__construct($request, $response); 
     
    160160    protected function button_cancel() 
    161161    { 
    162         \ExiteCMS_Messages::set(\Lang::line('forms.action_canceled'), 'I'); 
     162        \ExiteCMS_Messages::set(\Lang::get('forms.action_canceled'), 'I'); 
    163163 
    164164        $this->redirect_back(); 
     
    191191        $this->view->set('headers', array( 
    192192            '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'), 
    197197                'options' => array( 
    198198                    'style' => 'width:0px; white-space:nowrap; text-align:center;', 
     
    205205        if ($recnbr = $this->param(1)) 
    206206        { 
    207             $root = Model_Page::factory()->find() 
     207            $root = Model_Page::forge()->find() 
    208208                ->where($this->model->tree_get_property('tree_field'), $recnbr) 
    209209                ->where($this->model->tree_get_property('left_field'), 1) 
     
    213213        { 
    214214            // 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'); 
    216216            \ExiteCMS::redirect(\ExiteCMS::baseurl('sites')); 
    217217        } 
     
    221221        { 
    222222            // reset the data array 
    223             $this->view->data = array(); 
     223            $data = array(); 
    224224 
    225225            // loop through the records found 
     
    227227            { 
    228228                $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( 
    230230                    'content' => array( 
    231231                        'value' => array($record['name'], $record['title']), 
     
    246246                            array( 
    247247                                'icon' => 'edit', 
    248                                 'title' => \Lang::line('icon.edit'), 
     248                                'title' => \Lang::get('icon.edit'), 
    249249                                'confirm' => false, 
    250250                                'enabled' => true, 
     
    253253                            array( 
    254254                                'icon' => 'layout', 
    255                                 'title' => \Lang::line('icon.layout'), 
     255                                'title' => \Lang::get('icon.layout'), 
    256256                                'confirm' => false, 
    257257                                'enabled' => ! $is_folder, 
     
    260260                            array( 
    261261                                'icon' => 'up', 
    262                                 'title' => \Lang::line('icon.up'), 
     262                                'title' => \Lang::get('icon.up'), 
    263263                                'confirm' => false, 
    264264                                'enabled' => $record['system'] == 0 and $record['_first_'] == false, 
     
    267267                            array( 
    268268                                'icon' => 'down', 
    269                                 'title' => \Lang::line('icon.down'), 
     269                                'title' => \Lang::get('icon.down'), 
    270270                                'confirm' => false, 
    271271                                'enabled' => $record['system'] == 0 and $record['_last_'] == false, 
     
    274274                            array( 
    275275                                'icon' => 'delete', 
    276                                 'title' => \Lang::line('icon.delete'), 
     276                                'title' => \Lang::get('icon.delete'), 
    277277                                'confirm' => false, 
    278278                                'enabled' => $record['system'] == 0, 
     
    283283                ); 
    284284            } 
     285 
     286            $this->view->set('data', $data); 
    285287        } 
    286288 
    287289        // extra buttons to be placed under the table 
    288290        $this->view->buttons['back'] = array( 
    289             'title' => \Lang::line('button.back'), 
     291            'title' => \Lang::get('button.back'), 
    290292            'class' => 'back' 
    291293        ); 
     
    301303        if ($recnbr = $this->param(2)) 
    302304        { 
    303             $this->root  = Model_Page::factory()->find() 
     305            $this->root  = Model_Page::forge()->find() 
    304306                ->where($this->model->tree_get_property('tree_field'), $recnbr) 
    305307                ->where($this->model->tree_get_property('left_field'), 1) 
     
    309311        { 
    310312            // 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'); 
    312314            \ExiteCMS::redirect(\ExiteCMS::baseurl('sites')); 
    313315        } 
    314316 
    315317        // 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))); 
    317319    } 
    318320 
     
    325327        if ($recnbr = $this->param(2)) 
    326328        { 
    327             $this->root  = Model_Page::factory()->find() 
     329            $this->root  = Model_Page::forge()->find() 
    328330                ->where($this->model->tree_get_property('tree_field'), $recnbr) 
    329331                ->where($this->model->tree_get_property('left_field'), 1) 
     
    333335        { 
    334336            // 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'); 
    336338            \ExiteCMS::redirect(\ExiteCMS::baseurl('sites')); 
    337339        } 
     
    349351 
    350352        // 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))); 
    352354    } 
    353355 
     
    359361        if ($this->model->system == 1) 
    360362        { 
    361             \ExiteCMS_Messages::set(\Lang::line('message.deleted_noaccess'), 'E'); 
     363            \ExiteCMS_Messages::set(\Lang::get('message.deleted_noaccess'), 'E'); 
    362364            $this->redirect_back(); 
    363365        } 
     
    367369        if ($recnbr = $this->param(2)) 
    368370        { 
    369             $this->root  = Model_Page::factory()->find() 
     371            $this->root  = Model_Page::forge()->find() 
    370372                ->where($this->model->tree_get_property('tree_field'), $recnbr) 
    371373                ->where($this->model->tree_get_property('left_field'), 1) 
     
    375377        { 
    376378            // 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'); 
    378380            \ExiteCMS::redirect(\ExiteCMS::baseurl('sites')); 
    379381        } 
    380382 
    381383        // 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); 
    383385    } 
    384386 
     
    398400        if ( is_null($recnbr) or ! $node = $this->model->find($recnbr)) 
    399401        { 
    400             \ExiteCMS_Messages::set(\Lang::line('message.notfound_template'), 'E'); 
     402            \ExiteCMS_Messages::set(\Lang::get('message.notfound_template'), 'E'); 
    401403            \ExiteCMS::redirect(\ExiteCMS::baseurl('sites')); 
    402404        } 
     
    411413                if ($node->tree_make_previous_sibling_of($sibling)) 
    412414                { 
    413                     \ExiteCMS_Messages::set(\Lang::line('message.up'), 'I'); 
     415                    \ExiteCMS_Messages::set(\Lang::get('message.up'), 'I'); 
    414416                } 
    415417                else 
    416418                { 
    417                     \ExiteCMS_Messages::set(\Lang::line('message.move_failed'), 'I'); 
     419                    \ExiteCMS_Messages::set(\Lang::get('message.move_failed'), 'I'); 
    418420                } 
    419421            } 
    420422            else 
    421423            { 
    422                 \ExiteCMS_Messages::set(\Lang::line('message.move_failed'), 'I'); 
     424                \ExiteCMS_Messages::set(\Lang::get('message.move_failed'), 'I'); 
    423425            } 
    424426        } 
     
    440442        if ( is_null($recnbr) or ! $node = $this->model->find($recnbr)) 
    441443        { 
    442             \ExiteCMS_Messages::set(\Lang::line('message.notfound_template'), 'E'); 
     444            \ExiteCMS_Messages::set(\Lang::get('message.notfound_template'), 'E'); 
    443445            \ExiteCMS::redirect(\ExiteCMS::baseurl('sites')); 
    444446        } 
     
    453455                if ($node->tree_make_next_sibling_of($sibling)) 
    454456                { 
    455                     \ExiteCMS_Messages::set(\Lang::line('message.down'), 'I'); 
     457                    \ExiteCMS_Messages::set(\Lang::get('message.down'), 'I'); 
    456458                } 
    457459                else 
    458460                { 
    459                     \ExiteCMS_Messages::set(\Lang::line('message.move_failed'), 'I'); 
     461                    \ExiteCMS_Messages::set(\Lang::get('message.move_failed'), 'I'); 
    460462                } 
    461463            } 
    462464            else 
    463465            { 
    464                 \ExiteCMS_Messages::set(\Lang::line('message.move_failed'), 'I'); 
     466                \ExiteCMS_Messages::set(\Lang::get('message.move_failed'), 'I'); 
    465467            } 
    466468        } 
     
    478480    { 
    479481        // 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); 
    481483 
    482484        // 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); 
    484486 
    485487        // 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))); 
    487489 
    488490        // define the theme page layout 
     
    493495 
    494496        // define the area's on the page 
    495         $div = \View::factory('forms/layout_selector'); 
     497        $div = \View::forge('forms/layout_selector'); 
    496498        $areas = array(); 
    497499        foreach (\Theme::instance('exitecms')->get_areas() as $name => $area) 
     
    520522        $this->view->buttons = array( 
    521523            'templates' => array( 
    522                 'title' => \Lang::line('button.templates'), 
     524                'title' => \Lang::get('button.templates'), 
    523525                'class' => 'back' 
    524526            ), 
  • trunk/modules/exitecms/classes/controller/themes.php

    r73 r79  
    3636    { 
    3737        // define this controller's model 
    38         $this->model = Model_Theme::factory(); 
     38        $this->model = Model_Theme::forge(); 
    3939 
    4040        parent::__construct($request, $response); 
     
    116116        { 
    117117            // get the theme controller instance 
    118             $theme = \Theme::factory($this->param(1)); 
     118            $theme = \Theme::forge($this->param(1)); 
    119119 
    120120            // fetch the defined templates 
    121121            $templates = $theme->templates(); 
    122122 
    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 
    130124            $themeinfo = $theme->info(); 
    131125        } 
    132126        catch (\Exception $e) 
    133127        { 
    134             \ExiteCMS_Messages::set(\Lang::line('forms.record_not_found'), 'E'); 
     128            \ExiteCMS_Messages::set(\Lang::get('forms.record_not_found'), 'E'); 
    135129            \ExiteCMS::redirect($this->baseurl); 
    136130        } 
    137131 
    138132        // 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); 
    140134 
    141135        // 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); 
    143137 
    144138        // define the in-form headers 
    145139        $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'), 
    149143        )); 
    150144 
     
    163157                case 'system': 
    164158                    $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'), 
    167161                    ); 
    168162                break; 
     
    170164                case 'version': 
    171165                    $this->data[$name] = array( 
    172                         'label' => \Lang::line('field.'.$name), 
     166                        'label' => \Lang::get('field.'.$name), 
    173167                        '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), 
    174175                    ); 
    175176                break; 
     
    182183                default: 
    183184                    $this->data[$name] = array( 
    184                         'label' => \Lang::line('field.'.$name), 
     185                        'label' => \Lang::get('field.'.$name), 
    185186                        'value' => nl2br($info), 
    186187                    ); 
     
    192193        { 
    193194            $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'), 
    196197            ); 
    197198        } 
     
    208209        { 
    209210            $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'), 
    212213            ); 
    213214        } 
     
    219220            { 
    220221                $this->data['template.'.$count] = array( 
    221                     'label' => \Lang::line('field.name'), 
     222                    'label' => \Lang::get('field.name'), 
    222223                    'value' => $name, 
    223224                ); 
    224225                $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'], 
    227228                ); 
    228229 
     
    230231                { 
    231232                    $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'), 
    234235                        'extra' => array('separator' => $count < $templates), 
    235236                    ); 
     
    244245 
    245246                    $this->data['area.'.$count++] = array( 
    246                         'label' => \Lang::line('field.sections'), 
     247                        'label' => \Lang::get('field.sections'), 
    247248                        'value' => $areas, 
    248249                        'extra' => array('separator' => $count < $templates), 
     
    258259        $this->view->buttons = array( 
    259260            'back' => array( 
    260                 'title' => \Lang::line('button.back'), 
     261                'title' => \Lang::get('button.back'), 
    261262                'class' => 'back' 
    262263            ), 
     
    272273        { 
    273274            // 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'); 
    318281        } 
    319282        catch (\Exception $e) 
    320283        { 
    321             \ExiteCMS_Messages::set(\Lang::line('forms.record_not_found'), 'E'); 
     284            \ExiteCMS_Messages::set(\Lang::get('forms.record_not_found'), 'E'); 
    322285        } 
    323286 
     
    334297        $this->model->save(); 
    335298 
    336         \ExiteCMS_Messages::set(\Lang::line('action.activate.success'), 'I'); 
     299        \ExiteCMS_Messages::set(\Lang::get('action.activate.success'), 'I'); 
    337300 
    338301        \ExiteCMS::redirect($this->baseurl); 
     
    348311        $this->model->save(); 
    349312 
    350         \ExiteCMS_Messages::set(\Lang::line('action.deactivate.success'), 'I'); 
     313        \ExiteCMS_Messages::set(\Lang::get('action.deactivate.success'), 'I'); 
    351314 
    352315        \ExiteCMS::redirect($this->baseurl); 
     
    371334        $this->view->set('headers', array( 
    372335            'name' => array( 
    373                 'title' => \Lang::line('field.name'), 
     336                'title' => \Lang::get('field.name'), 
    374337                'options' => array( 
    375338                    'colspan' => '2', 
     
    377340            ), 
    378341            'description' => array( 
    379                 'title' => \Lang::line('field.description'), 
     342                'title' => \Lang::get('field.description'), 
    380343            ), 
    381344            'options' => array( 
    382                 'title' => \Lang::line('field.actions'), 
     345                'title' => \Lang::get('field.actions'), 
    383346                'options' => array( 
    384347                    'style' => 'width:0px; white-space:nowrap; text-align:center;', 
     
    391354        { 
    392355            // reset the data array 
    393             $this->view->data = array(); 
     356            $data = array(); 
    394357 
    395358            // loop through the records found 
    396359            foreach($this->data as $record) 
    397360            { 
    398                 $this->view->data[] = array( 
     361                $data[] = array( 
    399362                    'default' => array( 
    400363                        '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') : '', 
    402365                        'options' => array( 
    403366                            'style' => 'width:0px; text-align:center; white-space:nowrap;', 
     
    417380                            array( 
    418381                                'icon' => 'info', 
    419                                 'title' => \Lang::line('icon.info'), 
     382                                'title' => \Lang::get('icon.info'), 
    420383                                'confirm' => false, 
    421384                                'enabled' => $record->system != -1, 
     
    424387                            array( 
    425388                                'icon' => 'install', 
    426                                 'title' => \Lang::line('icon.install'), 
     389                                'title' => \Lang::get('icon.install'), 
    427390                                'confirm' => false, 
    428                                 'enabled' => $record->id == 0, 
     391                                'enabled' => $record->id == 0 and $record->system != -1, 
    429392                                'url' => $this->baseurl.'/install/'.$record->name, 
    430393                            ), 
    431394                            array( 
    432395                                'icon' => 'plus', 
    433                                 'title' => \Lang::line('icon.activate'), 
     396                                'title' => \Lang::get('icon.activate'), 
    434397                                'confirm' => false, 
    435398                                'enabled' => $record->id != 0 and $record->system == 0 and $record->active == 0, 
     
    438401                            array( 
    439402                                'icon' => 'minus', 
    440                                 'title' => \Lang::line('icon.deactivate'), 
     403                                'title' => \Lang::get('icon.deactivate'), 
    441404                                'confirm' => false, 
    442405                                'enabled' => $record->id != 0 and $record->system == 0 and $record->active != 0, 
     
    445408                            array( 
    446409                                'icon' => 'delete', 
    447                                 'title' => \Lang::line('icon.remove'), 
     410                                'title' => \Lang::get('icon.remove'), 
    448411                                'confirm' => false, 
    449412                                'enabled' => $record->id != 0 and $record->system < 1, 
     
    454417                ); 
    455418            } 
     419 
     420            $this->view->set('data', $data); 
    456421        } 
    457422 
     
    460425    } 
    461426 
     427    // ----------------------------------------------------------------- 
     428 
    462429    protected function before_delete() 
    463430    { 
     
    467434            if ( ! empty($template->site)) 
    468435            { 
    469                 \ExiteCMS_Messages::set(\Lang::line('action.delete.site_used'), 'W'); 
     436                \ExiteCMS_Messages::set(\Lang::get('action.delete.site_used'), 'W'); 
    470437            } 
    471438            if ( ! empty($template->page)) 
    472439            { 
    473                 \ExiteCMS_Messages::set(\Lang::line('action.delete.page_used'), 'W'); 
     440                \ExiteCMS_Messages::set(\Lang::get('action.delete.page_used'), 'W'); 
    474441            } 
    475442        } 
    476443 
    477444        // 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    // ----------------------------------------------------------------- 
    480449 
    481450    protected function after_delete() 
    482451    { 
    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); 
     452var_dump($this->model); 
     453var_dump($this->data); 
     454die(); 
     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        } 
    492467    } 
    493468 
     
    532507                    $result->id = 0; 
    533508                    $result->active = 0; 
    534                     $result->system = $info['info']['system']; 
     509                    $result->system = $info['info']['system'] ? '1' : '0'; 
    535510                    $result->description = $info['info']['description']; 
    536511                    $results[$theme] = $result; 
  • trunk/modules/exitecms/classes/controller/users.php

    r72 r79  
    4444    { 
    4545        // define this controller's model 
    46         $this->model = Model_User::factory(); 
     46        $this->model = Model_User::forge(); 
    4747 
    4848        parent::__construct($request, $response); 
     
    185185            'type' => 'radio', 
    186186            'value' => '', 
    187             'values' => \Lang::line('other.genderlist'), 
     187            'values' => \Lang::get('other.genderlist'), 
    188188        ); 
    189189 
     
    211211            'type' => 'select', 
    212212            'value' => '', 
    213             'values' => \Lang::line('timezones'), 
     213            'values' => \Lang::get('timezones'), 
    214214        ); 
    215215    } 
     
    233233        $this->view->set('headers', array( 
    234234            'name' => array( 
    235                 'title' => \Lang::line('field.name'), 
     235                'title' => \Lang::get('field.name'), 
    236236            ), 
    237237            'email' => array( 
    238                 'title' => \Lang::line('field.email'), 
     238                'title' => \Lang::get('field.email'), 
    239239            ), 
    240240            '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'), 
    245245                'options' => array( 
    246246                    'style' => 'width:0px; white-space:nowrap; text-align:center;', 
     
    253253        { 
    254254            // reset the data array 
    255             $this->view->data = array(); 
     255            $data = array(); 
    256256 
    257257            // loop through the records found 
    258258            foreach($this->data as $record) 
    259259            { 
    260                 $this->view->data[] = array( 
     260                $data[] = array( 
    261261                    'name' => array( 
    262262                        'value' => $record->name 
     
    275275                            array( 
    276276                                'icon' => 'edit', 
    277                                 'title' => \Lang::line('icon.edit'), 
     277                                'title' => \Lang::get('icon.edit'), 
    278278                                'confirm' => false, 
    279279                                'enabled' => true, 
     
    282282                            array( 
    283283                                'icon' => 'delete', 
    284                                 'title' => \Lang::line('icon.delete'), 
     284                                'title' => \Lang::get('icon.delete'), 
    285285                                'confirm' => false, 
    286286                                'enabled' => $record->id != 1, 
     
    291291                ); 
    292292            } 
     293 
     294            $this->view->set('data', $data); 
    293295        } 
    294296    } 
     
    301303        if ($this->model->id == 1) 
    302304        { 
    303             \ExiteCMS::set_message(\Lang::line('message.deleted_noaccess'), 'E'); 
     305            \ExiteCMS::set_message(\Lang::get('message.deleted_noaccess'), 'E'); 
    304306            \ExiteCMS::redirect($this->baseurl); 
    305307        } 
  • trunk/modules/exitecms/classes/model/page.php

    r72 r79  
    8282    public static function pages_dropdown($id, $field = '', $exclude_root = true, $allow_empty = false) 
    8383    { 
    84         $page = static::factory()->tree_select($id)->tree_get_root(); 
     84        $page = static::forge()->tree_select($id)->tree_get_root(); 
    8585        return $page->tree_dump_dropdown($field, $exclude_root, $allow_empty); 
    8686    } 
     
    9595    { 
    9696        // Create the update query and return the result 
    97         $query = \Orm\Query::factory(get_called_class(), static::connection()) 
     97        $query = \Orm\Query::forge(get_called_class(), static::connection()) 
    9898            ->where($this->tree_get_property('tree_field'), '=', $this->{$this->tree_get_property('tree_field')}) 
    9999            ->order_by($this->tree_get_property('left_field'), 'ASC') 
  • trunk/modules/exitecms/classes/model/site.php

    r72 r79  
    109109    { 
    110110        // Create the update query and return the result 
    111         return \Orm\Query::factory(get_called_class(), static::connection()) 
     111        return \Orm\Query::forge(get_called_class(), static::connection()) 
    112112            ->where('id', '<>', $this->id) 
    113113            ->where('default', '=', '1') 
  • trunk/modules/exitecms/classes/model/template.php

    r70 r79  
    6363    public static function templates_dropdown($id, $field = '', $exclude_root = true, $allow_empty = false) 
    6464    { 
    65         $template = static::factory()->tree_select($id)->tree_get_root(); 
     65        $template = static::forge()->tree_select($id)->tree_get_root(); 
    6666        return $template->tree_dump_dropdown($field, $exclude_root, $allow_empty); 
    6767    } 
  • trunk/modules/exitecms/lang/en/linkset.php

    r68 r79  
    1010    'field' => array( 
    1111        'id' => '', 
    12         'title' => 'Link name', 
     12        'name' => 'Link name', 
     13        'title' => 'Link title', 
    1314        'actions' => 'Options', 
    14         'name' => 'Link name', 
    1515        'parent' => 'Parent link', 
    1616        'type' => 'Link type', 
     
    2626        'id' => '', 
    2727        'name' => 'Link name', 
     28        'title' => 'Link title', 
    2829        'parent' => 'Parent link', 
    2930        'type' => 'Link type', 
  • trunk/modules/exitecms/lang/en/themes.php

    r73 r79  
    3131    // form field help texts 
    3232    'help' => array( 
    33         'name' => '', 
    34         'description' => '', 
    3533    ), 
    3634 
     
    3937        'list' => array( 
    4038            'title' => 'Themes', 
    41             'form' => '', 
    4239            'info' => 'This is the ExiteCMS theme management module.<br /> 
    4340                Themes provide the look and feel of your ExiteCMS website. You use this module to control which themes will be 
     
    5754        'install' => array( 
    5855            'title' => 'Themes', 
    59             'form' => '', 
    60             'info' => '', 
    6156            'success' => 'The new theme has been installed.', 
    6257            'failure' => 'Error installing the new theme.', 
     
    6964                <br /><br /><strong>Any sites or pages that use this theme will be reset to the default theme after deletion!</strong>', 
    7065            'success' => 'The theme has been removed.', 
    71             'failure' => 'Error removing the new theme.', 
     66            'failure' => 'Error removing the theme.', 
    7267            'site_used' => 'There are websites that are using this theme as the default theme!', 
    7368            'page_used' => 'There are web pages that are using a template of this theme!', 
  • trunk/modules/exitecms/views/forms/dashboard.php

    r72 r79  
    55<fieldset> 
    66    <?php if (!empty($news)):?> 
    7         <legend><?php echo \Lang::line('headers.news'); ?></legend> 
     7        <legend><?php echo \Lang::get('headers.news'); ?></legend> 
    88        <div> 
    99            <ul style='margin-left:0px;margin-bottom:0px;'> 
     
    3131<?php if (!empty($exitecms)):?> 
    3232    <fieldset> 
    33         <legend><?php echo \Lang::line('headers.exitecms'); ?></legend> 
     33        <legend><?php echo \Lang::get('headers.exitecms'); ?></legend> 
    3434        <div class="info" style="background: url('/<?php echo Asset::find_file('admin_exitecms.png', 'img/')?>') no-repeat center left;"> 
    3535            <?php echo $exitecms; ?> 
     
    4040<?php if (!empty($users)):?> 
    4141    <fieldset> 
    42         <legend><?php echo \Lang::line('headers.users'); ?></legend> 
     42        <legend><?php echo \Lang::get('headers.users'); ?></legend> 
    4343        <div class="info" style="background: url('/<?php echo Asset::find_file('admin_users.png', 'img/')?>') no-repeat center left;"> 
    4444            <?php $key = 0; foreach($users as $name => $user): ?> 
    4545                <div style="width:50%;float:left;overflow:hidden;"> 
    46                     <?php echo \Lang::line('info.users.'.$key++); ?> 
     46                    <?php echo \Lang::get('info.users.'.$key++); ?> 
    4747                    <span class="highlight"><?php echo $user; ?></span>. 
    4848                </div> 
     
    5454<?php if (!empty($platform)):?> 
    5555    <fieldset> 
    56         <legend><?php echo \Lang::line('headers.platform'); ?></legend> 
     56        <legend><?php echo \Lang::get('headers.platform'); ?></legend> 
    5757        <div class="info" style="background: url('/<?php echo Asset::find_file('admin_platform.png', 'img/')?>') no-repeat center left;"> 
    5858            <?php $key = 0; foreach($platform as $name => $platforminfo): ?> 
    5959                <?php if ($key):?> 
    6060                    <div style="width:50%;float:left;overflow:hidden;"> 
    61                         <?php echo \Lang::line('info.platform.'.$key++); ?> 
     61                        <?php echo \Lang::get('info.platform.'.$key++); ?> 
    6262                        <span class="highlight"><?php echo $platforminfo; ?></span>. 
    6363                    </div> 
    6464                <?php else: ?> 
    6565                    <div style="width:50%;float:left;overflow:hidden;"> 
    66                         <?php echo \Lang::line('info.platform.'.$key++); ?> 
     66                        <?php echo \Lang::get('info.platform.'.$key++); ?> 
    6767                        <span class="highlight"><?php echo $platforminfo; ?></span>. 
    6868                    </div> 
  • trunk/modules/exitecms/views/forms/datetime.php

    r68 r79  
    11<?php 
    22// load the edit view for the datetime form 
    3 echo \View::factory('forms/edit')->set($view_data, null, false); 
     3echo \View::forge('forms/edit')->set($view_data, null, false); 
    44?> 
    55<table style="font-size:10px;"> 
    66    <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> 
    1313    </tr> 
    1414    <tr> 
    1515        <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> 
    1818    </tr> 
    1919    <tr> 
    2020        <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> 
    2323    </tr> 
    2424    <tr> 
    2525        <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> 
    2828    </tr> 
    2929    <tr> 
    3030        <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> 
    3333    </tr> 
    3434    <tr> 
    3535        <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> 
    3838    </tr> 
    3939    <tr> 
    4040        <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> 
    4343    </tr> 
    4444    <tr> 
    4545        <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> 
    5151    </tr> 
    5252    <tr> 
    5353        <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> 
    5656    </tr> 
    5757    <tr> 
    5858        <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> 
    6161    </tr> 
    6262    <tr> 
    6363        <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> 
    6969    </tr> 
    7070    <tr> 
    7171        <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> 
    7474    </tr> 
    7575    <tr> 
    7676        <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> 
    7979    </tr> 
    8080    <tr> 
    8181        <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> 
    8484    </tr> 
    8585    <tr> 
    8686        <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> 
    9292    </tr> 
    9393    <tr> 
    9494        <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> 
    9797    </tr> 
    9898    <tr> 
    9999        <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> 
    102102    </tr> 
    103103    <tr> 
    104104        <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> 
    107107    </tr> 
    108108    <tr> 
    109109        <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> 
    112112    </tr> 
    113113    <tr> 
    114114        <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> 
    120120    </tr> 
    121121    <tr> 
    122122        <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> 
    125125    </tr> 
    126126    <tr> 
    127127        <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> 
    130130    </tr> 
    131131    <tr> 
    132132        <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> 
    135135    </tr> 
    136136    <tr> 
    137137        <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> 
    140140    </tr> 
    141141    <tr> 
    142142        <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> 
    145145    </tr> 
    146146    <tr> 
    147147        <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> 
    150150    </tr> 
    151151    <tr> 
    152152        <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> 
    155155    </tr> 
    156156    <tr> 
    157157        <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> 
    160160    </tr> 
    161161    <tr> 
    162162        <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> 
    165165    </tr> 
    166166    <tr> 
    167167        <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> 
    170170    </tr> 
    171171    <tr> 
    172172        <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> 
    175175    </tr> 
    176176    <tr> 
    177177        <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> 
    180180    </tr> 
    181181    <tr> 
    182182        <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> 
    188188    </tr> 
    189189    <tr> 
    190190        <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> 
    193193    </tr> 
    194194    <tr> 
    195195        <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> 
    198198    </tr> 
    199199    <tr> 
    200200        <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> 
    203203    </tr> 
    204204    <tr> 
    205205        <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> 
    208208    </tr> 
    209209    <tr> 
    210210        <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> 
    216216    </tr> 
    217217    <tr> 
    218218        <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> 
    220220    </tr> 
    221221    <tr> 
    222222        <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> 
    224224    </tr> 
    225225</table> 
  • trunk/modules/exitecms/views/forms/layout.php

    r73 r79  
    2222{ 
    2323    echo '<fieldset>', "\n"; 
    24     echo "\t", '<legend>', \Lang::line('global.information'), '</legend>', "\n"; 
     24    echo "\t", '<legend>', \Lang::get('global.information'), '</legend>', "\n"; 
    2525    echo "\t", '<div class="info">', $info, '</div>', "\n"; 
    2626    echo '</fieldset>', "\n"; 
  • trunk/modules/exitecms/views/forms/layout_selector.php

    r73 r79  
    11<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;"';?>> 
    33        <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> 
    66    </fieldset> 
    77</div> 
  • trunk/modules/exitecms/views/forms/linkset.php

    r68 r79  
    1414 
    1515// load the edit view for the linkset form 
    16 echo \View::factory('forms/edit')->set($view_data, null, false); 
     16echo \View::forge('forms/edit')->set($view_data, null, false); 
    1717?> 
    1818<script type="text/javascript"> 
  • trunk/modules/linksets/classes/controller/multi.php

    r68 r79  
    3434 
    3535        // load the model 
    36         $this->model = \Exitecms\Model_Link::factory(); 
     36        $this->model = \Exitecms\Model_Link::forge(); 
    3737 
    3838        // load the linkset 
  • trunk/modules/linksets/classes/controller/single.php

    r60 r79  
    2929 
    3030        // load the model 
    31         $model = \Exitecms\Model_Link::factory(); 
     31        $model = \Exitecms\Model_Link::forge(); 
    3232 
    3333        // load the linkset 
  • trunk/public/assets/themes

    • Property svn:ignore
      •  

        old new  
        1  
         1exitecms 
  • trunk/public/index.php

    r68 r79  
    4242try 
    4343{ 
    44     $response = Request::factory()->execute()->response(); 
     44    $response = Request::forge()->execute()->response(); 
    4545} 
    4646catch (Request404Exception $e) 
     
    5050        if ($route = Config::get('routes._404_')) 
    5151        { 
    52             $response = Request::factory($route)->execute()->response(); 
     52            $response = Request::forge($route)->execute()->response(); 
    5353        } 
    5454        else 
     
    6161        try 
    6262        { 
    63             $response = new \Response(\View::factory($e->getMessage()), 500); 
     63            $response = new \Response(\View::forge($e->getMessage()), 500); 
    6464        } 
    6565        catch(Exception $e) 
  • trunk/themes/theme_exitecms/assets/css/global.css

    r75 r79  
    694694    padding: 0px 0px; 
    695695    text-align: center; 
    696     font-size: 12px; 
    697     color: #222; 
     696    font-size: 11px; 
     697    color: #666; 
    698698} 
    699699 
  • trunk/themes/theme_exitecms/config/info.php

    r73 r79  
    3333         * short description of this theme 
    3434         */ 
    35         'description' => 'This is the default ExiteCMS v8.0 theme', 
     35        'description' => 'ExiteCMS v8.0 default theme', 
    3636 
    3737        /* 
     
    4343 
    4444        /* 
    45          * theme creation date, format YYYYMMDD 
     45         * theme creation date, something that can be parsed by strtotime() 
    4646         */ 
    4747        '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> 
    44</div> 
Note: See TracChangeset for help on using the changeset viewer.