phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] phpgwapi/inc class.applications.inc.php, 1.53 class.d


From: fipsfuchs
Subject: [Phpgroupware-cvs] phpgwapi/inc class.applications.inc.php, 1.53 class.db.inc.php, 1.12
Date: Thu, 24 Feb 2005 15:59:12 -0000

Update of phpgwapi/inc

Modified Files:
     Branch: MAIN
            class.applications.inc.php lines: +19 -20
            class.db.inc.php lines: +6 -6

Log Message:
adodb fixes

====================================================
Index: phpgwapi/inc/class.applications.inc.php
diff -u phpgwapi/inc/class.applications.inc.php:1.52 
phpgwapi/inc/class.applications.inc.php:1.53
--- phpgwapi/inc/class.applications.inc.php:1.52        Thu Dec 30 06:47:30 2004
+++ phpgwapi/inc/class.applications.inc.php     Tue Jan 11 14:42:53 2005
@@ -281,28 +281,27 @@
                */
                function read_installed_apps()
                {
-                       $this->db->query('select * from phpgw_applications 
where app_enabled != 0 order by app_order asc',__LINE__,__FILE__);
-                       if($this->db->num_rows())
+                       $apps = $this->db->adodb->GetAssoc('select * from 
phpgw_applications where app_enabled != 0 order by app_order asc');
+                       foreach($apps as $key => $value)
                        {
-                               while ($this->db->next_record())
+                               /* re-enable the code if it is really needed
+                               if 
(@is_array($GLOBALS['phpgw_info']['user']['preferences']) &&
+                                   ($t = lang($app_name)) != $app_name.'*')
                                {
-                                       $title = $app_name = 
$this->db->f('app_name');
-
-                                       if 
(@is_array($GLOBALS['phpgw_info']['user']['preferences']) &&
-                                           ($t = lang($app_name)) != 
$app_name.'*')
-                                       {
-                                               $title = $t;
-                                       }
-                                       
$GLOBALS['phpgw_info']['apps'][$this->db->f('app_name')] = Array(
-                                               'title'   => $title,
-                                               'name'    => 
$this->db->f('app_name'),
-                                               'enabled' => True,
-                                               'status'  => 
$this->db->f('app_enabled'),
-                                               'id'      => 
intval($this->db->f('app_id')),
-                                               'order'   => 
intval($this->db->f('app_order')),
-                                               'version' => 
$this->db->f('app_version')
-                                       );
+                                       $title = $t;
                                }
+                               */
+
+                               
$GLOBALS['phpgw_info']['apps'][$value['app_name']] = array
+                               (
+                                       'title'   => $value['app_name'],
+                                       'name'    => $value['app_name'],
+                                       'enabled' => true,
+                                       'status'  => $value['app_enabled'],
+                                       'id'      => intval($value['app_id']),
+                                       'order'   => 
intval($value['app_order']),
+                                       'version' => $value['app_version']
+                               );
                        }
                }


====================================================
Index: phpgwapi/inc/class.db.inc.php
diff -u phpgwapi/inc/class.db.inc.php:1.11 phpgwapi/inc/class.db.inc.php:1.12
--- phpgwapi/inc/class.db.inc.php:1.11  Sun Jan  9 01:46:39 2005
+++ phpgwapi/inc/class.db.inc.php       Tue Jan 11 14:42:53 2005
@@ -118,7 +118,7 @@
                        {
                                return addslashes($str);
                        }
-                       return substr($this->adodb->qstr($str, 
get_magic_quotes_gpc()), 1, -1);
+                       return substr($this->adodb->quote($str, 
get_magic_quotes_gpc()), 1, -1);
                }

                /**
@@ -183,7 +183,7 @@
                                $this->connect();
                        }
                        $this->resultSet = $this->adodb->Execute($Query_String);
-                       if(!$this->resultSet && $this->Halt_On_Error == 'yes')
+                       if(!$this->resultSet && $this->Halt_On_Error = 'yes')
                        {
                                echo $Query_String.'<br>';
                                echo $this->adodb->ErrorMsg();
@@ -481,7 +481,8 @@
                * @param string $file file of calling method/function (optional)
                */
                function halt($msg, $line = '', $file = '')
-               {                       echo "depi: halt";}
+               {
+                       if($this->debug) /* $GLOBALS['phpgw']->log */ echo 
"depricated: halt";}

                /**
                * Get a list of table names in the current database
@@ -490,9 +491,8 @@
                */
                function table_names()
                {
-                       //echo "depi: table_names";
-                       //_debug_array(debug_backtrace());
-                       if(!$this->adodb->isConnected())
+                       if($this->debug) /* $GLOBALS['phpgw']->log */ echo 
"depricated: table_names";
+                       if(!$this->adodb->IsConnected())
                        {
                                $this->connect();
                        }






reply via email to

[Prev in Thread] Current Thread [Next in Thread]