Link logo to configured log url.
authorJan Schneider <jan@horde.org>
Wed, 24 Feb 2010 18:36:06 +0000 (19:36 +0100)
committerJan Schneider <jan@horde.org>
Wed, 24 Feb 2010 18:36:06 +0000 (19:36 +0100)
kronolith/js/kronolith.js
kronolith/lib/Kronolith.php

index ec4dfd4..c5c0226 100644 (file)
@@ -2604,7 +2604,11 @@ KronolithCore = {
 
             switch (id) {
             case 'kronolithLogo':
-                this.go(Kronolith.conf.login_view);
+                if (Kronolith.conf.URI_HOME) {
+                    this.redirect(Kronolith.conf.URI_HOME);
+                } else {
+                    this.go(Kronolith.conf.login_view);
+                }
                 e.stop();
                 return;
 
index 19241e9..8387235 100644 (file)
@@ -190,6 +190,7 @@ class Kronolith
             'URI_CALENDAR_EXPORT' => (string)Horde::url('data.php', true)->add(array('actionID' => 'export', 'all_events' => 1, 'exportID' => Horde_Data::EXPORT_ICALENDAR, 'exportCal' => '')),
             'URI_EVENT_EXPORT' => str_replace(array('%23', '%7B', '%7D'), array('#', '{', '}'), Horde::url('event.php', true)->add(array('view' => 'ExportEvent', 'eventID' => '#{id}', 'calendar' => '#{calendar}', 'type' => '#{type}'))),
             'SESSION_ID' => defined('SID') ? SID : '',
+
             'user' => Horde_Auth::getAuth(),
             'prefs_url' => str_replace('&amp;', '&', Horde::getServiceLink('options', 'kronolith')),
             'app_urls' => $app_urls,
@@ -223,6 +224,9 @@ class Kronolith
                               '360' => _("6 hours"),
                               '1440' => _("1 day")),
         );
+        if (!empty($GLOBALS['conf']['logo']['link'])) {
+            $code['conf']['URI_HOME'] = $GLOBALS['conf']['logo']['link'];
+        }
 
         if ($has_tasks) {
             $code['conf']['tasks'] = $registry->tasks->ajaxDefaults();