Commit e6eb5e28 authored by profix898's avatar profix898
Browse files

- major update: basically all features ported to D6 now :)

(requires G2.3/svn and is still volatile, for early testing only)
parent 030f6937
...@@ -4,20 +4,18 @@ ...@@ -4,20 +4,18 @@
* Drupal embeded Gallery2 css overrides. * Drupal embeded Gallery2 css overrides.
* These do not make a perfect theme, but are not bad as a first step. * These do not make a perfect theme, but are not bad as a first step.
*/ */
/* Increase font size */
/* Increase font size */
#gallery { #gallery {
font-size: 100%; font-size: 100%;
} }
/*#siteAdminForm {
font-size: 140%;
}*/
/* Remove the header */ /* Remove the header */
#gsHeader { #gsHeader {
display: none; display: none;
} }
/* Removes the Gallery Title (as Drupal displays it)*/ /* Removes the Gallery Title (as Drupal displays it) */
#gallery .gbBlock table h2 { #gallery .gbBlock table h2 {
display: none; display: none;
} }
...@@ -58,7 +56,6 @@ table.ImageFrame_wood, table.ImageFrame_wood td { ...@@ -58,7 +56,6 @@ table.ImageFrame_wood, table.ImageFrame_wood td {
padding: 0px; padding: 0px;
} }
/* Brings h2 back for siteAdmin pages */ /* Brings h2 back for siteAdmin pages */
#siteAdminForm .gbBlock h2 { #siteAdminForm .gbBlock h2 {
display: block; display: block;
...@@ -83,6 +80,19 @@ table.ImageFrame_wood, table.ImageFrame_wood td { ...@@ -83,6 +80,19 @@ table.ImageFrame_wood, table.ImageFrame_wood td {
overflow: hidden; overflow: hidden;
} }
/* Flatten left margin for SiteAdminLinks if moved to Drupal sidebar */
.block-gallery #gsSidebar ul#gbSiteAdminLinks,
.block-gallery #gsSidebar ul#gbSiteAdminLinks li,
.block-gallery #gsSidebar ul#gbSiteAdminLinks li ul,
.block-gallery #gsSidebar ul#gbSiteAdminLinks li ul li {
margin-left: 2px;
}
/* Remove bold font from SiteAdminLinks if moved to Drupal sidebar */
.block-gallery #gsSidebar #gbSiteAdminLinks a {
font-weight: normal;
}
.block-gallery div.block-core-ItemLinks { .block-gallery div.block-core-ItemLinks {
margin: 0; margin: 0;
border-bottom: 1px solid #aaa; border-bottom: 1px solid #aaa;
...@@ -97,8 +107,9 @@ table.ImageFrame_wood, table.ImageFrame_wood td { ...@@ -97,8 +107,9 @@ table.ImageFrame_wood, table.ImageFrame_wood td {
border-top: none; border-top: none;
} }
/* Garland adds padding which needs to be removed */
.block-gallery td, th { .block-gallery td, th {
padding: 0; /* Garland adds padding which needs to be removed */ padding: 0;
} }
/* Navigation Tree */ /* Navigation Tree */
...@@ -106,7 +117,7 @@ table.ImageFrame_wood, table.ImageFrame_wood td { ...@@ -106,7 +117,7 @@ table.ImageFrame_wood, table.ImageFrame_wood td {
font-size: 1em; font-size: 1em;
} }
/* For g2ic_plugin */ /* For G2Image */
img.g2image_float_left, div.g2image_float_left { img.g2image_float_left, div.g2image_float_left {
float: left; float: left;
margin: 0px 4px 4px 0px; margin: 0px 4px 4px 0px;
...@@ -124,7 +135,7 @@ img.g2image_centered, div.g2image_centered { ...@@ -124,7 +135,7 @@ img.g2image_centered, div.g2image_centered {
text-align: center; text-align: center;
} }
/* Neeed to centre images with frames */ /* Need to center images with frames */
.g2image_centered table { .g2image_centered table {
margin: auto; margin: auto;
} }
...@@ -204,10 +215,11 @@ td.gallery-grid-block { ...@@ -204,10 +215,11 @@ td.gallery-grid-block {
margin: auto; margin: auto;
}*/ }*/
/* Garland adds padding which needs to be removed */
.gallery-grid-block table, .gallery-grid-block table,
.gallery-grid-block .one-image td, .gallery-grid-block .one-image td,
.gallery-grid-block .one-image table { .gallery-grid-block .one-image table {
padding: 0; /* Garland adds padding which needs to be removed */ padding: 0;
margin: auto; margin: auto;
} }
......
...@@ -15,22 +15,11 @@ function gallery_install() { ...@@ -15,22 +15,11 @@ function gallery_install() {
/** /**
* Implementation of hook_update_N(). * Implementation of hook_update_N().
* (migrate settings from the 5.x-1.x to 5.x-2.x (or 6.x-1.x) series) * (migrate settings from the 5.x-1.x to 5.x-2.x series)
*/ */
function gallery_update_1() { function gallery_update_1() {
$ret = array();
$variables = array();
// Fetch all gallery-related variables
$result = db_query("SELECT * FROM {variable} WHERE name LIKE 'gallery_%'");
while ($var = db_fetch_object($result)) {
$variables[$var->name] = $var->value;
}
// Remove old variables
db_query("DELETE FROM {variable} WHERE name LIKE 'gallery_%'");
// Array containing 'old name' => 'new name' map // Array containing 'old name' => 'new name' map
$variable_map = array( $migrate = array(
// Image block settings // Image block settings
'gallery_album_frame' => 'gallery_block_image_0_album_frame', 'gallery_album_frame' => 'gallery_block_image_0_album_frame',
'gallery_block_block' => 'gallery_block_image_0_block_block', 'gallery_block_block' => 'gallery_block_image_0_block_block',
...@@ -59,17 +48,129 @@ function gallery_update_1() { ...@@ -59,17 +48,129 @@ function gallery_update_1() {
'gallery_use_full_name' => 'gallery_use_fullname', 'gallery_use_full_name' => 'gallery_use_fullname',
'gallery_profile_full_name_field' => 'gallery_profile_fullname_field' 'gallery_profile_full_name_field' => 'gallery_profile_fullname_field'
); );
// Array containing obsolete variables
$obsolete = array('gallery_search_max_items', 'gallery_autodetect_dir', 'gallery_uri', 'gallery_dir');
// Update variables
$ret = gallery_update_variables($migrate, $obsolete);
// Update the blocks
$ret[] = update_sql("UPDATE {blocks} SET delta = 'image-0' WHERE module = 'gallery' AND delta = 0");
$ret[] = update_sql("UPDATE {blocks} SET delta = 'navigation' WHERE module = 'gallery' AND delta = 1");
$ret[] = update_sql("UPDATE {blocks} SET delta = 'grid-0' WHERE module = 'gallery' AND delta = 2");
// Mark gallery configuration invalid. This does NOT reset the configuration, but
// forces the user to run the install wizard to (re)set and verify critical settings.
variable_set('gallery_valid', FALSE);
drupal_set_message('You were updating from gallery module 5.x-1.x (or earlier) to the 6.x-1.x
series of the module. All your settings were migrated automatically (see below),
but you will need to re-configure some basic options. Please visit the
Gallery settings page (admin/settings/gallery) to complete the update.',
'error');
cache_clear_all('variables', 'cache');
menu_rebuild();
return $ret;
}
/**
* Implementation of hook_update_N().
* (initial update to Drupal 6)
*/
function gallery_update_6001() {
$delta = 0;
$new = $migrate = array();
// Image block settings
$imageblock_num = variable_get('gallery_block_image_num', 1);
for ($i=0; $i<$imageblock_num; $i++) {
$delta++;
$new += array(
'gallery_block_'. $delta .'_type' => 'imageblock',
'gallery_block_'. $delta .'_imageblock_num_cols' => 1,
);
$migrate += array(
'gallery_block_image_'. $i .'_blockid' => 'gallery_block_'. $delta .'_blockid',
'gallery_block_image_'. $i .'_num_images' => 'gallery_block_'. $delta .'_imageblock_num_rows',
'gallery_block_image_'. $i .'_block_block' => 'gallery_block_'. $delta .'_imageblock_block_block',
'gallery_block_image_'. $i .'_item_id' => 'gallery_block_'. $delta .'_imageblock_item_id',
'gallery_block_image_'. $i .'_block_show' => 'gallery_block_'. $delta .'_imageblock_block_show',
'gallery_block_image_'. $i .'_size_method' => 'gallery_block_'. $delta .'_imageblock_size_method',
'gallery_block_image_'. $i .'_size' => 'gallery_block_'. $delta .'_imageblock_size',
'gallery_block_image_'. $i .'_album_frame' => 'gallery_block_'. $delta .'_imageblock_album_frame',
'gallery_block_image_'. $i .'_item_frame' => 'gallery_block_'. $delta .'_imageblock_item_frame',
'gallery_block_image_'. $i .'_link_target' => 'gallery_block_'. $delta .'_imageblock_link_target',
'gallery_block_image_'. $i .'_link' => 'gallery_block_'. $delta .'_imageblock_link',
);
}
// Grid block settings
$gridblock_num = variable_get('gallery_block_grid_num', 1);
for ($i=0; $i<$gridblock_num; $i++) {
$delta++;
$new['gallery_block_'. $delta .'_type'] = 'imageblock';
$migrate += array(
'gallery_block_grid_'. $i .'_blockid' => 'gallery_block_'. $delta .'_blockid',
'gallery_block_grid_'. $i .'_num_cols' => 'gallery_block_'. $delta .'_imageblock_num_cols',
'gallery_block_grid_'. $i .'_num_rows' => 'gallery_block_'. $delta .'_imageblock_num_rows',
'gallery_block_grid_'. $i .'_block_block' => 'gallery_block_'. $delta .'_imageblock_block_block',
'gallery_block_grid_'. $i .'_item_id' => 'gallery_block_'. $delta .'_imageblock_item_id',
'gallery_block_grid_'. $i .'_block_show' => 'gallery_block_'. $delta .'_imageblock_block_show',
'gallery_block_grid_'. $i .'_size_method' => 'gallery_block_'. $delta .'_imageblock_size_method',
'gallery_block_grid_'. $i .'_size' => 'gallery_block_'. $delta .'_imageblock_size',
'gallery_block_grid_'. $i .'_album_frame' => 'gallery_block_'. $delta .'_imageblock_album_frame',
'gallery_block_grid_'. $i .'_item_frame' => 'gallery_block_'. $delta .'_imageblock_item_frame',
'gallery_block_grid_'. $i .'_link_target' => 'gallery_block_'. $delta .'_imageblock_link_target',
'gallery_block_grid_'. $i .'_link' => 'gallery_block_'. $delta .'_imageblock_link',
);
}
$new['gallery_block_num'] = $delta;
// Array containing obsolete variables
$obsolete = array('gallery_page_callback', 'gallery_block_image_num', 'gallery_block_grid_num');
// Add new variables
foreach ($new as $name => $value) {
db_query("INSERT INTO {variable} (name, value) VALUES ('%s', '%s')", $name, $value);
}
// Update variables
$ret = gallery_update_variables($migrate, $obsolete);
// Update the blocks
$ret[] = update_sql("UPDATE {blocks} SET delta = 'image-0' WHERE module = 'gallery' AND delta = 0");
$ret[] = update_sql("UPDATE {blocks} SET delta = 'navigation' WHERE module = 'gallery' AND delta = 1");
$ret[] = update_sql("UPDATE {blocks} SET delta = 'grid-0' WHERE module = 'gallery' AND delta = 2");
cache_clear_all('variables', 'cache');
menu_rebuild();
return $ret;
}
/**
* Function gallery_update_variables().
*/
function gallery_update_variables($migrate, $obsolete) {
$ret = array();
$variables = array();
// Fetch all gallery-related variables
$result = db_query("SELECT * FROM {variable} WHERE name LIKE 'gallery_%'");
while ($var = db_fetch_object($result)) {
$variables[$var->name] = $var->value;
}
// Remove old variables
db_query("DELETE FROM {variable} WHERE name LIKE 'gallery_%'");
// Migrate old variables // Migrate old variables
foreach ($variable_map as $old => $new) { foreach ($migrate as $old => $new) {
if (isset($variables[$old])) { if (isset($variables[$old])) {
$variables[$new] = $variables[$old]; $variables[$new] = $variables[$old];
unset($variables[$old]); unset($variables[$old]);
$ret[] = array('success' => TRUE, 'query' => 'Migrating variable ['. $old .' => '. $new .']'); $ret[] = array('success' => TRUE, 'query' => 'Migrating variable ['. $old .' => '. $new .']');
} }
} }
// Unset obsolete variables // Unset obsolete variables
$obsolete = array('gallery_search_max_items', 'gallery_autodetect_dir', 'gallery_uri', 'gallery_dir');
foreach ($obsolete as $var) { foreach ($obsolete as $var) {
if (isset($variables[$var])) { if (isset($variables[$var])) {
unset($variables[$var]); unset($variables[$var]);
...@@ -77,14 +178,6 @@ function gallery_update_1() { ...@@ -77,14 +178,6 @@ function gallery_update_1() {
} }
} }
// Mark gallery configuration invalid. This does NOT reset the configuration, but
// forces the user to run the install wizard to (re)set and verify critical settings.
$variables['gallery_valid'] = FALSE;
drupal_set_message('You were updating from gallery module 5.x-1.x (or earlier) to the 6.x-1.x
of the module. All your settings were migrated automatically (see below),
but you will need to re-configure some basic options. Please visit the
Gallery settings page (admin/settings/gallery) to complete the update.',
'error');
// Save resulting variables array // Save resulting variables array
// (all variables not migrated or unset are taken over directly) // (all variables not migrated or unset are taken over directly)
foreach ($variables as $name => $value) { foreach ($variables as $name => $value) {
...@@ -92,20 +185,6 @@ function gallery_update_1() { ...@@ -92,20 +185,6 @@ function gallery_update_1() {
// (i.e. unserialize => serialize and cache_clear_all() for each variable) // (i.e. unserialize => serialize and cache_clear_all() for each variable)
db_query("INSERT INTO {variable} (name, value) VALUES ('%s', '%s')", $name, $value); db_query("INSERT INTO {variable} (name, value) VALUES ('%s', '%s')", $name, $value);
} }
cache_clear_all('variables', 'cache');
menu_rebuild();
return $ret;
}
/**
* Implementation of hook_update_N().
* (initial update to Drupal 6)
*/
function gallery_update_6001() {
$ret = array();
$ret[] = array('success' => TRUE, 'query' => 'Removing variable [gallery_page_callback]');
variable_del('gallery_page_callback');
return $ret; return $ret;
} }
......
// $Id$ // $Id$
function g2ic_open(field) { function g2image_open(field) {
// Set some properties // Set some properties
var form = $('#'+field).parents('form').attr('id'); var form = $('#'+field).parents('form').attr('id');
var url = Drupal.settings.gallery.g2image_uri+'g2image.php?g2ic_form='+form+'&g2ic_field='+field+'&g2ic_tinymce=0'; var url = Drupal.settings.gallery.g2image_uri+'g2image.php?g2ic_form='+form+'&g2ic_field='+field+'&g2ic_tinymce=0';
...@@ -14,3 +14,10 @@ function g2ic_open(field) { ...@@ -14,3 +14,10 @@ function g2ic_open(field) {
// Open the G2Image window // Open the G2Image window
window.open(url, name, features); window.open(url, name, features);
} }
// BUEditor
function g2bueditor_open() {
if (editor.active) {
g2image_open(editor.active.textArea.id);
}
}
...@@ -262,22 +262,21 @@ function gallery_auth_validate($form, &$form_state) { ...@@ -262,22 +262,21 @@ function gallery_auth_validate($form, &$form_state) {
*/ */
function gallery_user($op, &$edit, &$user, $category = NULL) { function gallery_user($op, &$edit, &$user, $category = NULL) {
require_once(drupal_get_path('module', 'gallery') .'/gallery_user.inc'); require_once(drupal_get_path('module', 'gallery') .'/gallery_user.inc');
switch ($op) { switch ($op) {
case 'login': case 'login':
gallery_login(); gallery_login();
break; break;
case 'logout': case 'logout':
gallery_logout(); gallery_logout();
break; break;
case 'view': case 'view':
return gallery_user_view($user); return gallery_user_view($user);
case 'insert': case 'insert':
return gallery_user_insert($edit, drupal_clone($user)); return gallery_user_insert($edit, drupal_clone($user));
case 'update': case 'update':
return gallery_user_update($edit, drupal_clone($user)); return gallery_user_update($edit, drupal_clone($user));
case 'delete': case 'delete':
return gallery_user_delete($user); return gallery_user_delete($user);
} }
} }
...@@ -308,12 +307,12 @@ function gallery_form_alter(&$form, $form_state, $form_id) { ...@@ -308,12 +307,12 @@ function gallery_form_alter(&$form, $form_state, $form_id) {
$form['#submit'][] = '_gallery_groups_submit'; $form['#submit'][] = '_gallery_groups_submit';
} }
// Add a custom search form // Add a custom search form
if ($form_id == 'search_form' && arg(1) == 'gallery' && variable_get('gallery_search_advanced', 1) && user_access('access gallery')) { else if ($form_id == 'search_form' && arg(1) == 'gallery' && variable_get('gallery_search_advanced', 1) && user_access('access gallery')) {
require_once(drupal_get_path('module', 'gallery') .'/gallery_search.inc'); require_once(drupal_get_path('module', 'gallery') .'/gallery_search.inc');
_gallery_search_form($form); _gallery_search_form($form);
} }
// Add _validate() handler for external authentication // Add _validate() handler for external authentication
if ($form_id == 'user_login_block' || $form_id == 'user_login') { else if ($form_id == 'user_login_block' || $form_id == 'user_login') {
$form['#validate'][] = 'gallery_auth_validate'; $form['#validate'][] = 'gallery_auth_validate';
} }
} }
...@@ -395,7 +394,7 @@ function gallery_page() { ...@@ -395,7 +394,7 @@ function gallery_page() {
$result = gallery_handle_request(); $result = gallery_handle_request();
if ($result && !$result['isDone']) { if ($result && !$result['isDone']) {
// Allow modules to alter the page // Allow modules to alter the page
drupal_alter('gallery_page', $result); drupal_alter('gallery_page', $result, array());
// Add css/js for this page // Add css/js for this page
gallery_set_head($result['headHtml'], TRUE); gallery_set_head($result['headHtml'], TRUE);
// Add pathbar. See http://gallery.menalto.com/node/33447 // Add pathbar. See http://gallery.menalto.com/node/33447
...@@ -444,40 +443,35 @@ function gallery_page() { ...@@ -444,40 +443,35 @@ function gallery_page() {
} }
/** /**
* Function gallery_gsitemap(). * Implementation of hook_xmlsitemap_links().
* (define additional links to add to the site map) * (define additional links to add to the site map)
*
* This hook allows modules to add additional links to the site map. Links
* may be associated with nodes, terms, or users, as shown in the example.
*
* @param $type
* If given, the type of link to associate additional links with.
* @param $excludes
* If given, an array of criteria for excluding links.
* @return
* An array of links or an empty array.
*/ */
function gallery_gsitemap($type = NULL, $excludes = array()) { function gallery_xmlsitemap_links($type = NULL, $excludes = array()) {
if (($type != 'xml') || !variable_get('gallery_enable_sitemap', 1) || !_gallery_init(TRUE)) { if (($type != 'xml') || !variable_get('gallery_enable_sitemap', 1) || !_gallery_init(TRUE)) {
return array(); return;
} }
list($ret, $view) = GalleryView::loadView('sitemap.Sitemap'); list($ret, $view) = GalleryView::loadView('sitemap.Sitemap');
if ($ret) { if ($ret) {
gallery_error(t('Error loading the Gallery2 Google Sitemap. Make sure the \'Google Sitemap\' plugin is enabled in Gallery2.'), $ret); gallery_error(t('Error loading the Gallery2 Sitemap. Make sure the \'Sitemap\' plugin is enabled in Gallery2.'), $ret);
return array(); return;
} }
list($ret, $root_id) = GalleryCoreApi::getDefaultAlbumId(); list($ret, $root) = GalleryCoreApi::getDefaultAlbumId();
if ($ret) { if ($ret) {
gallery_error(t('Error loading the Gallery2 Default Album Id.'), $ret); gallery_error(t('Error calling getDefaultAlbumId()'), $ret);
return array(); return;
} }
// Get the sitemap from Gallery2 // Get the sitemap from Gallery2
ob_start(); ob_start();
$ret = $view->renderSitemap($root_id); $ret = $view->renderSitemap($root);
$g2_sitemap = ob_get_contents(); $g2_sitemap = ob_get_contents();
ob_end_clean(); ob_end_clean();
if ($ret) {
gallery_error(t('Error getting sitemap from Gallery2.'), $ret);
return;
}
return $g2_sitemap; return $g2_sitemap;
} }
...@@ -78,16 +78,37 @@ function _gallery_init($full = FALSE, $vars = NULL, $report_error = TRUE) { ...@@ -78,16 +78,37 @@ function _gallery_init($full = FALSE, $vars = NULL, $report_error = TRUE) {
return FALSE; return FALSE;
} }
include_once($embed_path); // Language-prefix url rewrite
$language = gallery_get_language($user);
if (module_exists('i18n')) { // TODO
$embed_uri = preg_replace('/index.php\?q=/', i18n_path('index.php?q=', $language), $embed_uri);
}
// Prepare array with init parameters
$params = array('embedUri' => $embed_uri, $params = array('embedUri' => $embed_uri,
'g2Uri' => $g2_uri, 'g2Uri' => $g2_uri,
'loginRedirect' => url('user/login', array('query' => drupal_get_destination(), 'absolute' => TRUE)), 'loginRedirect' => url('user/login', array('query' => drupal_get_destination(), 'absolute' => TRUE)),
'activeUserId' => $uid, 'activeUserId' => $uid,
'activeLanguage' => gallery_get_language($user), 'activeLanguage' => $language,
'fullInit' => $full, 'fullInit' => $full,
'apiVersion' => array(1, 2)); 'apiVersion' => array(1, 3));
// Add theme to init parameters
if (($g2_theme = variable_get('gallery_embed_theme', 'default')) != 'default') {
$params['themeId'] = $g2_theme;
}
// Add root album to init parameters (but only for the gallery pages)
$g2_root = variable_get('gallery_root_album', 'default');
if ($g2_root != 'default' && arg(0) == variable_get('gallery_base', 'gallery')) {
$params['defaultAlbumId'] = $params['breadcrumbRootId'] = $g2_root;
}
// Allow modules to alter the init parameters
drupal_alter('gallery_init', $params);
// Initialize Gallery2
include_once($embed_path);
$ret = GalleryEmbed::init($params); $ret = GalleryEmbed::init($params);
if ($ret) { if ($ret) {
if ($ret->getErrorCode() & ERROR_PLUGIN_VERSION_MISMATCH) { if ($ret->getErrorCode() & ERROR_PLUGIN_VERSION_MISMATCH) {
...@@ -104,6 +125,7 @@ function _gallery_init($full = FALSE, $vars = NULL, $report_error = TRUE) { ...@@ -104,6 +125,7 @@ function _gallery_init($full = FALSE, $vars = NULL, $report_error = TRUE) {
} }
} }
// Check if initialization was successful
if (!class_exists('GalleryEmbed') || !class_exists('GalleryCoreApi')) { if (!class_exists('GalleryEmbed') || !class_exists('GalleryCoreApi')) {
if ($report_error) { if ($report_error) {
gallery_error(t('Classes \'GalleryEmbed\' and/or \'GalleryCoreApi\' are not available, gallery_error(t('Classes \'GalleryEmbed\' and/or \'GalleryCoreApi\' are not available,
...@@ -112,6 +134,28 @@ function _gallery_init($full = FALSE, $vars = NULL, $report_error = TRUE) { ...@@ -112,6 +134,28 @@ function _gallery_init($full = FALSE, $vars = NULL, $report_error = TRUE) {
return FALSE; return FALSE;
} }
// Multiroot: 'Virtual Root' (or 'Alternate guest user') view requested
if (isset($params['defaultAlbumId'])) {
$GLOBALS['gallery']->setConfig('defaultAlbumId', $params['defaultAlbumId']);
}
if (isset($params['breadcrumbRootId'])) {
$GLOBALS['gallery']->setConfig('breadcrumbRootId', $params['breadcrumbRootId']);
}
if (isset($params['anonymousUserId'])) {
$GLOBALS['gallery']->setConfig('anonymousUserId', $params['anonymousUserId']);
}
// Set theme for embedded gallery
if ((!$full || !$ready['half']) && isset($params['themeId'])) {
// TODO: G2.3
/*$ret = GalleryEmbed::setThemeForRequest($g2_theme);
if ($ret && $report_error) {
gallery_error(t('Error settings embedded theme (%theme).', array('%theme' => $g2_theme)));
}*/
}
// Allow other modules to perform post-init tasks
module_invoke_all('gallery_init', $full);
$ready['half'] = $full ? ($ready['full'] = TRUE) : TRUE; $ready['half'] = $full ? ($ready['full'] = TRUE) : TRUE;
return TRUE; return TRUE;
...@@ -122,6 +166,12 @@ function _gallery_init($full = FALSE, $vars = NULL, $report_error = TRUE) { ...@@ -122,6 +166,12 @@ function _gallery_init($full = FALSE, $vars = NULL, $report_error = TRUE) {
* (handleRequest extension with error handling) * (handleRequest extension with error handling)
*/ */