Add form token to generated prefs URL
authorMichael M Slusarz <slusarz@curecanti.org>
Tue, 18 Jan 2011 07:27:59 +0000 (00:27 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Tue, 18 Jan 2011 07:27:59 +0000 (00:27 -0700)
framework/Core/lib/Horde/Core/Prefs/Ui.php

index 0d5bd1c..54777c0 100644 (file)
@@ -342,6 +342,7 @@ class Horde_Core_Prefs_Ui
      * <pre>
      * 'special' - (boolean) If set, will trigger special action update
      *             processing when the URL is loaded.
+     * 'token' - (boolean) If set, includes the form token in the URL.
      * </pre>
      *
      * @return Horde_Url  The URL object.
@@ -355,6 +356,9 @@ class Horde_Core_Prefs_Ui
         if (!empty($options['special'])) {
             $url->add('actionID', 'update_special');
         }
+        if (!empty($options['token'])) {
+            $url->add('horde_prefs_token', $GLOBALS['injector']->getInstance('Horde_Token')->get('horde.prefs'));
+        }
         return $url;
     }