Changeset 7228 for branches/2.4/prototype/api/esecurity.php
- Timestamp:
- 09/17/12 14:30:47 (12 years ago)
- Location:
- branches/2.4
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.4
- Property svn:mergeinfo changed
-
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.