1
0
Fork 0
mirror of https://github.com/Yetangitu/ampache synced 2025-10-03 17:59:21 +02:00

fixed the issue with a lack of gettext (define ngettext if it does not exist)

This commit is contained in:
Karl 'vollmerk' Vollmer 2008-03-14 05:44:59 +00:00
parent 94f37cd899
commit e99f7c6112
3 changed files with 13 additions and 0 deletions

View file

@ -81,6 +81,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

View file

@ -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();
}

View file

@ -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();