diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2008-03-14 05:44:59 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2008-03-14 05:44:59 +0000 |
commit | e99f7c6112a463e51be0aafecdc5189578c7373f (patch) | |
tree | 3a12776d0b6d4d5bcfd83897b39662d40139d871 | |
parent | 94f37cd899d3b5bf8b95f837f0f25839f4556f48 (diff) | |
download | ampache-e99f7c6112a463e51be0aafecdc5189578c7373f.tar.gz ampache-e99f7c6112a463e51be0aafecdc5189578c7373f.tar.bz2 ampache-e99f7c6112a463e51be0aafecdc5189578c7373f.zip |
fixed the issue with a lack of gettext (define ngettext if it does not exist)
-rw-r--r-- | lib/ui.lib.php | 10 | ||||
-rw-r--r-- | play/index.php | 1 | ||||
-rw-r--r-- | server/democratic.ajax.php | 2 |
3 files changed, 13 insertions, 0 deletions
diff --git a/lib/ui.lib.php b/lib/ui.lib.php index 68092b71..9e7e5cb1 100644 --- a/lib/ui.lib.php +++ b/lib/ui.lib.php @@ -82,6 +82,16 @@ if (!function_exists('_')) { } // if _ isn't defined /** + * ngettext + * checks for ngettext and defines it if it doesn't exist + */ +if (!function_exists('ngettext')) { + function ngettext($string) { + return $string; + } +} // if no ngettext + +/** * access_denied * throws an error if they try to do something * that they aren't allowed to diff --git a/play/index.php b/play/index.php index 2750cec5..77f34f67 100644 --- a/play/index.php +++ b/play/index.php @@ -103,6 +103,7 @@ if (Config::get('access_control')) { */ if ($demo_id) { $democratic = new Democratic($demo_id); + $democratic->set_parent(); /* This takes into account votes etc and removes the */ $song_id = $democratic->get_next_object(); } diff --git a/server/democratic.ajax.php b/server/democratic.ajax.php index e7bd745b..ccb22b9c 100644 --- a/server/democratic.ajax.php +++ b/server/democratic.ajax.php @@ -27,6 +27,7 @@ if (AJAX_INCLUDE != '1') { exit; } switch ($_REQUEST['action']) { case 'delete_vote': $democratic = Democratic::get_current_playlist(); + $democratic->set_parent(); $democratic->remove_vote($_REQUEST['row_id']); ob_start(); @@ -39,6 +40,7 @@ switch ($_REQUEST['action']) { case 'add_vote': $democratic = Democratic::get_current_playlist(); + $democratic->set_parent(); $democratic->add_vote($_REQUEST['object_id'],$_REQUEST['type']); ob_start(); |