Changeset 370
- Timestamp:
- 07/28/08 16:42:45 (16 years ago)
- Location:
- trunk/phpgwapi/inc
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/phpgwapi/inc/adodb/drivers/adodb-postgres64.inc.php
r34 r370 679 679 } 680 680 if ($this->_connectionID === false) return false; 681 $this->_nestedSQL = true; 682 683 /* jakjr: I really do not know why this is executed. 681 684 $this->Execute("set datestyle='ISO'"); 682 685 … … 686 689 $this->_nestedSQL = true; 687 690 } 691 */ 688 692 return true; 689 693 } -
trunk/phpgwapi/inc/class.applications.inc.php
r2 r370 275 275 function read_installed_apps() 276 276 { 277 $this->db->query('select * from phpgw_applications where app_enabled != 0 order by app_order asc',__LINE__,__FILE__); 278 if($this->db->num_rows()) 279 { 280 while ($this->db->next_record()) 281 { 282 $title = $app_name = $this->db->f('app_name'); 283 284 if (@is_array($GLOBALS['phpgw_info']['user']['preferences']) && 285 ($t = lang($app_name)) != $app_name.'*') 277 //jakjr: so vai ao banco, caso o array de apps esteja vazio. 278 if (empty($GLOBALS['phpgw_info']['apps'])) 279 { 280 $this->db->query('select * from phpgw_applications where app_enabled != 0 order by app_order asc',__LINE__,__FILE__); 281 if($this->db->num_rows()) 282 { 283 while ($this->db->next_record()) 286 284 { 287 $title = $t; 285 $title = $app_name = $this->db->f('app_name'); 286 287 if (@is_array($GLOBALS['phpgw_info']['user']['preferences']) && 288 ($t = lang($app_name)) != $app_name.'*') 289 { 290 $title = $t; 291 } 292 $GLOBALS['phpgw_info']['apps'][$this->db->f('app_name')] = Array( 293 'title' => $title, 294 'name' => $this->db->f('app_name'), 295 'enabled' => True, 296 'status' => $this->db->f('app_enabled'), 297 'id' => (int)$this->db->f('app_id'), 298 'order' => (int)$this->db->f('app_order'), 299 'version' => $this->db->f('app_version') 300 ); 288 301 } 289 $GLOBALS['phpgw_info']['apps'][$this->db->f('app_name')] = Array(290 'title' => $title,291 'name' => $this->db->f('app_name'),292 'enabled' => True,293 'status' => $this->db->f('app_enabled'),294 'id' => (int)$this->db->f('app_id'),295 'order' => (int)$this->db->f('app_order'),296 'version' => $this->db->f('app_version')297 );298 302 } 299 303 } -
trunk/phpgwapi/inc/class.config.inc.php
r2 r370 74 74 { 75 75 $this->db->lock(array('phpgw_config','phpgw_app_sessions')); 76 /*jakjr: ExpressoLivre does not use this. 76 77 if($this->appname == 'phpgwapi') 77 78 { 78 79 $this->db->query("delete from phpgw_app_sessions where sessionid = '0' and loginid = '0' and app = '".$this->appname."' and location = 'config'",__LINE__,__FILE__); 79 } 80 }*/ 80 81 foreach($this->config_data as $name => $value) 81 82 { -
trunk/phpgwapi/inc/class.errorlog.inc.php
r189 r370 104 104 function commit() 105 105 { 106 // jakjr: where I disable the log event. 107 return true; 106 108 $db = $GLOBALS['phpgw']->db; 107 109 // $db->lock('phpgw_log'); -
trunk/phpgwapi/inc/class.hooks.inc.php
r2 r370 41 41 $this->db = $db ? $db : $GLOBALS['phpgw']->db; // this is to allow setup to set the db 42 42 43 $this->db->query("SELECT hook_appname, hook_location, hook_filename FROM phpgw_hooks",__LINE__,__FILE__); 44 while( $this->db->next_record() ) 45 { 46 $this->found_hooks[$this->db->f('hook_appname')][$this->db->f('hook_location')] = $this->db->f('hook_filename'); 47 } 48 //echo '<pre>'; 49 //print_r($this->found_hooks); 50 //echo '</pre>'; 43 //jakjr: Go search in DB, only if the array is empty. 44 if (empty($this->found_hooks)) 45 { 46 $this->db->query("SELECT hook_appname, hook_location, hook_filename FROM phpgw_hooks",__LINE__,__FILE__); 47 while( $this->db->next_record() ) 48 { 49 $this->found_hooks[$this->db->f('hook_appname')][$this->db->f('hook_location')] = $this->db->f('hook_filename'); 50 } 51 //echo '<pre>'; 52 //print_r($this->found_hooks); 53 //echo '</pre>'; 54 } 51 55 } 52 56 -
trunk/phpgwapi/inc/class.sessions.inc.php
r2 r370 186 186 $save_rep = True; 187 187 } 188 189 // jakjr: ? usando o hardcode, para evitar sempre 2 chamadas ao banco. 190 /* 188 191 if ($save_rep) 189 192 { … … 199 202 $config->save_repository(); 200 203 unset($config); 201 } 204 }*/ 202 205 } 203 206 … … 493 496 494 497 $this->clean_sessions(); 495 sessions_::split_login_domain($login,$this->account_lid,$this->account_domain); 498 //sessions_::split_login_domain($login,$this->account_lid,$this->account_domain); 499 // jakjr: allow uid with (@); 500 $this->account_lid = $login; 501 $this->account_domain = 'default'; 496 502 497 503 $now = time(); … … 514 520 } 515 521 522 /* jakjr: Expresso does not use auto-create account. 516 523 if (!$this->account_id && $GLOBALS['phpgw_info']['server']['auto_create_acct'] == True) 517 524 { 518 525 $this->account_id = $GLOBALS['phpgw']->accounts->auto_add($this->account_lid, $passwd); 519 526 } 527 */ 520 528 521 529 $GLOBALS['phpgw_info']['user']['account_id'] = $this->account_id; … … 618 626 . $sessionid . "'",__LINE__,__FILE__); 619 627 } 628 /* jakjr: Clean phpgw_access_log with a crontab event. 620 629 if ($GLOBALS['phpgw_info']['server']['max_access_log_age']) 621 630 { … … 623 632 624 633 $GLOBALS['phpgw']->db->query("DELETE FROM phpgw_access_log WHERE li < $max_age"); 625 } 634 }*/ 626 635 } 627 636 … … 635 644 function login_blocked($login,$ip) 636 645 { 646 /*jakjr: Disable this protection. When block an proxy server ip, all the sub-network will be blocking.*/ 647 return false; 637 648 $blocked = False; 638 649 $block_time = time() - $GLOBALS['phpgw_info']['server']['block_time'] * 60; -
trunk/phpgwapi/inc/functions.inc.php
r266 r370 162 162 } 163 163 $GLOBALS['phpgw']->db->Halt_On_Error = 'no'; 164 /* jakjr: ExpressoLivre: We do not count the config table. */ 165 if (! 164 166 $GLOBALS['phpgw']->db->connect( 165 167 $GLOBALS['phpgw_info']['server']['db_name'], … … 169 171 $GLOBALS['phpgw_info']['server']['db_pass'], 170 172 $GLOBALS['phpgw_info']['server']['db_type'] 171 ) ;172 @$GLOBALS['phpgw']->db->query("SELECT COUNT(config_name) FROM phpgw_config");173 if(!@$GLOBALS['phpgw']->db->next_record())174 { 175 $setup_dir = str_replace($_SERVER['PHP_SELF'],'index.php','setup/');173 ) ) 174 //@$GLOBALS['phpgw']->db->query("SELECT COUNT(config_name) FROM phpgw_config"); 175 //if(!@$GLOBALS['phpgw']->db->next_record()) 176 { 177 176 178 /* BEGIN - CELEPAR - jakjr - 05/06/2006 */ 179 /* $setup_dir = str_replace($_SERVER['PHP_SELF'],'index.php','setup/'); */ 177 180 /*echo '<center><b>Fatal Error:</b> It appears that you have not created the database tables for ' 178 181 .'eGroupWare. Click <a href="' . $setup_dir . '">here</a> to run setup.</center>';*/ … … 185 188 /* Fill phpgw_info["server"] array */ 186 189 // An Attempt to speed things up using cache premise 190 /* jakjr: ExpressoLivre does not use cache. */ 191 /* 187 192 $GLOBALS['phpgw']->db->query("select config_value from phpgw_config WHERE config_app='phpgwapi' and config_name='cache_phpgw_info'",__LINE__,__FILE__); 188 193 if ($GLOBALS['phpgw']->db->num_rows()) … … 190 195 $GLOBALS['phpgw']->db->next_record(); 191 196 $GLOBALS['phpgw_info']['server']['cache_phpgw_info'] = stripslashes($GLOBALS['phpgw']->db->f('config_value')); 192 } 193 197 }*/ 198 199 /* jakjr: ExpressoLivre does not use cache. */ 200 /* 194 201 $cache_query = "select content from phpgw_app_sessions where" 195 202 ." sessionid = '0' and loginid = '0' and app = 'phpgwapi' and location = 'config'"; … … 197 204 $GLOBALS['phpgw']->db->query($cache_query,__LINE__,__FILE__); 198 205 $server_info_cache = $GLOBALS['phpgw']->db->num_rows(); 199 206 */ 207 /* 200 208 if(@$GLOBALS['phpgw_info']['server']['cache_phpgw_info'] && $server_info_cache) 201 209 { … … 204 212 } 205 213 else 206 { 207 $GLOBALS['phpgw']->db->query(" select* from phpgw_config WHERE config_app='phpgwapi'",__LINE__,__FILE__);214 {*/ 215 $GLOBALS['phpgw']->db->query("SELECT * from phpgw_config WHERE config_app='phpgwapi'",__LINE__,__FILE__); 208 216 while ($GLOBALS['phpgw']->db->next_record()) 209 217 { … … 211 219 } 212 220 221 /* 213 222 if(@isset($GLOBALS['phpgw_info']['server']['cache_phpgw_info'])) 214 223 { … … 221 230 . "'0','0','phpgwapi','config','".addslashes(serialize($GLOBALS['phpgw_info']['server']))."')"; 222 231 $GLOBALS['phpgw']->db->query($cache_query,__LINE__,__FILE__); 223 } 224 }232 }*/ 233 //} 225 234 unset($cache_query); 226 235 unset($server_info_cache);
Note: See TracChangeset
for help on using the changeset viewer.