Commit d8886446 authored by profix898's avatar profix898

- task: move g2image into its own sub-module

parent 471ba40d
......@@ -17,7 +17,7 @@ define('GALLERY_FILTER_EXACTSIZE_DEFAULT', '');
* Implementation of hook_perm().
*/
function gallery_perm() {
return array('administer gallery settings', 'access gallery', 'access standalone g2image');
return array('administer gallery settings', 'access gallery');
}
/**
......@@ -37,9 +37,6 @@ function gallery_theme() {
'gallery_severity_status_message' => array(
'arguments' => array('severity' => NULL, 'status' => NULL, 'full_msg' => FALSE, 'invert' => FALSE),
),
'gallery_g2image_textarea_link' => array(
'arguments' => array('element' => NULL, 'link' => NULL),
),
'gallery_report' => array(
'arguments' => array('report' => FALSE),
),
......@@ -149,16 +146,6 @@ function gallery_menu() {
'type' => MENU_LOCAL_TASK,
'weight' => 2
);
$items['admin/settings/gallery/g2image'] = array(
'title' => 'G2Image',
'access callback' => 'user_access',
'access arguments' => array('administer gallery settings'),
'file' => 'gallery_settings.inc',
'page callback' => 'drupal_get_form',
'page arguments' => array('_gallery_settings_g2image'),
'type' => MENU_LOCAL_TASK,
'weight' => 3
);
if (module_exists('search')) {
$items['admin/settings/gallery/search'] = array(
'title' => 'Search',
......@@ -435,31 +422,6 @@ function gallery_filter_tips($delta = 0, $format = -1, $long = FALSE) {
return $long ? gallery_filter_long_tip_translated() : gallery_filter_short_tip_translated();
}
/**
* Implementation of hook_elements().
*/
function gallery_elements() {
$type['textarea'] = array('#process' => array('gallery_g2image_textarea'));
return $type;
}
/**
* Function gallery_g2image_textarea().
* (add image link underneath textareas)
*/
function gallery_g2image_textarea($element) {
require_once(drupal_get_path('module', 'gallery') .'/gallery_g2image.inc');
if (_gallery_g2image_page_match() && (arg(0) != variable_get('gallery_base', 'gallery'))
&& (variable_get('gallery_g2image_mode', 'disabled') == 'standalone')
&& (user_access('access standalone g2image'))) {
gallery_g2image_add_js();
$output = theme('gallery_g2image_textarea_link', $element, $link);
$element['#suffix'] .= $output;
}
return $element;
}
/**
* Implementation of hook_block().
*/
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment