Update of
/var/cvs/Geeklog-2.x/Geeklog-2.x/plugins/link/models
In directory
iowaoutdoors:/tmp/cvs-serv15304/plugins/link/models
Modified Files:
Gl2LinkPeer.php
Log Message:
Index: Gl2LinkPeer.php
============================================================
=======
RCS file:
/var/cvs/Geeklog-2.x/Geeklog-2.x/plugins/link/models/Gl2Link
Peer.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** Gl2LinkPeer.php 6 Jul 2006 14:03:34 -0000 1.4
--- Gl2LinkPeer.php 5 Dec 2006 22:03:42 -0000 1.5
***************
*** 4,22 ****
// The object class
! include_once 'plugins/link/models/Gl2Link.php';
// Other om classes used by these methods
! require_once 'plugins/link/models/soap/Gl2LinkSoap.php';
require_once 'models/Gl2Item.php';
! require_once 'models/Gl2ItemAcl.php';
require_once 'models/soap/Gl2ItemAclSoap.php';
! require_once 'ActionManager.php';
! require_once 'UrlUtility.php';
!
! /**
! * DAO Factory
! */
! require_once 'DataAccess/DAO.php';
/**
--- 4,16 ----
// The object class
! //include_once 'plugins/link/models/Gl2Link.php';
// Other om classes used by these methods
! //require_once 'plugins/link/models/soap/Gl2LinkSoap.php';
require_once 'models/Gl2Item.php';
! //require_once 'models/Gl2ItemAcl.php';
require_once 'models/soap/Gl2ItemAclSoap.php';
! //require_once 'UrlUtility.php';
/**
***************
*** 94,102 ****
// Notify any other plugins that the link's save
event was successfully fired
- require_once 'ActionManager.php';
Geeklog_ActionManager::notify('LINK_DELETE',
array($linkArray));
return $ret;
}
/**
--- 88,119 ----
// Notify any other plugins that the link's save
event was successfully fired
Geeklog_ActionManager::notify('LINK_DELETE',
array($linkArray));
return $ret;
}
+
+ /**
+ * Deletes one or more links based on their primary
key
+ *
+ * param Array|int $idArray array of ID's or a single ID
+ * return Number of objects affected by operation
+ *
+ */
+ public static function deleteLinksById($idArray)
+ {
+ if (!is_numeric($idArray)) {
+ $idArray = array($idArray);
+ }
+
+ $objsToDelete = array();
+
+ foreach ($idArray as $curId) {
+ $linkToDelete = new Gl2Link();
+ $linkToDelete->setLinkId($curId);
+ $objsToDelete[] = $linkToDelete;
+ }
+
+ return self::deleteLinks($objsToDelete);
+ }
/**
***************
*** 195,199 ****
// Notify any other plugins about the set
of links that were just saved
- require_once 'ActionManager.php';
Geeklog_ActionManager::notify('LINK_SAVE',
array($link));
--- 212,215 ----
***************
*** 210,214 ****
// Notify any other plugins about the set of links
that were just saved
- // require_once 'ActionManager.php';
// Geeklog_ActionManager::notify('LINK_SAVE',
$savedLinks);
--- 226,229 ----
_______________________________________________
geeklog2-cvs mailing list
geeklog2-cvs lists.geeklog.net
http://lists.geeklog.net/mailman/listinfo/geeklog2-cvs
|