Commit dafc0eb8 authored by profix898's avatar profix898

- feature: Slovak translation (#353157 by etki)

- bugfix: gallery cause a Fatal error on a logout (#352239)
- task: intermediate support for WYSIWYG module in G2Image settings (#350100)
parent 34b3edee
......@@ -45,8 +45,11 @@ function gallery_login() {
*/
function gallery_logout() {
if (variable_get('gallery_valid', FALSE)) {
require_once(variable_get('gallery_dir', './gallery2/') .'embed.php');
GalleryEmbed::logout();
$embed_path = variable_get('gallery_dir', './gallery2/') .'embed.php';
if (is_readable($embed_path)) {
require_once($embed_path);
GalleryEmbed::logout();
}
}
}
......
......@@ -202,7 +202,11 @@ function _gallery_g2image_settings_validate($form, &$form_state) {
switch ($form_state['values']['gallery_g2image_mode']) {
case 'tinymce':
$mode = t('TinyMCE');
$path = drupal_get_path('module', 'tinymce');
if (module_exists('tinymce')) {
$path = drupal_get_path('module', 'tinymce');
} else if (module_exists('wysiwyg')) {
$path = drupal_get_path('module', 'wysiwyg');
}
$path .= '/tinymce/jscripts/tiny_mce/plugins/g2image';
break;
case 'standalone':
......@@ -313,6 +317,13 @@ function _gallery_g2image_path($path = NULL) {
if (!file_exists($path .'/config.php') && !file_check_directory($path)) {
$path = NULL;
}
} else if (module_exists('wysiwyg')) {
// WYSIWYG folder for G2Image plugin
$path = drupal_get_path('module', 'wysiwyg');
$path .= '/tinymce/jscripts/tiny_mce/plugins/g2image';
if (!file_exists($path .'/config.php') && !file_check_directory($path)) {
$path = NULL;
}
}
}
}
......
......@@ -203,7 +203,7 @@ function _gallery_menu_traverse($tree, &$items) {
}
$album = gallery_item_details($id);
$item = array(
'link_title' => $album['title'],
'link_title' => empty($album['title']) ? t('Album @id', array('@id' => $id)) : $album['title'],
'link_path' => $path,
'module' => 'gallery_menu'
);
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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