[Phpgroupware-cvs] phpgwapi/inc class.vfs_sql.inc.php
CVSROOT:/sources/phpgwapi Module name:phpgwapi Changes by: Sigurd Nes sigurdne 07/10/07 09:48:00 Modified files: inc: class.vfs_sql.inc.php Log message: real_full_path vs fake_full_path CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/phpgwapi/inc/class.vfs_sql.inc.php?cvsroot=phpgwapir1=1.38r2=1.39 Patches: Index: class.vfs_sql.inc.php === RCS file: /sources/phpgwapi/phpgwapi/inc/class.vfs_sql.inc.php,v retrieving revision 1.38 retrieving revision 1.39 diff -u -b -r1.38 -r1.39 --- class.vfs_sql.inc.php 23 Dec 2006 00:40:15 - 1.38 +++ class.vfs_sql.inc.php 7 Oct 2007 09:47:59 - 1.39 @@ -8,7 +8,7 @@ * @license http://www.fsf.org/licenses/lgpl.html GNU Lesser General Public License * @package phpgwapi * @subpackage vfs - * @version $Id: class.vfs_sql.inc.php,v 1.38 2006/12/23 00:40:15 Caeies Exp $ + * @version $Id: class.vfs_sql.inc.php,v 1.39 2007/10/07 09:47:59 sigurdne Exp $ */ /** @@ -1167,7 +1167,7 @@ } $ls_array = $this-ls (array( - 'string'= $f-fake_full_path, + 'string'= $f-real_full_path, // Sigurd: seems to work better with real - old: 'string' = $f-fake_full_path, 'relatives' = array ($f-mask), 'checksubdirs' = False, 'mime_type' = False, ___ phpGroupWare-cvs mailing list phpGroupWare-cvs@gnu.org http://lists.gnu.org/mailman/listinfo/phpgroupware-cvs
[Phpgroupware-cvs] phpgwapi/inc class.vfs_sql.inc.php
CVSROOT:/cvsroot/phpgwapi Module name:phpgwapi Changes by: Caeies Caeies 06/12/22 23:53:55 Modified files: inc: class.vfs_sql.inc.php Log message: fixing E_ALL, and bad things with php5.2 + mysql 5 CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/phpgwapi/inc/class.vfs_sql.inc.php?cvsroot=phpgwapir1=1.36r2=1.37 Patches: Index: class.vfs_sql.inc.php === RCS file: /cvsroot/phpgwapi/phpgwapi/inc/class.vfs_sql.inc.php,v retrieving revision 1.36 retrieving revision 1.37 diff -u -b -r1.36 -r1.37 --- class.vfs_sql.inc.php 20 Sep 2006 09:37:32 - 1.36 +++ class.vfs_sql.inc.php 22 Dec 2006 23:53:55 - 1.37 @@ -8,7 +8,7 @@ * @license http://www.fsf.org/licenses/lgpl.html GNU Lesser General Public License * @package phpgwapi * @subpackage vfs - * @version $Id: class.vfs_sql.inc.php,v 1.36 2006/09/20 09:37:32 Caeies Exp $ + * @version $Id: class.vfs_sql.inc.php,v 1.37 2006/12/22 23:53:55 Caeies Exp $ */ /** @@ -207,7 +207,7 @@ $p = $this-path_parts (array ('string' = $data['string'], 'relatives' = array ($data['relatives'][0]))); /* We check that they have some sort of access to the file other than read */ - if (!$this-acl_check (array ('string' = $p-fake_full_path, 'relatives' = array ($p-mask), 'operation' = PHPGW_ACL_WRITE)) + if (!$this-acl_check (array ('string' = $p-fake_full_path, 'relatives' = array ($p-mask), 'operation' = PHPGW_ACL_ADD)) !$this-acl_check (array ('string' = $p-fake_full_path, 'relatives' = array ($p-mask), 'operation' = PHPGW_ACL_EDIT)) !$this-acl_check (array ('string' = $p-fake_full_path, 'relatives' = array ($p-mask), 'operation' = PHPGW_ACL_DELETE))) { @@ -230,8 +230,9 @@ $file_array = $ls_array[0]; $sql = 'INSERT INTO phpgw_vfs ('; - $sql2 .= ' VALUES ('; + $sql2 = ' VALUES ('; $morethanone = False; + $modified = False; for ($i = 0; list ($attribute, $value) = each ($file_array); $i++) { @@ -343,7 +344,7 @@ $version_parts[1] = 0; $version_parts[0]++; } - + $newversion = ''; for ($j = 0; $j $newnumofparts; $j++) { if (!isset ($version_parts[$j])) @@ -368,7 +369,7 @@ ) ); } - if (isset ($value)) + if (isset ($value) !empty($value)) { if ($morethanone) { @@ -394,6 +395,7 @@ or move the 'journal' entries to 'journal-deleted'. Kind of hackish, but they provide a consistent feel to the system */ + $flush_path = ''; if ($data['operation'] == VFS_OPERATION_CREATED) { $flush_path = $p-fake_full_path; @@ -802,7 +804,7 @@ $conf-read_repository(); if ($this-file_actions || $p-outside) { - if ($fp = fopen ($p-real_full_path, 'rb')) + if (filesize ($p-real_full_path) 0 $fp = fopen ($p-real_full_path, 'rb')) { $contents = fread ($fp, filesize ($p-real_full_path)); fclose ($fp); @@ -1985,6 +1987,7 @@ $sql = 'UPDATE phpgw_vfs SET '; $change_attributes = 0; + $edited_comment = False; reset ($this-attributes); while (list ($num, $attribute) = each ($this-attributes)) @@ -1999,7 +2002,7 @@ */ if ($attribute == 'comment' $data['attributes'][$attribute] != $record[$attribute]) { - $edited_comment = 1; + $edited_comment = True; }
[Phpgroupware-cvs] phpgwapi/inc class.vfs_sql.inc.php
CVSROOT:/cvsroot/phpgwapi Module name:phpgwapi Changes by: Caeies Caeies 06/12/23 00:40:15 Modified files: inc: class.vfs_sql.inc.php Log message: When no files are found, don t try to use NextRecord() ... CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/phpgwapi/inc/class.vfs_sql.inc.php?cvsroot=phpgwapir1=1.37r2=1.38 Patches: Index: class.vfs_sql.inc.php === RCS file: /cvsroot/phpgwapi/phpgwapi/inc/class.vfs_sql.inc.php,v retrieving revision 1.37 retrieving revision 1.38 diff -u -b -r1.37 -r1.38 --- class.vfs_sql.inc.php 22 Dec 2006 23:53:55 - 1.37 +++ class.vfs_sql.inc.php 23 Dec 2006 00:40:15 - 1.38 @@ -8,7 +8,7 @@ * @license http://www.fsf.org/licenses/lgpl.html GNU Lesser General Public License * @package phpgwapi * @subpackage vfs - * @version $Id: class.vfs_sql.inc.php,v 1.37 2006/12/22 23:53:55 Caeies Exp $ + * @version $Id: class.vfs_sql.inc.php,v 1.38 2006/12/23 00:40:15 Caeies Exp $ */ /** @@ -2232,8 +2232,11 @@ . FROM phpgw_vfs WHERE directory='{$p-fake_leading_dirs_clean}' AND name='{$p-fake_name_clean}' . $this-extra_sql (array ('query_type' = VFS_SQL_SELECT)); - $query = $GLOBALS['phpgw']-db-query ($sql, __LINE__, __FILE__); + if($GLOBALS['phpgw']-db-num_rows() == 0) + { + return array(); + } $GLOBALS['phpgw']-db-next_record(); $record = $this-Record(); //echo 'record: ' . _debug_array($record); @@ -2281,7 +2284,6 @@ { continue; } - $rarray[] = $this-get_real_info (array( 'string' = $p-real_full_path . SEP . $filename, 'relatives' = array ($p-mask) ___ phpGroupWare-cvs mailing list phpGroupWare-cvs@gnu.org http://lists.gnu.org/mailman/listinfo/phpgroupware-cvs
[Phpgroupware-cvs] phpgwapi/inc class.vfs_sql.inc.php
CVSROOT:/cvsroot/phpgwapi Module name:phpgwapi Changes by: Caeies Caeies 06/09/20 09:26:42 Modified files: inc: class.vfs_sql.inc.php Log message: E_ALL fix CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/phpgwapi/inc/class.vfs_sql.inc.php?cvsroot=phpgwapir1=1.33r2=1.34 Patches: Index: class.vfs_sql.inc.php === RCS file: /cvsroot/phpgwapi/phpgwapi/inc/class.vfs_sql.inc.php,v retrieving revision 1.33 retrieving revision 1.34 diff -u -b -r1.33 -r1.34 --- class.vfs_sql.inc.php 16 Aug 2006 14:18:45 - 1.33 +++ class.vfs_sql.inc.php 20 Sep 2006 09:26:42 - 1.34 @@ -8,7 +8,7 @@ * @license http://www.fsf.org/licenses/lgpl.html GNU Lesser General Public License * @package phpgwapi * @subpackage vfs - * @version $Id: class.vfs_sql.inc.php,v 1.33 2006/08/16 14:18:45 skwashd Exp $ + * @version $Id: class.vfs_sql.inc.php,v 1.34 2006/09/20 09:26:42 Caeies Exp $ */ /** @@ -621,7 +621,7 @@ return True; } - if (!$data['owner_id']) + if (!isset($data['owner_id']) !$data['owner_id']) { $p = $this-path_parts (array( 'string'= $data['string'], ___ Phpgroupware-cvs mailing list Phpgroupware-cvs@gnu.org http://lists.gnu.org/mailman/listinfo/phpgroupware-cvs
[Phpgroupware-cvs] phpgwapi/inc class.vfs_sql.inc.php
CVSROOT:/cvsroot/phpgwapi Module name:phpgwapi Changes by: Caeies Caeies 06/09/20 09:29:22 Modified files: inc: class.vfs_sql.inc.php Log message: E_ALL fix CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/phpgwapi/inc/class.vfs_sql.inc.php?cvsroot=phpgwapir1=1.34r2=1.35 Patches: Index: class.vfs_sql.inc.php === RCS file: /cvsroot/phpgwapi/phpgwapi/inc/class.vfs_sql.inc.php,v retrieving revision 1.34 retrieving revision 1.35 diff -u -b -r1.34 -r1.35 --- class.vfs_sql.inc.php 20 Sep 2006 09:26:42 - 1.34 +++ class.vfs_sql.inc.php 20 Sep 2006 09:29:22 - 1.35 @@ -8,7 +8,7 @@ * @license http://www.fsf.org/licenses/lgpl.html GNU Lesser General Public License * @package phpgwapi * @subpackage vfs - * @version $Id: class.vfs_sql.inc.php,v 1.34 2006/09/20 09:26:42 Caeies Exp $ + * @version $Id: class.vfs_sql.inc.php,v 1.35 2006/09/20 09:29:22 Caeies Exp $ */ /** @@ -62,7 +62,7 @@ unlink(), rmdir(), touch(), etc.). If not, then we're working completely in the database. */ - $conf = CreateObject('phpgwapi.config', 'phpgwapi'); + $conf = CreateObject('phpgwapi.config', 'phpgwapi'); $conf-read_repository(); if ($conf-config_data['file_store_contents'] == 'filesystem' || !$conf-config_data['file_store_contents']) { @@ -726,7 +726,7 @@ } } - $acl = CreateObject ('phpgwapi.acl', $owner_id); + $acl = CreateObject ('phpgwapi.acl', $owner_id); $acl-account_id = $owner_id; $acl-read_repository (); @@ -748,7 +748,7 @@ } elseif (!$rights $group_ok) { - $conf = CreateObject('phpgwapi.config', 'phpgwapi'); + $conf = CreateObject('phpgwapi.config', 'phpgwapi'); $conf-read_repository(); if ($conf-config_data['acl_default'] == 'grant') { @@ -798,7 +798,7 @@ return False; } - $conf = CreateObject('phpgwapi.config', 'phpgwapi'); + $conf = CreateObject('phpgwapi.config', 'phpgwapi'); $conf-read_repository(); if ($this-file_actions || $p-outside) { @@ -886,7 +886,7 @@ ) ); - $conf = CreateObject('phpgwapi.config', 'phpgwapi'); + $conf = CreateObject('phpgwapi.config', 'phpgwapi'); $conf-read_repository(); if ($this-file_actions) { ___ Phpgroupware-cvs mailing list Phpgroupware-cvs@gnu.org http://lists.gnu.org/mailman/listinfo/phpgroupware-cvs
[Phpgroupware-cvs] phpgwapi/inc class.vfs_sql.inc.php
CVSROOT:/cvsroot/phpgwapi Module name:phpgwapi Changes by: Caeies Caeies 06/09/20 09:37:32 Modified files: inc: class.vfs_sql.inc.php Log message: E_ALL better fix :( CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/phpgwapi/inc/class.vfs_sql.inc.php?cvsroot=phpgwapir1=1.35r2=1.36 Patches: Index: class.vfs_sql.inc.php === RCS file: /cvsroot/phpgwapi/phpgwapi/inc/class.vfs_sql.inc.php,v retrieving revision 1.35 retrieving revision 1.36 diff -u -b -r1.35 -r1.36 --- class.vfs_sql.inc.php 20 Sep 2006 09:29:22 - 1.35 +++ class.vfs_sql.inc.php 20 Sep 2006 09:37:32 - 1.36 @@ -8,7 +8,7 @@ * @license http://www.fsf.org/licenses/lgpl.html GNU Lesser General Public License * @package phpgwapi * @subpackage vfs - * @version $Id: class.vfs_sql.inc.php,v 1.35 2006/09/20 09:29:22 Caeies Exp $ + * @version $Id: class.vfs_sql.inc.php,v 1.36 2006/09/20 09:37:32 Caeies Exp $ */ /** @@ -621,7 +621,7 @@ return True; } - if (!isset($data['owner_id']) !$data['owner_id']) + if (!isset($data['owner_id']) || !$data['owner_id']) { $p = $this-path_parts (array( 'string'= $data['string'], ___ Phpgroupware-cvs mailing list Phpgroupware-cvs@gnu.org http://lists.gnu.org/mailman/listinfo/phpgroupware-cvs