mirror of
https://github.com/Yetangitu/ampache
synced 2025-10-05 19:41:55 +02:00
Update getID3 to 1.9.4b1
Notably: "PHP5 standards improvements". Maybe it will throw less PHP warnings now.
This commit is contained in:
parent
866e7f4a1c
commit
10b2d039d4
76 changed files with 2688 additions and 2363 deletions
|
@ -74,12 +74,12 @@ class getID3_cached_mysql extends getID3
|
|||
{
|
||||
|
||||
// private vars
|
||||
var $cursor;
|
||||
var $connection;
|
||||
private $cursor;
|
||||
private $connection;
|
||||
|
||||
|
||||
// public: constructor - see top of this file for cache type and cache_options
|
||||
function getID3_cached_mysql($host, $database, $username, $password, $table='getid3_cache') {
|
||||
public function getID3_cached_mysql($host, $database, $username, $password, $table='getid3_cache') {
|
||||
|
||||
// Check for mysql support
|
||||
if (!function_exists('mysql_pconnect')) {
|
||||
|
@ -118,7 +118,7 @@ class getID3_cached_mysql extends getID3
|
|||
|
||||
|
||||
// public: clear cache
|
||||
function clear_cache() {
|
||||
public function clear_cache() {
|
||||
|
||||
$this->cursor = mysql_query("DELETE FROM `".mysql_real_escape_string($this->table)."`", $this->connection);
|
||||
$this->cursor = mysql_query("INSERT INTO `".mysql_real_escape_string($this->table)."` VALUES ('".getID3::VERSION."', -1, -1, -1, '".getID3::VERSION."')", $this->connection);
|
||||
|
@ -127,7 +127,7 @@ class getID3_cached_mysql extends getID3
|
|||
|
||||
|
||||
// public: analyze file
|
||||
function analyze($filename) {
|
||||
public function analyze($filename) {
|
||||
|
||||
if (file_exists($filename)) {
|
||||
|
||||
|
@ -157,7 +157,7 @@ class getID3_cached_mysql extends getID3
|
|||
|
||||
|
||||
// private: (re)create sql table
|
||||
function create_table($drop=false) {
|
||||
private function create_table($drop=false) {
|
||||
|
||||
$this->cursor = mysql_query("CREATE TABLE IF NOT EXISTS `".mysql_real_escape_string($this->table)."` (
|
||||
`filename` VARCHAR(255) NOT NULL DEFAULT '',
|
||||
|
@ -165,9 +165,7 @@ class getID3_cached_mysql extends getID3
|
|||
`filetime` INT(11) NOT NULL DEFAULT '0',
|
||||
`analyzetime` INT(11) NOT NULL DEFAULT '0',
|
||||
`value` TEXT NOT NULL,
|
||||
PRIMARY KEY (`filename`,`filesize`,`filetime`)) TYPE=MyISAM", $this->connection);
|
||||
PRIMARY KEY (`filename`,`filesize`,`filetime`)) ENGINE=MyISAM", $this->connection);
|
||||
echo mysql_error($this->connection);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
Loading…
Add table
Add a link
Reference in a new issue