Changeset 7228 for branches/2.4/prototype/api
- Timestamp:
- 09/17/12 14:30:47 (12 years ago)
- Location:
- branches/2.4
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.4
- Property svn:mergeinfo changed
-
branches/2.4/prototype/api/config.php
r6828 r7228 6 6 { 7 7 static $register; 8 8 9 9 static function module($config , $module = false) 10 10 { … … 64 64 } 65 65 66 if( !isset($_SESSION) )67 66 if( !isset($_SESSION) ) 67 session_start(); 68 68 69 69 } 70 70 71 71 72 -
branches/2.4/prototype/api/controller.php
r6828 r7228 797 797 Controller::$cache = Controller::loadCache(); 798 798 799 require_once(__DIR__.'/esecurity.php'); 800 $s = new ESecurity(); 801 $s->valid(); 799 require_once(__DIR__.'/esecurity.php'); 800 $s = new ESecurity(); 801 $s->valid(); 802 802 803 803 -
branches/2.4/prototype/api/esecurity.php
r6852 r7228 1 1 <?php 2 2 3 require_once(__DIR__.'/config.php'); 3 require_once(__DIR__.'/config.php'); 4 4 5 use prototype\api\Config as Config; 5 use prototype\api\Config as Config; 6 6 7 7 class ESecurity … … 14 14 { 15 15 $sql = 'SELECT config_value FROM phpgw_config WHERE config_app = \'phpgwapi\' AND config_name = \'webserver_url\''; 16 $config = Config::service('PostgreSQL' , 'config'); 16 $config = Config::service('PostgreSQL' , 'config'); 17 17 18 $rs = ''; 19 $rs .= ( isset($config['host']) && $config['host'] ) ? ' host='.$config['host'] : '' ; 20 $rs .= ( isset($config['user']) && $config['user'] ) ? ' user='.$config['user'] : '' ; 21 $rs .= ( isset($config['password']) && $config['password'] ) ? ' password='.$config['password'] : '' ; 22 $rs .= ( isset($config['dbname']) && $config['dbname'] ) ? ' dbname='.$config['dbname'] : '' ; 23 $rs .= ( isset($config['port']) && $config['port'] ) ? ' port='.$config['port'] : '' ; 18 $rs = ''; 19 $rs .= ( isset($config['host']) && $config['host'] ) ? ' host='.$config['host'] : '' ; 20 $rs .= ( isset($config['user']) && $config['user'] ) ? ' user='.$config['user'] : '' ; 21 $rs .= ( isset($config['password']) && $config['password'] ) ? ' password='.$config['password'] : '' ; 22 $rs .= ( isset($config['dbname']) && $config['dbname'] ) ? ' dbname='.$config['dbname'] : '' ; 23 $rs .= ( isset($config['port']) && $config['port'] ) ? ' port='.$config['port'] : '' ; 24 24 25 $con = pg_connect( $rs ); 26 $rs = pg_query( $con, $sql ); 25 $con = pg_connect( $rs ); 26 $rs = pg_query( $con, $sql ); 27 27 $row = pg_fetch_assoc( $rs ); 28 28 29 29 session_destroy(); 30 header( 'Location: '.$row['config_value'].'/login.php' ); 30 header( 'Location: '.$row['config_value'].'/login.php' ); 31 31 die(); 32 32 }
Note: See TracChangeset
for help on using the changeset viewer.