Add browser_modify hook
authorMichael M Slusarz <slusarz@curecanti.org>
Thu, 11 Nov 2010 18:57:24 +0000 (11:57 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Thu, 11 Nov 2010 19:08:19 +0000 (12:08 -0700)
framework/Core/lib/Horde/Core/Browser.php
horde/config/hooks.php.dist
horde/docs/CHANGES

index 62218e8..e933855 100644 (file)
@@ -51,6 +51,10 @@ class Horde_Core_Browser extends Horde_Browser
                 $this->setQuirk('buggy_compression');
             }
         }
+
+        try {
+            Horde::callHook('browser_modify', array($this), 'horde');
+        } catch (Horde_Exception_HookNotSet $e) {}
     }
 
     /**
index 6fe2609..34db3d1 100644 (file)
@@ -472,6 +472,20 @@ class Horde_Hooks
 
 
     /**
+     * Modify the browser object.
+     *
+     * @param Horde_Core_Browser $browser  The browser object.
+     */
+//    public function browser_modify($browser)
+//    {
+//        // Example #1: Mark all browsers as mobile. Useful if this
+//        // particular Horde installation is dedicated solely to serving
+//        // mobile devices.
+//        $browser->setMobile(true);
+//    }
+
+
+    /**
      * Allow altering or validating data submitted by a user during a signup
      * request before any attempts are made to add them to the system.
      *
index b849cb1..54dcf42 100644 (file)
@@ -2,6 +2,7 @@
 v4.0-cvs
 --------
 
+[mms] Add hook to allow browser capabilities to be modified.
 [jan] Add a configuration switch for automatic creation of default shares.
 [cjh] Move from Net_DNS to Net_DNS2.
 [jan] Translations for the framework packages are now bundled with those