summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-05-06 05:17:55 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-05-06 05:17:55 +0000
commit1c85db030e548e6bf7434e86070e4ba05917a325 (patch)
tree283f8df9bc192144c13268213d206e31c92c2b29 /lib
parent220625cedad4bc3a400d9bc0c0c6f0a103b7398f (diff)
downloadampache-1c85db030e548e6bf7434e86070e4ba05917a325.tar.gz
ampache-1c85db030e548e6bf7434e86070e4ba05917a325.tar.bz2
ampache-1c85db030e548e6bf7434e86070e4ba05917a325.zip
added in the ajax-loading div display on catalog processes, also relaxed the restrictions on filenames of non-site_charset, warning rather then fatal error
Diffstat (limited to 'lib')
-rw-r--r--lib/class/catalog.class.php3
-rw-r--r--lib/class/user.class.php2
-rw-r--r--lib/javascript-base.js14
-rw-r--r--lib/ui.lib.php17
4 files changed, 30 insertions, 6 deletions
diff --git a/lib/class/catalog.class.php b/lib/class/catalog.class.php
index 311697cf..bde17ed9 100644
--- a/lib/class/catalog.class.php
+++ b/lib/class/catalog.class.php
@@ -504,7 +504,6 @@ class Catalog {
if (strcmp($full_file,iconv(Config::get('site_charset'),Config::get('site_charset') . '//IGNORE',$full_file)) != '0') {
debug_event('read',$full_file . ' has non-' . Config::get('site_charset') . ' characters and can not be indexed','1');
Error::add('catalog_add',$full_file . ' ' . _('does not match site charset'));
- continue;
}
} // end if iconv
@@ -1395,7 +1394,7 @@ class Catalog {
$file = str_replace(array('(',')','\''),'',$results['file']);
echo "<script type=\"text/javascript\">\n";
echo "update_txt('" . $count ."','clean_count_" . $this->id . "');";
- echo "update_txt('" . htmlentities($file) . "','clean_dir_" . $this->id . "');";
+ echo "update_txt('" . addslashes(htmlentities($file)) . "','clean_dir_" . $this->id . "');";
echo "\n</script>\n";
flush();
} //echos song count
diff --git a/lib/class/user.class.php b/lib/class/user.class.php
index ceeb7332..ae53038c 100644
--- a/lib/class/user.class.php
+++ b/lib/class/user.class.php
@@ -1,7 +1,7 @@
<?php
/*
- Copyright (c) 2001 - 2007 Ampache.org
+ Copyright (c) Ampache.org
All rights reserved.
This program is free software; you can redistribute it and/or
diff --git a/lib/javascript-base.js b/lib/javascript-base.js
index 15587961..fa5c1465 100644
--- a/lib/javascript-base.js
+++ b/lib/javascript-base.js
@@ -1,6 +1,6 @@
//
//
-// Copyright (c) 2001 - 2008 Ampache.org
+// Copyright (c) Ampache.org
// All rights reserved.
//
// This program is free software; you can redistribute it and/or
@@ -49,6 +49,18 @@ function update_txt(value,field) {
document.getElementById(field).innerHTML=value;
}
+// Function for enabling/disabling a div (display:none) used for loading div
+function toggle_visible(element) {
+
+ var obj = document.getElementById(element);
+ if (obj.style.display == 'block') {
+ obj.style.display = 'none';
+ }
+ else {
+ obj.style.display = 'block';
+ }
+}
+
///
// DelayRun
// This function delays the run of another function by X milliseconds
diff --git a/lib/ui.lib.php b/lib/ui.lib.php
index 45ddd521..9cd78d94 100644
--- a/lib/ui.lib.php
+++ b/lib/ui.lib.php
@@ -1,7 +1,7 @@
<?php
/*
- Copyright (c) 2001 - 2007 Ampache.org
+ Copyright (c) Ampache.org
All rights reserved.
This program is free software; you can redistribute it and/or
@@ -898,7 +898,7 @@ function xml_get_footer($type){
break;
}
-} //xml_get_footer
+} // xml_get_footer
/**
* ajax_include
@@ -917,4 +917,17 @@ function ajax_include($include) {
} // ajax_include
+/**
+ * toggle_visible
+ * this is identicla to the javascript command that it actually calls
+ */
+function toggle_visible($element) {
+
+ echo "<script type=\"text/javascript\">\n";
+ echo "toggle_visible('$element');";
+ echo "\n</script>\n";
+
+} // toggle_visible
+
+
?>