Changeset 370 for trunk/phpgwapi/inc/class.applications.inc.php
- Timestamp:
- 07/28/08 16:42:45 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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 }
Note: See TracChangeset
for help on using the changeset viewer.