phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] property/class.vfs_sql.php, 1.1.2.3


From: nomail
Subject: [Phpgroupware-cvs] property/class.vfs_sql.php, 1.1.2.3
Date: Sun, 23 May 2004 09:00:01 -0000

Update of /property
Modified Files:
        Branch: proposal-branch
          class.vfs_sql.php

date: 2004/05/02 12:47:50;  author: sigurdne;  state: Exp;  lines: +15 -12

Log Message:
no message
=====================================================================
Index: property/class.vfs_sql.php
diff -u property/class.vfs_sql.php:1.1.2.2 property/class.vfs_sql.php:1.1.2.3
--- property/class.vfs_sql.php:1.1.2.2  Sat May  1 20:00:29 2004
+++ property/class.vfs_sql.php  Sun May  2 12:47:50 2004
@@ -119,7 +119,8 @@
                        $this->linked_dirs = array ();
                        while (!$dbresult->EOF)
                        {
-                               $this->linked_dirs[] = 
$GLOBALS['phpgw']->db->Record;
+//                             $this->linked_dirs[] = 
$GLOBALS['phpgw']->db->Record;
+                               $this->linked_dirs[] = $dbresult->fields;
                                $dbresult->MoveNext();
                        }
                }
@@ -208,6 +209,7 @@
                */
                function add_journal ($data)
                {
+//html_print_r($data);
                        if (!is_array ($data))
                        {
                                $data = array ();
@@ -252,6 +254,7 @@
 
                        $sql = 'INSERT INTO fm_vfs (';
                        $sql2 .= ' VALUES (';
+//html_print_r($file_array);
 
                        for ($i = 0; list ($attribute, $value) = each 
($file_array); $i++)
                        {
@@ -389,7 +392,7 @@
                                        );
                                }
 
-                               if (isset ($value))
+                               if ($value)
                                {
                                        if ($i > 1)
                                        {
@@ -407,6 +410,7 @@
 
                        $sql .= $sql2;
 
+//echo $sql;
                        /*
                           These are some special situations where we need to 
flush the journal entries
                           or move the 'journal' entries to 'journal-deleted'.  
Kind of hackish, but they
@@ -607,7 +611,8 @@
 
                        while (!$dbresult->EOF)
                        {
-                               $rarray[] = $GLOBALS['phpgw']->db->Record;
+//                             $rarray[] = $GLOBALS['phpgw']->db->Record;
+                               $rarray[] = $dbresult->fields;
                                $dbresult->MoveNext();
                        }
 
@@ -2299,7 +2304,8 @@
                        if ($data['checksubdirs'])
                        {
                                $query = $GLOBALS['phpgw']->db->Execute("SELECT 
size FROM fm_vfs WHERE directory='".$p->fake_leading_dirs_clean."' AND 
name='".$p->fake_name_clean."'" . $this->extra_sql (array ('query_text' => 
VFS_SQL_SELECT)));
-                               $size += $GLOBALS['phpgw']->db->Record[0];
+//                             $size += $GLOBALS['phpgw']->db->Record[0];
+                               $size += $query->fields[0];
                        }
 
                        return $size;
@@ -2353,7 +2359,6 @@
                 */
                function ls ($data)
                {
-//html_print_r($data);
                        if (!is_array ($data))
                        {
                                $data = array ();
@@ -2403,7 +2408,7 @@
 
                                $query = $GLOBALS['phpgw']->db->Execute($sql);
 
-                               $record = $GLOBALS['phpgw']->db->Record;
+                               $record = $query->fields;
 
                                /* We return an array of one array to maintain 
the standard */
                                $rarray = array ();
@@ -2412,7 +2417,6 @@
                                {
                                        if ($attribute == 'mime_type' && 
!$record[$attribute])
                                        {
-       //                                      $db2 = $GLOBALS['phpgw']->db;
                                                $record[$attribute] = 
$this->get_ext_mime_type (array(
                                                                'string' => 
$p->fake_name_clean
                                                        )
@@ -2426,7 +2430,6 @@
 
                                        $rarray[0][$attribute] = 
$record[$attribute];
                                }
-
                                return $rarray;
                        }
 
@@ -2498,10 +2501,9 @@
 
                        $rarray = array ();
                        while (!$query->EOF)
-//                     for ($i = 0; $GLOBALS['phpgw']->db->next_record (); 
$i++)
                        {
-                               $record = $GLOBALS['phpgw']->db->Record;
-
+                               $i = 0;
+                               $record = $query->fields;
                                /* Further checking on the directory.  This 
makes sure /home/user/test won't match /home/user/test22 */
                                if (address@hidden ("^$dir(/|$)", 
$record['directory']))
                                {
@@ -2533,6 +2535,7 @@
 
                                        $rarray[$i][$attribute] = 
$record[$attribute];
                                }
+                               $i++;
                                $query->MoveNext();
                        }
 




reply via email to

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