[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] api/class.datamine.php, 1.1.2.5
From: |
nomail |
Subject: |
[Phpgroupware-cvs] api/class.datamine.php, 1.1.2.5 |
Date: |
Sun, 23 May 2004 02:27:28 -0000 |
Update of /api
Modified Files:
Branch: proposal-branch
class.datamine.php
date: 2004/05/07 07:51:20; author: jengo; state: Exp; lines: +22 -5
Log Message:
Started adding the hooks for edit and delete of datamine records. Currently,
this only fully works for symbolic links. Hard links do not presently work.
=====================================================================
Index: api/class.datamine.php
diff -u api/class.datamine.php:1.1.2.4 api/class.datamine.php:1.1.2.5
--- api/class.datamine.php:1.1.2.4 Fri May 7 07:12:18 2004
+++ api/class.datamine.php Fri May 7 07:51:20 2004
@@ -118,10 +118,11 @@
$args->set('location_to',REQUIRED,'any');
$args = $args->get(func_get_args());
- $details = array(
- 'dm_owner' =>
$GLOBALS['phpgw_data']['user']['id'],
- 'dm_location_from' =>
$args['location_from'],
- 'dm_location_to' => $args['location_to']
+ $details = array
+ (
+ 'dm_owner' =>
$GLOBALS['phpgw_data']['user']['id'],
+ 'dm_location_from' => $args['location_from'],
+ 'dm_location_to' => $args['location_to']
);
$sql = 'SELECT * FROM phpgw_datamine'
@@ -142,5 +143,21 @@
$sql =
$GLOBALS['phpgw']->db->GetUpdateSQL($rs,$details);
}
return is_object($rs =
$GLOBALS['phpgw']->db->execute($sql));
+ }
+
+ function _delete()
+ {
+ $args = new safe_args();
+ $args->set('location',REQUIRED,'any');
+ extract($args->get(func_get_args()));
+
+ // FIXME: Add ACL check
+ $dbresult = $GLOBALS['phpgw']->db->execute("
+ DELETE FROM
+ phpgw_datamine
+ WHERE
+ dm_location_to='$location'");
+
+ return ($GLOBALS['phpgw']->db->affected_rows() ? true :
false);
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] api/class.datamine.php, 1.1.2.5,
nomail <=