diff options
-rw-r--r-- | lib/class/catalog.class.php | 28 | ||||
-rw-r--r-- | lib/init.php | 2 | ||||
-rw-r--r-- | lib/search.php | 2 | ||||
-rw-r--r-- | templates/show_login_form.inc | 2 |
4 files changed, 17 insertions, 17 deletions
diff --git a/lib/class/catalog.class.php b/lib/class/catalog.class.php index 11d69781..af99fcb9 100644 --- a/lib/class/catalog.class.php +++ b/lib/class/catalog.class.php @@ -417,10 +417,10 @@ class Catalog { $this->count++; if ( !($this->count%10)) { $file = str_replace(array('(',')','\''),'',$full_file); - echo "<script type=\"text/javascript\">"; + echo "<script type=\"text/javascript\"><!--"; echo "update_txt('" . $this->count ."','add_count_" . $this->id . "');"; echo "update_txt('" . htmlentities($file) . "','add_dir_" . $this->id . "');"; - echo "</script>\n"; + echo "--></script>\n"; } // update our current state } // not found @@ -532,10 +532,10 @@ class Catalog { /* Stupid little cutesie thing */ $search_count++; if ( !($search_count%5)) { - echo "<script type=\"text/javascript\">"; + echo "<script type=\"text/javascript\"><!--"; echo "update_txt('" . $search_count ."','count_art_" . $this->id . "');"; echo "update_txt('" . $album->name . "','read_art_" . $this->id . "');"; - echo "</script>\n"; + echo "--></script>\n"; flush(); } //echos song count @@ -839,9 +839,9 @@ class Catalog { /* Get the songs and then insert them into the db */ $this->add_files($this->path,$type,$parse_m3u); - echo "<script type=\"text/javascript\">"; + echo "<script type=\"text/javascript\"><!--"; echo "update_txt('" . $this->count . "','count_add_" . $this->id ."');"; - echo "</script>\n"; + echo "--></script>\n"; flush(); @@ -1258,10 +1258,10 @@ class Catalog { $count++; if (!($count%10)) { $file = str_replace(array('(',')','\''),'',$results['file']); - echo "<script type=\"text/javascript\">"; + echo "<script type=\"text/javascript\"><!--"; echo "update_txt('" . $count ."','clean_count_" . $this->id . "');"; echo "update_txt('" . htmlentities($file) . "','clean_dir_" . $this->id . "');"; - echo "</script>\n"; + echo "--></script>\n"; flush(); } //echos song count @@ -1301,9 +1301,9 @@ class Catalog { self::clean($catalog_id); /* Return dead files, so they can be listed */ - echo "<script type=\"text/javascript\">"; + echo "<script type=\"text/javascript\"><!--"; echo "update_txt('" . $count ."','clean_count_" . $this->id . "');"; - echo "</script>\n"; + echo "--></script>\n"; show_box_top(); echo "<strong>" . _('Catalog Clean Done') . " [" . count($dead_files) . "] " . _('files removed') . "</strong><br />\n"; echo "<strong>" . _('Optimizing Tables') . "...</strong><br />\n"; @@ -1563,10 +1563,10 @@ class Catalog { $count++; if (!($count%10) ) { $file = str_replace(array('(',')','\''),'',$song->file); - echo "<script type=\"text/javascript\">"; + echo "<script type=\"text/javascript\"><!--"; echo "update_txt('" . $count . "','verify_count_" . $catalog_id . "');"; echo "update_txt('" . scrub_out($file) . "','verify_dir_" . $catalog_id . "');"; - echo "</script>\n"; + echo "--></script>\n"; flush(); } //echos song count @@ -1586,9 +1586,9 @@ class Catalog { $this->update_last_update(); // One final time! - echo "<script type=\"text/javascript\">"; + echo "<script type=\"text/javascript\"><!--"; echo "update_txt('" . $this->count . "','count_verify_" . $this->id . "');"; - echo "</script>\n"; + echo "--></script>\n"; flush(); show_box_top(); diff --git a/lib/init.php b/lib/init.php index 0f87d82d..ad4a913e 100644 --- a/lib/init.php +++ b/lib/init.php @@ -37,7 +37,7 @@ require_once $prefix . '/lib/class/config.class.php'; /* Check to see if this is Http or https */ -if ($_SERVER['HTTPS'] == 'on') { +if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') { $http_type = "https://"; } else { diff --git a/lib/search.php b/lib/search.php index e9f76461..65899340 100644 --- a/lib/search.php +++ b/lib/search.php @@ -122,7 +122,7 @@ function search_song($data,$operator,$method,$limit) { case 'all': /* artist, title, and album, anyway.. */ $value_words = explode(' ', $value); $where_sql .= " ( "; - $ii == 0; + $ii = 0; foreach($value_words as $word) { if($ii++ > 0) diff --git a/templates/show_login_form.inc b/templates/show_login_form.inc index 076bc1b1..c4599821 100644 --- a/templates/show_login_form.inc +++ b/templates/show_login_form.inc @@ -27,7 +27,7 @@ if (Config::get('session_length') >= Config::get('remember_length')) { $htmllang = str_replace("_","-",Config::get('lang')); ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $htmllang; ?>" lang="<?php echo $htmllang; ?>"> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo Config::get('site_charset'); ?>" /> |