Commit 99f6d489 authored by walkah's avatar walkah

#32618 - dpdev : fix base_url & https bugs

#34301 - kiz_0987 : fix double & encoding in search results
parent 34347387
......@@ -34,6 +34,7 @@ function gallery_menu($may_cache) {
function gallery_settings() {
$output = '';
$output.= form_textfield(t('Location of Gallery2'), 'gallery_dir', variable_get('gallery_dir', 'gallery2/'), 64, 64, t('Path to your gallery2 directory, relative to the root directory of your drupal installation. Please include a trailing slash ("/").'));
$output.= form_textfield(t('Location of Drupal'), 'gallery_drupal_dir', variable_get('gallery_drupal_dir', '/'), 64, 64, t('Path to your drupal directory, relative to the root of your website. Please include a trailing slash ("/").'));
$output .= form_checkboxes(t('Error logging'), 'gallery_error_mode',
variable_get('gallery_error_mode', array(1)),
array(1 => t('Watchdog'),
......@@ -245,10 +246,11 @@ function gallery_search($op = 'search', $keys = null) {
}
}
}
$link = str_replace('&', '&', $urlGenerator->generateUrl(array('itemId' => $result['itemId'])));
$find[] = array('title' => $result['fields'][0]['value'],
'link' => $urlGenerator->generateUrl(array('itemId' => $result['itemId'])),
'type' => $module['name'],
'snippet' => implode('<br />', $excerpt));
'link' => $link,
'type' => $module['name'],
'snippet' => implode('<br />', $excerpt));
}
}
}
......@@ -290,7 +292,7 @@ function gallery_page() {
* fetch a galleryEmbed object
*/
function _gallery_init($full = false) {
global $user, $base_url;
global $user;
$galleryDir = variable_get('gallery_dir', 'gallery2/');
......@@ -307,7 +309,7 @@ function _gallery_init($full = false) {
$relativeG2Path = $galleryDir;
$embedUri = url('gallery');
$embedPath = str_replace('http://'.$_SERVER['HTTP_HOST'], '', $base_url) . '/';
$embedPath =variable_get('gallery_drupal_dir', '/');
$params = array('embedUri' => $embedUri,
'embedPath' => $embedPath,
'relativeG2Path' => $relativeG2Path,
......
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