Changeset bbc826abcc7088d95be9542a4a950ccba432ef69

Show
Ignore:
Timestamp:
01/21/12 16:18:39 (4 months ago)
Author:
Xemle <xemle@phtagr.org>
Children:
1a41ceaa48ef54a2a73176f8a6e3e1209dee2f52
Parents:
a3a12d50dd0051bb0376b6e413a702bbd9924b34
git-committer:
Xemle <xemle@phtagr.org> / 2012-01-21T16:18:39Z+0100
Message:

Migrage setup procedure to CakePHP 2.0

Files:
17 modified

Legend:

Unmodified
Added
Removed
  • Config/database.php.default

    re449ecc0 rbbc826a  
    11<?php 
    2 /* SVN FILE: $Id$ */ 
    32/** 
    43 * This is core configuration file. 
    54 * 
    6  * Use it to configure core behaviour ofCake. 
     5 * Use it to configure core behaviour of Cake. 
    76 * 
    8  * PHP versions 4 and 5 
     7 * PHP 5 
    98 * 
    109 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) 
    11  * Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org) 
     10 * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) 
    1211 * 
    1312 * Licensed under The MIT License 
    1413 * Redistributions of files must retain the above copyright notice. 
    1514 * 
    16  * @copyright     Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org) 
     15 * @copyright     Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) 
    1716 * @link          http://cakephp.org CakePHP(tm) Project 
    18  * @package       cake 
    19  * @subpackage    cake.app.config 
     17 * @package       app.Config 
    2018 * @since         CakePHP(tm) v 0.2.9 
    21  * @version       $Revision$ 
    22  * @modifiedby    $LastChangedBy$ 
    23  * @lastmodified  $Date$ 
    24  * @license       http://www.opensource.org/licenses/mit-license.php The MIT License 
     19 * @license       MIT License (http://www.opensource.org/licenses/mit-license.php) 
    2520 */ 
    2621/** 
    2722 * In this file you set up your database connection details. 
    2823 * 
    29  * @package       cake 
    30  * @subpackage    cake.config 
     24 * @package       cake.config 
    3125 */ 
    3226/** 
     
    3428 * You can specify multiple configurations for production, development and testing. 
    3529 * 
    36  * driver => The name of a supported driver; valid options are as follows: 
    37  *              mysql           - MySQL 4 & 5, 
    38  *              mysqli          - MySQL 4 & 5 Improved Interface (PHP5 only), 
    39  *              sqlite          - SQLite (PHP5 only), 
    40  *              postgres        - PostgreSQL 7 and higher, 
    41  *              mssql           - Microsoft SQL Server 2000 and higher, 
    42  *              db2                     - IBM DB2, Cloudscape, and Apache Derby (http://php.net/ibm-db2) 
    43  *              oracle          - Oracle 8 and higher 
    44  *              firebird        - Firebird/Interbase 
    45  *              sybase          - Sybase ASE 
    46  *              adodb-[drivername]      - ADOdb interface wrapper (see below), 
    47  *              odbc            - ODBC DBO driver 
     30 * datasource => The name of a supported datasource; valid options are as follows: 
     31 *              Database/Mysql          - MySQL 4 & 5, 
     32 *              Database/Sqlite         - SQLite (PHP5 only), 
     33 *              Database/Postgres       - PostgreSQL 7 and higher, 
     34 *              Database/Sqlserver      - Microsoft SQL Server 2005 and higher 
    4835 * 
    49  * You can add custom database drivers (or override existing drivers) by adding the 
    50  * appropriate file to app/models/datasources/dbo.  Drivers should be named 'dbo_x.php', 
    51  * where 'x' is the name of the database. 
     36 * You can add custom database datasources (or override existing datasources) by adding the 
     37 * appropriate file to app/Model/Datasource/Database.  Datasources should be named 'MyDatasource.php', 
     38 * 
    5239 * 
    5340 * persistent => true / false 
    5441 * Determines whether or not the database should use a persistent connection 
    5542 * 
    56  * connect => 
    57  * ADOdb set the connect to one of these 
    58  *      (http://phplens.com/adodb/supported.databases.html) and 
    59  *      append it '|p' for persistent connection. (mssql|p for example, or just mssql for not persistent) 
    60  * For all other databases, this setting is deprecated. 
    61  * 
    6243 * host => 
    63  * the host you connect to the database.  To add a socket or port number, use 'port' => # 
     44 * the host you connect to the database. To add a socket or port number, use 'port' => # 
    6445 * 
    6546 * prefix => 
     
    6849 * 
    6950 * schema => 
    70  * For Postgres and DB2, specifies which schema you would like to use the tables in. Postgres defaults to 
    71  * 'public', DB2 defaults to empty. 
     51 * For Postgres specifies which schema you would like to use the tables in. Postgres defaults to 'public'. 
    7252 * 
    7353 * encoding => 
    74  * For MySQL, MySQLi, Postgres and DB2, specifies the character encoding to use when connecting to the 
    75  * database.  Uses database default. 
     54 * For MySQL, Postgres specifies the character encoding to use when connecting to the 
     55 * database. Uses database default not specified. 
    7656 * 
     57 * unix_socket => 
     58 * For MySQL to connect via socket specify the `unix_socket` parameter instead of `host` and `port` 
    7759 */ 
    7860class DATABASE_CONFIG { 
    7961 
    80         var $default = array( 
    81                 'driver' => 'mysql', 
     62        public $default = array( 
     63                'datasource' => 'Database/Mysql', 
    8264                'persistent' => false, 
    8365                'host' => 'localhost', 
     
    8668                'database' => 'database_name', 
    8769                'prefix' => '', 
     70                'encoding' => 'utf8', 
    8871        ); 
    8972 
    90         var $test = array( 
    91                 'driver' => 'mysql', 
     73        public $test = array( 
     74                'datasource' => 'Database/Mysql', 
    9275                'persistent' => false, 
    9376                'host' => 'localhost', 
     
    9679                'database' => 'test_database_name', 
    9780                'prefix' => '', 
     81                'encoding' => 'utf8', 
    9882        ); 
    9983} 
    100 ?> 
  • Controller/Component/UpgradeSchemaComponent.php

    r3605ef4 rbbc826a  
    6565 
    6666  function isConnected() { 
    67     if (!empty($this->db) && $this->db->connected) { 
     67    if (!empty($this->db) && $this->db->enabled()) { 
    6868      return true; 
    6969    } else { 
  • Controller/SetupController.php

    r3605ef4 rbbc826a  
    2222 */ 
    2323 
     24App::uses('File', 'Utility'); 
    2425 
    2526class SetupController extends AppController { 
     
    9192      } 
    9293 
    93       if (!App::import('model', $model)) { 
     94      if (!App::import('Model', $model)) { 
    9495        Logger::err("Could not load model '$model'"); 
    9596        $success = false; 
     
    222223 
    223224    Logger::debug("Check for admin account"); 
    224     if (!$this->__loadModel('User')) { 
     225    if (!$this->__loadModel(array('User', 'Option'))) { 
    225226      $this->checks['hasSysOp'] = false; 
    226227      return false; 
     
    397398      $output = "<?php  
    398399/**  
    399  * Automatic generated database configuration file by phTagr 
     400 * Automatic generated database configuration file by phTagr setup 
    400401 * 
    401  * Date: ".date("Y-m-d H:i:s")." 
     402 * Creation date: ".date("Y-m-d H:i:s")." 
    402403 */ 
    403 class DATABASE_CONFIG 
    404 { 
    405   var \$default = array('driver' => 'mysql', 
    406                 'connect' => 'mysql_connect', 
    407                 'persistent' => true, 
    408                 'host' => '{$this->data['db']['host']}', 
    409                 'login' => '{$this->data['db']['login']}', 
    410                 'password' => '{$this->data['db']['password']}', 
    411                 'database' => '{$this->data['db']['database']}', 
    412                 'encoding' => 'utf8', 
    413                 'prefix' => '{$this->data['db']['prefix']}'); 
     404class DATABASE_CONFIG { 
     405               
     406  public \$default = array( 
     407    'datasource' => 'Database/Mysql', 
     408    'persistent' => true, 
     409    'host' => '{$this->data['db']['host']}', 
     410    'login' => '{$this->data['db']['login']}', 
     411    'password' => '{$this->data['db']['password']}', 
     412    'database' => '{$this->data['db']['database']}', 
     413    'prefix' => '{$this->data['db']['prefix']}', 
     414    'encoding' => 'utf8' 
     415  ); 
    414416} 
    415 ?>"; 
     417"; 
    416418      $file =& new File($this->dbConfig, true, 644); 
    417419      if ($file->write($output)) { 
     
    428430    } else { 
    429431      if ($this->Session->check('configData')) { 
    430         $this->data = $this->Session->read('configData'); 
     432        $this->request->data = $this->Session->read('configData'); 
    431433      } else { 
    432         $this->data['db']['host'] = 'localhost'; 
    433         $this->data['db']['database'] = 'phtagr'; 
    434         $this->data['db']['login'] = 'phtagr'; 
     434        $this->request->data('db.host', 'localhost'); 
     435        $this->request->data('db.database', 'phtagr'); 
     436        $this->request->data('db.login', 'phtagr'); 
    435437      } 
    436438    } 
     
    501503    $this->__checkSession(); 
    502504 
    503     if (!empty($this->data)) { 
    504       $this->data['User']['role'] = ROLE_ADMIN; 
    505       $this->data['User']['quota'] = '100 MB'; 
    506       $this->User->create($this->data); 
    507       if (empty($this->data['User']['confirm'])) { 
     505    if (!empty($this->request->data)) { 
     506      $this->request->data['User']['role'] = ROLE_ADMIN; 
     507      $this->request->data['User']['quota'] = '100 MB'; 
     508      $this->User->create($this->request->data); 
     509      if (empty($this->request->data['User']['confirm'])) { 
    508510        $this->User->invalidate('confirm', 'Password confirmation is missing'); 
    509511      } 
     
    512514        $this->Session->write('User.id', $userId); 
    513515        $this->Session->write('User.role', ROLE_ADMIN); 
    514         $this->Session->write('User.username', $this->data['User']['username']); 
    515         Logger::info("Admin account '{$this->data['User']['username']}' was created"); 
     516        $this->Session->write('User.username', $this->request->data['User']['username']); 
     517        Logger::info("Admin account '{$this->request->data['User']['username']}' was created"); 
    516518        $this->Session->setFlash(__("Admin account was successfully created", true)); 
    517519        $this->redirect('system'); 
    518520      } else { 
    519         Logger::err("Admin account '{$this->data['User']['username']}' could not be created"); 
     521        Logger::err("Admin account '{$this->request->data['User']['username']}' could not be created"); 
    520522        $this->Session->setFlash(__("Could not create admin account. Please retry", true)); 
    521523      } 
    522     } elseif (!isset($this->data['User']['username'])) { 
    523       $this->data['User']['username'] = 'admin'; 
     524    } elseif (!isset($this->request->data['User']['username'])) { 
     525      $this->request->data['User']['username'] = 'admin'; 
    524526    } 
    525527    Logger::info("Request account data for the admin"); 
     
    572574      $this->redirect('/'); 
    573575    } 
     576    if (!isset($this->Option->User)) { 
     577      Logger::warn("Could not associate User model to Option model"); 
     578    } 
    574579 
    575580    Logger::info("Check for required external programs"); 
    576581    $missing = array(); 
    577     if (!empty($this->data)) { 
     582    if (!empty($this->request->data)) { 
    578583      foreach ($this->commands as $command) { 
    579         $bin = Set::extract($this->data, 'bin.'.$command); 
     584        $bin = Set::extract($this->request->data, 'bin.'.$command); 
    580585        $file = new File($bin); 
    581586        if ($file->executable()) { 
     
    591596      foreach ($this->commands as $command) { 
    592597        $bin = $this->__findCommand($command); 
    593         $this->data['bin'][$command] = $bin; 
     598        $this->request->data['bin'][$command] = $bin; 
    594599        if (!$bin) { 
    595600          $missing[] = $command; 
     
    597602      } 
    598603    } 
    599     if (isset($this->data['bin']['ffmpeg'])) { 
    600       $this->set('mp3Support', $this->__checkMp3Support($this->data['bin']['ffmpeg'])); 
     604    if (isset($this->request->data['bin']['ffmpeg'])) { 
     605      $this->set('mp3Support', $this->__checkMp3Support($this->request->data['bin']['ffmpeg'])); 
    601606    } 
    602607    $this->set('missing', $missing); 
     
    635640      return true; 
    636641    } 
     642    CakePlugin::load('Migrations'); 
    637643    if (!App::import('Lib', 'Migrations.MigrationVersion')) { 
    638644      Logger::err("Could not import Migrations plugin"); 
  • Model/AppModel.php

    r3605ef4 rbbc826a  
    2121 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA. 
    2222 */ 
     23 
     24App::uses('Model', 'Model'); 
    2325 
    2426class AppModel extends Model 
  • Model/Option.php

    ra3a12d5 rbbc826a  
    3232 
    3333  function addDefaults($options) { 
    34     $ownOptions = Set::extract($options, '{n}.name'); 
     34    $ownOptions = Set::extract('/name', $options); 
    3535    $this->unbindModel(array('belongsTo' => array('User'))); 
    3636    $defaultOptions = $this->findAllByUserId(0); 
     
    3939      if (strlen($name) > 2 && substr($name, -2) == '[]') { 
    4040        $options[] = $default[$this->name]; 
    41       } else { 
    42         $exists = in_array($name, $ownOptions); 
    43         if (!$exists) { 
    44           $options[] = $default[$this->name]; 
    45         } 
     41      } else if ($ownOptions && in_array($name, $ownOptions)) { 
     42        $options[] = $default[$this->name]; 
    4643      } 
    4744    } 
     
    179176      $userId = $this->data['User']['id']; 
    180177    } 
    181     $data = $this->find(array('AND' => array('user_id' => $userId, 'name' => $name))); 
     178    $data = $this->find('first', array('conditions' => array('Option.user_id' => $userId, 'Option.name' => $name))); 
    182179    if ($data) { 
    183180      $data['Option']['value'] = $value; 
  • View/Setup/admin_upgrade.ctp

    r3605ef4 rbbc826a  
    1 <h1><?php __("Database upgrade"); ?></h1> 
     1<h1><?php echo __("Database upgrade"); ?></h1> 
    22 
    33<?php echo $this->Session->flash(); ?> 
    44 
    55<div class="info"> 
    6 <?php __("The database schema requires an upgrade. Do you want to perform the upgrade?"); ?> 
     6<?php echo __("The database schema requires an upgrade. Do you want to perform the upgrade?"); ?> 
    77</div> 
    88 
  • View/Setup/admin_uptodate.ctp

    ra3a12d5 rbbc826a  
    1 <h1><?php __("Database upgrade"); ?></h1> 
     1<h1><?php echo __("Database upgrade"); ?></h1> 
    22 
    3 <?php echo $session->flash(); ?> 
     3<?php echo $this->Session->flash(); ?> 
    44 
    55<div class="info"> 
    6 <?php __("Your database is up-to-date."); ?> 
     6<?php echo __("Your database is up-to-date."); ?> 
    77</div> 
    88 
    9 <?php echo $html->link(__("Continue", true), '/'); 
     9<?php echo $this->Html->link(__("Continue", true), '/'); 
  • View/Setup/config.ctp

    ra3a12d5 rbbc826a  
    1 <h1><?php __("Database connection"); ?></h1> 
     1<h1><?php echo __("Database connection"); ?></h1> 
    22 
    3 <?php echo $session->flash(); ?> 
     3<?php echo $this->Session->flash(); ?> 
    44 
    5 <p><?php __("This step creates the configuration for the database connection. Please add your database connection settings here."); ?></p> 
     5<p><?php echo __("This step creates the configuration for the database connection. Please add your database connection settings here."); ?></p> 
    66 
    7 <?php echo $form->create(null, array('action' => 'config')); ?> 
     7<?php echo $this->Form->create(null, array('action' => 'config')); ?> 
    88 
    9 <fieldset><legend><?php __("Database"); ?></legend> 
     9<fieldset><legend><?php echo __("Database"); ?></legend> 
    1010<?php  
    11   echo $form->input('db.host', array('label' => __('Host', true))); 
    12   echo $form->input('db.database', array('label' => __('Database', true))); 
    13   echo $form->input('db.login', array('label' => __('Username', true))); 
    14   echo $form->input('db.password', array('label' => __('Password', true), 'type' => 'password')); 
    15   echo $form->input('db.prefix', array('label' => __('Prefix', true))); 
     11  echo $this->Form->input('db.host', array('label' => __('Host', true))); 
     12  echo $this->Form->input('db.database', array('label' => __('Database', true))); 
     13  echo $this->Form->input('db.login', array('label' => __('Username', true))); 
     14  echo $this->Form->input('db.password', array('label' => __('Password', true), 'type' => 'password')); 
     15  echo $this->Form->input('db.prefix', array('label' => __('Prefix', true))); 
    1616?> 
    1717</fieldset> 
    18 <?php echo $form->submit(__('Continue', true)); ?> 
     18<?php echo $this->Form->submit(__('Continue', true)); ?> 
    1919</form> 
    2020<?php 
  • View/Setup/configro.ctp

    ra3a12d5 rbbc826a  
    1 <h1><?php __("Database connection"); ?></h1> 
     1<h1><?php echo __("Database connection"); ?></h1> 
    22 
    3 <?php echo $session->flash(); ?> 
     3<?php echo $this->Session->flash(); ?> 
    44 
    55<div class="warning"> 
    6 <?php __("The configuration file for the database connection could not be written. Please create a database configuration file by your own!"); ?> 
     6<?php echo __("The configuration file for the database connection could not be written. Please create a database configuration file by your own!"); ?> 
    77</div> 
    88 
    9 <p><?php __("Below a sample configuration file is shown. Please adapt your database credentials and continue."); ?></p> 
     9<p><?php echo __("Below a sample configuration file is shown. Please adapt your database credentials and continue."); ?></p> 
    1010 
    1111<p><pre><?php echo $dbConfig; ?></pre></p> 
     
    2828?&gt;</code></pre></p> 
    2929 
    30 <?php echo $html->link(__('Continue', true), 'configro', array('class' => 'button')); ?> 
     30<?php echo $this->Html->link(__('Continue', true), 'configro', array('class' => 'button')); ?> 
    3131 
    3232<?php 
  • View/Setup/database.ctp

    ra3a12d5 rbbc826a  
    1 <h1><?php __("Initialize Database"); ?></h1> 
     1<h1><?php echo __("Initialize Database"); ?></h1> 
    22 
    3 <div class="info"><?php __("All tables are now initialized"); ?></div> 
     3<div class="info"><?php echo __("All tables are now initialized"); ?></div> 
  • View/Setup/finish.ctp

    ra3a12d5 rbbc826a  
    1 <h1><?php __("Setup Complete"); ?></h1> 
     1<h1><?php echo __("Setup Complete"); ?></h1> 
    22 
    33<div class="info"> 
    4 <?php __("Congratulations! Your configuration of phTagr is completed. Have fun using phTagr!"); ?> 
     4<?php echo __("Congratulations! Your configuration of phTagr is completed. Have fun using phTagr!"); ?> 
    55</div> 
    66 
    7 <p><?php printf(__("Click %s to go to home or %s your first media.", true), $html->link(__('here', true), '/'), $html->link(__('upload', true), '/browser/quickupload')); ?></p> 
     7<p><?php echo __("Click %s to go to home or %s your first media.", $this->Html->link(__('here'), '/'), $this->Html->link(__('upload'), '/browser/quickupload')); ?></p> 
  • View/Setup/index.ctp

    ra3a12d5 rbbc826a  
    1 <h1><?php __("Welcome"); ?></h1> 
     1<h1><?php echo __("Welcome"); ?></h1> 
    22 
    3 <?php echo $session->flash(); ?> 
     3<?php echo $this->Session->flash(); ?> 
    44 
    5 <p><?php __("Welcome to the installation procedure of phTagr. Following steps are required to install it:"); ?></p> 
     5<p><?php echo __("Welcome to the installation procedure of phTagr. Following steps are required to install it:"); ?></p> 
    66 
    77<ul> 
    8   <li><?php __("Check for required paths"); ?></li> 
    9   <li><?php __("Configuration of database connection"); ?></li> 
    10   <li><?php __("Initialize required tables"); ?></li> 
    11   <li><?php __("Create administration account"); ?></li> 
    12   <li><?php __("Check required external programs"); ?></li> 
     8  <li><?php echo __("Check for required paths"); ?></li> 
     9  <li><?php echo __("Configuration of database connection"); ?></li> 
     10  <li><?php echo __("Initialize required tables"); ?></li> 
     11  <li><?php echo __("Create administration account"); ?></li> 
     12  <li><?php echo __("Check required external programs"); ?></li> 
    1313</ul> 
    1414 
    15 <p><?php __("Note: Cookies are required to install and run phTagr."); ?></p> 
     15<p><?php echo __("Note: Cookies are required to install and run phTagr."); ?></p> 
    1616 
    17 <p><?php printf(__("This setup will step through the required steps. Please click %s to start the installation.", true), $html->link(__('continue', true), 'path')); ?></p> 
     17<p><?php echo __("This setup will step through the required steps. Please click %s to start the installation.", $this->Html->link(__('continue'), 'path')); ?></p> 
  • View/Setup/path.ctp

    ra3a12d5 rbbc826a  
    1 <h1><?php __("Path settings"); ?></h1> 
     1<h1><?php echo __("Path settings"); ?></h1> 
    22 
    3 <?php echo $session->flash(); ?> 
     3<?php echo $this->Session->flash(); ?> 
    44 
    55<?php if (count($missing)): ?> 
    66<div class="error"> 
    7 <?php __("Following paths are missing. Please create these paths!"); ?> 
     7<?php echo __("Following paths are missing. Please create these paths!"); ?> 
    88</div> 
    99 
     
    1717<?php if (count($readonly)): ?> 
    1818<div class="error"> 
    19 <?php __("Following paths are not writeable. Please change the permissions!"); ?> 
     19<?php echo __("Following paths are not writeable. Please change the permissions!"); ?> 
    2020</div> 
    2121 
     
    2727<?php endif; ?> 
    2828 
    29 <?php echo $html->link(__('Retry', true), 'path', array('class' => 'button')); ?> 
     29<?php echo $this->Html->link(__('Retry', true), 'path', array('class' => 'button')); ?> 
    3030<?php 
    3131  $script = <<<'JS' 
  • View/Setup/salt.ctp

    ra3a12d5 rbbc826a  
    1 <h1><?php __("Security settings"); ?></h1> 
     1<h1><?php echo __("Security settings"); ?></h1> 
    22 
    3 <?php echo $session->flash(); ?> 
     3<?php echo $this->Session->flash(); ?> 
    44 
    5 <p><?php printf(__("An error occured while setting the security salt. Please have look to the log files and click on %s", true), $html->link(__('continue', true), 'salt')); ?></p> 
     5<p><?php echo __("An error occured while setting the security salt. Please have look to the log files and click on %s", $this->Html->link(__('continue'), 'salt')); ?></p> 
  • View/Setup/saltro.ctp

    ra3a12d5 rbbc826a  
    1 <h1><?php __("Security settings"); ?></h1> 
     1<h1><?php echo __("Security settings"); ?></h1> 
    22 
    3 <?php echo $session->flash(); ?> 
     3<?php echo $this->Session->flash(); ?> 
    44 
    5 <p><?php __("phTagr could not set the security salt because the a configuration file file is write protected.  Please change the configuration manually"); ?></p> 
     5<p><?php echo __("phTagr could not set the security salt because the a configuration file file is write protected.  Please change the configuration manually"); ?></p> 
    66 
    7 <p><?php printf(__("Change the <b>Security.salt</b> setting in the core configuration file <code>%s</code> (line %d) to a random string with alpha numeric values. You can change the setting to the provided value below. After changing, click on %s.", true), h($file), $line, $html->link(__('continue', true), 'saltro')); ?><p> 
     7<p><?php echo __("Change the <b>Security.salt</b> setting in the core configuration file <code>%s</code> (line %d) to a random string with alpha numeric values. You can change the setting to the provided value below. After changing, click on %s.", h($file), $line, $this->Html->link(__('continue'), 'saltro')); ?><p> 
    88 
    9 <p><?php __("Current security salt value"); ?></p> 
     9<p><?php echo __("Current security salt value"); ?></p> 
    1010<pre>Configure::write('Security.salt', '<?php echo h($oldSalt); ?>');</pre> 
    1111 
    12 <p><?php __("New security salt value"); ?></p> 
     12<p><?php echo __("New security salt value"); ?></p> 
    1313<pre>Configure::write('Security.salt', '<?php echo h($salt); ?>');</pre> 
    1414 
    1515<p></p> 
    16 <?php echo $html->link(__('Continue', true), 'saltro', array('class' => 'button')); ?> 
     16<?php echo $this->Html->link(__('Continue', true), 'saltro', array('class' => 'button')); ?> 
    1717<?php 
    1818  $script = <<<'JS' 
  • View/Setup/system.ctp

    ra3a12d5 rbbc826a  
    1 <h1><?php __("External Programs"); ?></h1> 
     1<h1><?php echo __("External Programs"); ?></h1> 
    22 
    3 <?php echo $session->flash(); ?> 
     3<?php echo $this->Session->flash(); ?> 
    44 
    5 <p><?php __("Congratulation! phTagr just runs fine now!"); ?></p> 
     5<p><?php echo __("Congratulation! phTagr just runs fine now!"); ?></p> 
    66 
    7 <p><?php __("phTagr can use <u>optional</u> external programs to enlarge the functionality. exiftool is used to export the meta data to images like tags, categories or (geo) locations. ffmpeg supports other video file formats like AVI, MPEG, or MOV. And convert supports better thumbnail creation for bigger photos."); ?></p> 
     7<p><?php echo __("phTagr can use <u>optional</u> external programs to enlarge the functionality. exiftool is used to export the meta data to images like tags, categories or (geo) locations. ffmpeg supports other video file formats like AVI, MPEG, or MOV. And convert supports better thumbnail creation for bigger photos."); ?></p> 
    88 
    9 <p><?php __("You can set the file path of these exteranl programs here or set them later in the system preferences."); ?></p> 
     9<p><?php echo __("You can set the file path of these exteranl programs here or set them later in the system preferences."); ?></p> 
    1010 
    11 <?php echo $html->link(__("Skip these settings", true), array("action" => "finish"), array('class' => 'button')); ?> 
     11<?php echo $this->Html->link(__("Skip these settings", true), array("action" => "finish"), array('class' => 'button')); ?> 
    1212 
    1313<?php if (count($missing)): ?> 
    1414<div class="info"> 
    15 <?php printf(__("Following programs could not be found: %s.", true), implode(', ', $missing)); ?>  
     15<?php echo __("Following programs could not be found: %s.", implode(', ', $missing)); ?>  
    1616</div> 
    1717<?php endif; ?> 
    1818<?php if (isset($mp3Support) && !$mp3Support): ?> 
    1919<div class="warning"> 
    20 <?php __("FFMPEG does not support the MP3 audio format. Sound will be disabled for videos!"); ?> 
     20<?php echo __("FFMPEG does not support the MP3 audio format. Sound will be disabled for videos!"); ?> 
    2121</div> 
    2222<?php endif; ?> 
    2323 
    24 <?php echo $form->create(null, array('action' => 'system')); ?> 
     24<?php echo $this->Form->create(null, array('action' => 'system')); ?> 
    2525<fieldset> 
    2626<?php  
    27   echo $form->input('bin.exiftool', array('label' => sprintf(__("Path to %s", true), "exiftool"))); 
    28   echo $form->input('bin.convert', array('label' => sprintf(__("Path to %s", true), "convert"))); 
    29   echo $form->input('bin.ffmpeg', array('label' => sprintf(__("Path to %s", true), "ffmpeg"))); 
    30   echo $form->input('bin.flvtool2', array('label' => sprintf(__("Path to %s", true), "flvtool2"))); 
     27  echo $this->Form->input('bin.exiftool', array('label' => __("Path to %s", "exiftool"))); 
     28  echo $this->Form->input('bin.convert', array('label' => __("Path to %s", "convert"))); 
     29  echo $this->Form->input('bin.ffmpeg', array('label' => __("Path to %s", "ffmpeg"))); 
     30  echo $this->Form->input('bin.flvtool2', array('label' => __("Path to %s", "flvtool2"))); 
    3131?> 
    3232</fieldset> 
    33 <?php echo $form->end(__('Save', true)); ?> 
     33<?php echo $this->Form->end(__('Save', true)); ?> 
    3434<?php 
    3535  $script = <<<'JS' 
  • View/Setup/user.ctp

    ra3a12d5 rbbc826a  
    1 <h1><?php __("Create admin account"); ?></h1> 
     1<h1><?php echo __("Create admin account"); ?></h1> 
    22 
    3 <?php echo $session->flash(); ?> 
     3<?php echo $this->Session->flash(); ?> 
    44 
    5 <?php echo $form->create(null, array('action' => 'user')); ?> 
     5<?php echo $this->Form->create(null, array('action' => 'user')); ?> 
    66 
    77<fieldset> 
    88<?php  
    9   echo $form->input('User.username', array('label' => __("Username", true)));  
    10   echo $form->input('User.password', array('label' => __("Password", true))); 
    11   echo $form->input('User.confirm', array('label' => __("Confirm", true), 'type' => 'password')); 
    12   echo $form->input('User.email', array('label' => __("Email", true))); 
     9  echo $this->Form->input('User.username', array('label' => __("Username", true)));  
     10  echo $this->Form->input('User.password', array('label' => __("Password", true))); 
     11  echo $this->Form->input('User.confirm', array('label' => __("Confirm", true), 'type' => 'password')); 
     12  echo $this->Form->input('User.email', array('label' => __("Email", true))); 
    1313?> 
    1414</fieldset> 
    15 <?php echo $form->end(__('Create', true)); ?> 
     15<?php echo $this->Form->end(__('Create', true)); ?> 
    1616<?php 
    1717  $script = <<<'JS'