summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Arthur <flowerysong00@yahoo.com>2012-12-19 12:54:58 -0500
committerPaul Arthur <flowerysong00@yahoo.com>2012-12-19 12:54:58 -0500
commitb423def173c224efa641a2de368cd04149173497 (patch)
tree265c4c33e1dbd88bab21d9054e3dacef3387c148
parentd30249d66f80925414e5a2d39cb55b469e195a02 (diff)
downloadampache-b423def173c224efa641a2de368cd04149173497.tar.gz
ampache-b423def173c224efa641a2de368cd04149173497.tar.bz2
ampache-b423def173c224efa641a2de368cd04149173497.zip
Add a convenience function to generate an AJAX url
-rw-r--r--lib/class/ajax.class.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/class/ajax.class.php b/lib/class/ajax.class.php
index 1ecb2e68..b3cba6f6 100644
--- a/lib/class/ajax.class.php
+++ b/lib/class/ajax.class.php
@@ -81,13 +81,21 @@ class Ajax {
} // observe
/**
+ * url
+ * This takes a string and makes an URL
+ */
+ public static function url($action) {
+ return Config::get('ajax_url') . $action;
+ }
+
+ /**
* action
* This takes the action, the source and the post (if passed) and
* generates the full ajax link
*/
public static function action($action,$source,$post='') {
- $url = Config::get('ajax_url') . $action;
+ $url = self::url($action);
$non_quoted = array('document','window');