[prev in list] [next in list] [prev in thread] [next in thread]
List: gallery-checkins
Subject: [Gallery-checkins] CVS: gallery2/modules/core/classes GalleryItemHelper.class,1.1,1.2 GalleryUserHel
From: Bharat Mediratta <bharat () users ! sourceforge ! net>
Date: 2002-11-30 21:50:34
[Download RAW message or body]
Update of /cvsroot/gallery/gallery2/modules/core/classes
In directory sc8-pr-cvs1:/tmp/cvs-serv680/modules/core/classes
Modified Files:
GalleryItemHelper.class GalleryUserHelper.class
Log Message:
* Added the "create new album" item admin feature with a hotlink from
the item links section.
* Display the full path to the item when creating new albums and
editting general item settings
* Moved GalleryUserHelper::getItemPermissions to GalleryItemHelper::getPermissions,
it fits better there.
Index: GalleryItemHelper.class
===================================================================
RCS file: /cvsroot/gallery/gallery2/modules/core/classes/GalleryItemHelper.class,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- GalleryItemHelper.class 25 Nov 2002 10:22:51 -0000 1.1
+++ GalleryItemHelper.class 30 Nov 2002 21:50:30 -0000 1.2
@@ -120,5 +120,30 @@
return array($where, $data);
}
+
+ /**
+ * Assert that the given user has one of the specific permissions for the
+ * target item
+ *
+ * @return array object GalleryStatus a status code
+ * boolean true if yes
+ */
+ function getPermissions($itemId, $userId) {
+
+ list ($ret, $groupIds) = GalleryUserGroupMap::fetchGroupsForUser($userId);
+ if ($ret->isError()) {
+ return $ret->wrap(__FILE__, __LINE__);
+ }
+
+ list ($ret, $permissions) =
+ GalleryPermissionMap::fetchPermissionsForItem($itemId,
+ array($userId),
+ $groupIds);
+ if ($ret->isError()) {
+ return array($ret->wrap(__FILE__, __LINE__), null);
+ }
+
+ return array(GalleryStatus::success(), $permissions);
+ }
}
?>
Index: GalleryUserHelper.class
===================================================================
RCS file: /cvsroot/gallery/gallery2/modules/core/classes/GalleryUserHelper.class,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- GalleryUserHelper.class 20 Nov 2002 01:26:49 -0000 1.8
+++ GalleryUserHelper.class 30 Nov 2002 21:50:30 -0000 1.9
@@ -211,29 +211,5 @@
return array(GalleryStatus::success(), $hasPermission);
}
- /**
- * Assert that the given user has one of the specific permissions for the
- * target item
- *
- * @return array object GalleryStatus a status code
- * boolean true if yes
- */
- function getItemPermissions($itemId, $userId) {
-
- list ($ret, $groupIds) = GalleryUserGroupMap::fetchGroupsForUser($userId);
- if ($ret->isError()) {
- return $ret->wrap(__FILE__, __LINE__);
- }
-
- list ($ret, $permissions) =
- GalleryPermissionMap::fetchPermissionsForItem($itemId,
- array($userId),
- $groupIds);
- if ($ret->isError()) {
- return array($ret->wrap(__FILE__, __LINE__), null);
- }
-
- return array(GalleryStatus::success(), $permissions);
- }
}
?>
-------------------------------------------------------
This SF.net email is sponsored by: Get the new Palm Tungsten T
handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en
__[ g a l l e r y - c h e c k i n s ]_________________________
[ list info/archive --> http://gallery.sf.net/lists.php ]
[ gallery info/FAQ/download --> http://gallery.sf.net ]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic