From 78167c02518ff9d757741f0e8df524da300d067d Mon Sep 17 00:00:00 2001 From: Karl 'vollmerk' Vollmer Date: Sat, 14 Oct 2006 17:29:07 +0000 Subject: removed extra lines from ajax, down to 86, updated ajax calls, added ldap auth --- lib/general.lib.php | 5 +++++ lib/gettext.php | 20 ++++++++++++++++---- lib/init.php | 8 +++++++- 3 files changed, 28 insertions(+), 5 deletions(-) (limited to 'lib') diff --git a/lib/general.lib.php b/lib/general.lib.php index ab28eebb..7923a96d 100644 --- a/lib/general.lib.php +++ b/lib/general.lib.php @@ -399,6 +399,11 @@ function clean_tag_info($results,$key,$filename) { $info['track'] = intval($results[$key]['track']); $info['comment'] = sql_escape(str_replace($clean_array,$wipe_array,$results[$key]['comment'])); + if (strlen($info['comment']) > 254) { + debug_event('catalog','Error: Comment over 254 Char, truncating',4); + $info['comment'] = substr($info['comment'],0,254); + } + /* This are pulled from the info array */ $info['bitrate'] = intval($results['info']['bitrate']); $info['rate'] = intval($results['info']['sample_rate']); diff --git a/lib/gettext.php b/lib/gettext.php index 56e175e9..4af41a59 100644 --- a/lib/gettext.php +++ b/lib/gettext.php @@ -27,13 +27,25 @@ function load_gettext() { /* If we have gettext */ if (function_exists('bindtextdomain')) { - bindtextdomain('messages', conf('prefix') . "/locale/"); - textdomain('messages'); $lang = conf('lang'); putenv("LANG=" . $lang); + putenv("LANGUAGE=" . $lang); /* Try lang, lang + charset and lang + utf-8 */ - setlocale(LC_ALL, $lang,$lang . '.'. conf('site_charset'),$lang . '.UTF-8',$lang . '.' . conf('lc_charset')); - } + setlocale(LC_ALL, + $lang, + $lang . '.'. conf('site_charset'), + $lang . '.UTF-8', + $lang . '.utf-8', + $lang . '.' . conf('lc_charset')); + + /* Bind the Text Domain */ + bindtextdomain('messages', conf('prefix') . "/locale/"); + textdomain('messages'); + if (function_exists('bind_textdomain_codeset')) { + bind_textdomain_codeset('messages',conf('site_charset')); + } // if we can codeset the textdomain + + } // If bindtext domain exists } // load_gettext diff --git a/lib/init.php b/lib/init.php index e88da245..9bd90a4d 100644 --- a/lib/init.php +++ b/lib/init.php @@ -80,7 +80,7 @@ if (!$results['allow_stream_playback']) { /** This is the version.... fluf nothing more... **/ -$results['version'] = '3.3.3-Alpha1'; +$results['version'] = '3.3.3-Alpha1 (Build 002)'; $results['raw_web_path'] = $results['web_path']; $results['web_path'] = $http_type . $_SERVER['HTTP_HOST'] . $results['web_path']; @@ -113,6 +113,12 @@ if (!$results['raw_web_path']) { if (!$_SERVER['SERVER_NAME']) { $_SERVER['SERVER_NAME'] = ''; } +if (!isset($results['auth_methods'])) { + $results['auth_methods'] = 'mysql'; +} +if (!is_array($results['auth_methods'])) { + $results['auth_methods'] = array($results['auth_methods']); +} /* Variables needed for vauth Module */ $results['cookie_path'] = $results['raw_web_path']; -- cgit