summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThilo Wawrzik2007-09-27 09:44:07 (GMT)
committer Thilo Wawrzik2007-09-27 09:44:07 (GMT)
commit91dbc1372ac10821ac48d9b83743fe94d12e06cc (patch)
treefa54b93bbc5317b816be64d2bf096313f183eb0f
parentcfb4c3268ff05dd113df8ae4627e8802531c9ab2 (diff)
- task: remove debug craft and unify item prefixes5.x-2.0-beta2
-rw-r--r--gallery_base.inc17
-rw-r--r--gallery_menu/gallery_menu.module4
2 files changed, 12 insertions, 9 deletions
diff --git a/gallery_base.inc b/gallery_base.inc
index 97c95e3..29712a7 100644
--- a/gallery_base.inc
+++ b/gallery_base.inc
@@ -140,12 +140,12 @@ function gallery_handle_request() {
else {
// Otherwise (on regular pages) $output means that an error occured
preg_match('%<div id="giStackTrace" [^>]*>(.*?)</div>%is', $output, $matches);
- //gallery_error(t('Error handling request (invalid request)<br />or the requested Gallery URL does not exist.'), $matches[1], TRUE);
if (variable_get('gallery_error_redirect', 0) && user_access('search content')) {
drupal_set_message('The requested Gallery URL does not exist. It may have been moved or deleted.
You can search for the item below.', 'notice');
drupal_goto('search/gallery');
}
+ gallery_error(t('Error handling request (invalid request)<br />or the requested Gallery URL does not exist.'), $matches[1], TRUE);
return NULL;
}
}
@@ -222,15 +222,18 @@ function gallery_item_details($id, $verbose = FALSE) {
return $details;
}
// Extract details
- $details['type'] = $entity->entityType;
+ $details['g2type'] = $entity->entityType;
+ $details['g2owner'] = $entity->ownerId;
+ $details['g2parent'] = $entity->parentId;
+ // Drupal node properties (no g2 prefix)
$details['title'] = $entity->title;
- $details['owner'] = $entity->ownerId;
- $details['parent'] = $entity->parentId;
+ $details['created'] = $entity->creationTimestamp;
if ($verbose) {
- $details['description'] = $entity->description;
- $details['summary'] = $entity->summary;
- $details['keywords'] = $entity->keywords;
+ $details['g2description'] = $entity->description;
+ $details['g2summary'] = $entity->summary;
+ $details['g2keywords'] = $entity->keywords;
+ $details['g2theme'] = $entity->theme;
}
return $details;
diff --git a/gallery_menu/gallery_menu.module b/gallery_menu/gallery_menu.module
index e06b150..acdf2d3 100644
--- a/gallery_menu/gallery_menu.module
+++ b/gallery_menu/gallery_menu.module
@@ -52,8 +52,8 @@ function gallery_menu_page() {
if (isset($result['themeData']['pageUrl']['itemId'])) {
$id = $result['themeData']['pageUrl']['itemId'];
$item = gallery_item_details($id);
- if ($item['type'] != 'GalleryAlbumItem') {
- $id = $item['parent'];
+ if ($item['g2type'] != 'GalleryAlbumItem') {
+ $id = $item['g2parent'];
}
list($ret, $parents) = GalleryCoreApi::fetchParentSequence($id);
if ($ret) {