Changeset 573

Show
Ignore:
Timestamp:
04/24/08 11:09:59 (7 months ago)
Author:
bermiferrer
Message:

Fixing method name typo in AkInstaller::promtUserVar, which is now deprecated. Use promptUserVar instead. Closes [152]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/bermi/plugins/admin/installer/admin_installer.php

    r519 r573  
    4747    function modifyRoutes() 
    4848    { 
    49         $preffix = '/'.trim($this->promtUserVar('Admin url preffix',  array('default'=>'/admin/')), "\t /").'/'; 
     49        $preffix = '/'.trim($this->promptUserVar('Admin url preffix',  array('default'=>'/admin/')), "\t /").'/'; 
    5050        $path = AK_CONFIG_DIR.DS.'routes.php'; 
    5151        Ak::file_put_contents($path, str_replace('<?php',"<?php \n\n \$Map->connect('$preffix:controller/:action/:id', array('controller' => 'dashboard', 'action' => 'index', 'module' => 'admin'));",Ak::file_get_contents($path))); 
     
    5959 
    6060        $Installer->root_details = array( 
    61         'email' => $this->promtUserVar('Master account login. Must be a valid email',  array('default'=>'root@example.com')), 
    62         'password' => $this->promtUserVar('Root password.', array('default'=>'admin')), 
     61        'email' => $this->promptUserVar('Master account login. Must be a valid email',  array('default'=>'root@example.com')), 
     62        'password' => $this->promptUserVar('Root password.', array('default'=>'admin')), 
    6363        ); 
    6464 
     
    7070    } 
    7171 
    72     function promtUserVar($message, $options = array()) 
     72    function promptUserVar($message, $options = array()) 
    7373    { 
    7474        $f = fopen("php://stdin","r"); 
     
    8787            echo "\n\nThis setting is not optional."; 
    8888            fclose($f); 
    89             return $this->promtUserVar($message, $options); 
     89            return $this->promptUserVar($message, $options); 
    9090        } 
    9191        fclose($f); 
  • plugins/admin/installer/admin_files/app/installers/admin_plugin_installer.php

    r564 r573  
    3232        if(AK_ENVIRONMENT != 'testing' && empty($this->root_details)){ 
    3333        $this->root_details = array( 
    34                 'login' => $this->promtUserVar('Master account login.',  array('default'=>'admin')), 
    35                 'email' => $this->promtUserVar('Master account email.',  array('default'=>'root@example.com')), 
    36                 'password' => $this->promtUserVar('Root password.', array('default'=>'admin')), 
     34                'login' => $this->promptUserVar('Master account login.',  array('default'=>'admin')), 
     35                'email' => $this->promptUserVar('Master account email.',  array('default'=>'root@example.com')), 
     36                'password' => $this->promptUserVar('Root password.', array('default'=>'admin')), 
    3737            ); 
    3838        } 
  • plugins/admin/installer/admin_installer.php

    r526 r573  
    4747    function modifyRoutes() 
    4848    { 
    49         $preffix = '/'.trim($this->promtUserVar('Admin url preffix',  array('default'=>'/admin/')), "\t /").'/'; 
     49        $preffix = '/'.trim($this->promptUserVar('Admin url preffix',  array('default'=>'/admin/')), "\t /").'/'; 
    5050        $path = AK_CONFIG_DIR.DS.'routes.php'; 
    5151        Ak::file_put_contents($path, str_replace('<?php',"<?php \n\n \$Map->connect('$preffix:controller/:action/:id', array('controller' => 'dashboard', 'action' => 'index', 'module' => 'admin'));",Ak::file_get_contents($path))); 
     
    5959 
    6060        $Installer->root_details = array( 
    61         'email' => $this->promtUserVar('Master account login. Must be a valid email',  array('default'=>'root@example.com')), 
    62         'password' => $this->promtUserVar('Root password.', array('default'=>'admin')), 
     61        'email' => $this->promptUserVar('Master account login. Must be a valid email',  array('default'=>'root@example.com')), 
     62        'password' => $this->promptUserVar('Root password.', array('default'=>'admin')), 
    6363        ); 
    6464 
     
    7070    } 
    7171 
    72     function promtUserVar($message, $options = array()) 
     72    function promptUserVar($message, $options = array()) 
    7373    { 
    7474        $f = fopen("php://stdin","r"); 
     
    8787            echo "\n\nThis setting is not optional."; 
    8888            fclose($f); 
    89             return $this->promtUserVar($message, $options); 
     89            return $this->promptUserVar($message, $options); 
    9090        } 
    9191        fclose($f); 
  • plugins/akismet/test/akismet.php

    r557 r573  
    99 
    1010 
    11 !defined('AK_AKISMET_API_KEY') && define('AK_AKISMET_API_KEY', (!empty($argv[1])?$argv[1]:AkInstaller::promtUserVar('Akismet API key'))); 
    12 !defined('AK_AKISMET_SITE_URL') && define('AK_AKISMET_SITE_URL', (!empty($argv[2])?$argv[2]:AkInstaller::promtUserVar('Akismet site URL'))); 
     11!defined('AK_AKISMET_API_KEY') && define('AK_AKISMET_API_KEY', (!empty($argv[1])?$argv[1]:AkInstaller::promptUserVar('Akismet API key'))); 
     12!defined('AK_AKISMET_SITE_URL') && define('AK_AKISMET_SITE_URL', (!empty($argv[2])?$argv[2]:AkInstaller::promptUserVar('Akismet site URL'))); 
    1313 
    1414require_once(dirname(__FILE__).DS.'..'.DS.'lib'.DS.'akismet_helper.php'); 
  • trunk/lib/AkInstaller.php

    r561 r573  
    619619     * Promts for a variable on console scripts 
    620620     */ 
    621     function promtUserVar($message, $options = array()) 
     621    function promptUserVar($message, $options = array()) 
    622622    { 
    623623        $f = fopen("php://stdin","r"); 
     
    636636            echo "\n\nThis setting is not optional."; 
    637637            fclose($f); 
    638             return $this->promtUserVar($message, $options); 
     638            return $this->promptUserVar($message, $options); 
    639639        } 
    640640        fclose($f); 
    641641        return empty($value) ? $options['default'] : $value; 
     642    } 
     643     
     644    //DEPRECATED 
     645    function promtUserVar($message, $options = array()) 
     646    { 
     647        trigger_error(Ak::t('AkInstaller::promtUserVar is deprecated and will be removed on future versions. Please use AkInstaller::promptUserVar instead.'), E_USER_NOTICE); 
     648        return $this->promptUserVar($message, $options); 
    642649    } 
    643650