diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2009-03-08 05:08:21 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2009-03-08 05:08:21 +0000 |
commit | 2a83cc96dc9c2588c5f3ad02d73c59f2ab19c58b (patch) | |
tree | c6aee35e8c830125d9fe109c92ffab20ff31c6ac | |
parent | 2799c89f58d389ac659c0bc414a86cb1454afd75 (diff) | |
download | ampache-2a83cc96dc9c2588c5f3ad02d73c59f2ab19c58b.tar.gz ampache-2a83cc96dc9c2588c5f3ad02d73c59f2ab19c58b.tar.bz2 ampache-2a83cc96dc9c2588c5f3ad02d73c59f2ab19c58b.zip |
more work for alpha2 release, clean up install and debug a bit
-rw-r--r-- | install.php | 1 | ||||
-rw-r--r-- | lib/class/error.class.php | 1 | ||||
-rw-r--r-- | lib/debug.lib.php | 49 | ||||
-rw-r--r-- | sql/ampache.sql | 232 | ||||
-rw-r--r-- | sql/ampache40.sql | 252 | ||||
-rw-r--r-- | templates/install.css | 14 | ||||
-rw-r--r-- | templates/show_install.inc.php | 2 | ||||
-rw-r--r-- | templates/show_install_check.inc.php | 112 | ||||
-rw-r--r-- | templates/show_install_config.inc.php | 12 | ||||
-rw-r--r-- | templates/show_install_lang.inc.php | 114 | ||||
-rw-r--r-- | templates/show_test.inc.php | 64 |
11 files changed, 564 insertions, 289 deletions
diff --git a/install.php b/install.php index a544b2ce..77a91b1a 100644 --- a/install.php +++ b/install.php @@ -24,6 +24,7 @@ error_reporting(E_ALL ^ E_NOTICE); require_once 'lib/general.lib.php'; require_once 'lib/class/config.class.php'; +require_once 'lib/class/error.class.php'; require_once 'lib/class/vauth.class.php'; require_once 'lib/class/database_object.abstract.php'; require_once 'lib/ui.lib.php'; diff --git a/lib/class/error.class.php b/lib/class/error.class.php index 2c4679ec..443ea0e8 100644 --- a/lib/class/error.class.php +++ b/lib/class/error.class.php @@ -134,5 +134,4 @@ class Error { } // auto_init - } // Error diff --git a/lib/debug.lib.php b/lib/debug.lib.php index 74d6d3ee..30efc8a7 100644 --- a/lib/debug.lib.php +++ b/lib/debug.lib.php @@ -79,6 +79,11 @@ function check_php_ver($level=0) { if (floatval(phpversion()) < 5.1) { return false; } + + // Poor windows users if only their OS wasn't behind the times + if (strtoupper(substr(PHP_OS,0,3)) == 'WIN' AND floatval(phpversion()) < 5.3) { + return false; + } // Make sure that they have the sha256() algo installed if (!function_exists('hash_algos')) { return false; } @@ -228,6 +233,34 @@ function check_putenv() { } // check_putenv /** + * check_gettext + * This checks to see if you've got gettext installed + */ +function check_gettext() { + + if (!function_exists('gettext')) { + return false; + } + + return true; + +} // check_gettext + +/** + * check_mbstring + * This checks for mbstring support + */ +function check_mbstring() { + + if (!function_exists('mb_check_encoding')) { + return false; + } + + return true; + +} // check_mbstring + +/** * generate_config * This takes an array of results and re-generates the config file * this is used by the installer and by the admin/system page @@ -272,4 +305,20 @@ function generate_config($current) { } // generate_config +/** + * debug_ok + * Return an "OK" with the specified string + */ +function debug_result($comment,$status=false,$value=false) { + + $class = $status ? 'ok' : 'notok'; + if (!$value) { + $value = $status ? 'OK' : 'ERROR'; + } + + $final = '<span class="' . $class . '">' . scrub_out($value) . '</span> <em>' . scrub_out($comment) . '</em>'; + + return $final; + +} // debug_ok ?> diff --git a/sql/ampache.sql b/sql/ampache.sql index 9a306f4f..a08dc189 100644 --- a/sql/ampache.sql +++ b/sql/ampache.sql @@ -17,7 +17,7 @@ -- -- Host: localhost Database: ampache -- ------------------------------------------------------ --- Server version 5.0.51a-6-log +-- Server version 5.0.77-1-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -40,18 +40,19 @@ SET character_set_client = utf8; CREATE TABLE `access_list` ( `id` int(11) unsigned NOT NULL auto_increment, `name` varchar(255) character set utf8 default NULL, - `start` int(11) unsigned NOT NULL default '0', - `end` int(11) unsigned NOT NULL default '0', - `dns` varchar(255) character set utf8 default NULL, + `start` varbinary(255) NOT NULL, + `end` varbinary(255) NOT NULL, `level` smallint(3) unsigned NOT NULL default '5', `type` varchar(64) character set utf8 default NULL, `user` int(11) NOT NULL, `key` varchar(255) character set utf8 default NULL, + `enabled` tinyint(1) unsigned NOT NULL default '1', PRIMARY KEY (`id`), KEY `start` (`start`), KEY `end` (`end`), - KEY `level` (`level`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + KEY `level` (`level`), + KEY `enabled` (`enabled`) +) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; SET character_set_client = @saved_cs_client; -- @@ -60,6 +61,7 @@ SET character_set_client = @saved_cs_client; LOCK TABLES `access_list` WRITE; /*!40000 ALTER TABLE `access_list` DISABLE KEYS */; +INSERT INTO `access_list` VALUES (1,'DEFAULTv4','\0\0\0\0','ÿÿÿÿ',75,'interface',-1,NULL,1),(2,'DEFAULTv4','\0\0\0\0','ÿÿÿÿ',75,'stream',-1,NULL,1),(3,'DEFAULTv6','\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0','ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ',75,'interface',-1,NULL,1),(4,'DEFAULTv6','\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0','ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ',75,'stream',-1,NULL,1); /*!40000 ALTER TABLE `access_list` ENABLE KEYS */; UNLOCK TABLES; @@ -73,7 +75,7 @@ SET character_set_client = utf8; CREATE TABLE `album` ( `id` int(11) unsigned NOT NULL auto_increment, `name` varchar(255) character set utf8 default NULL, - `prefix` enum('The','An','A','Der','Die','Das','Ein','Eine') character set utf8 default NULL, + `prefix` varchar(32) collate utf8_unicode_ci default NULL, `year` int(4) unsigned NOT NULL default '1984', `disk` smallint(5) unsigned default NULL, PRIMARY KEY (`id`), @@ -103,7 +105,7 @@ CREATE TABLE `album_data` ( `album_id` int(11) unsigned NOT NULL, `art` mediumblob, `art_mime` varchar(64) character set utf8 default NULL, - `thumb` blob, + `thumb` mediumblob, `thumb_mime` varchar(64) character set utf8 default NULL, UNIQUE KEY `album_id` (`album_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -128,7 +130,7 @@ SET character_set_client = utf8; CREATE TABLE `artist` ( `id` int(11) unsigned NOT NULL auto_increment, `name` varchar(255) character set utf8 default NULL, - `prefix` enum('The','An','A','Der','Die','Das','Ein','Eine') character set utf8 default NULL, + `prefix` varchar(32) collate utf8_unicode_ci default NULL, PRIMARY KEY (`id`), KEY `name` (`name`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -154,7 +156,7 @@ CREATE TABLE `artist_data` ( `artist_id` int(11) unsigned NOT NULL, `art` mediumblob NOT NULL, `art_mime` varchar(32) character set utf8 default NULL, - `thumb` blob NOT NULL, + `thumb` mediumblob, `thumb_mime` varchar(32) character set utf8 default NULL, `bio` text collate utf8_unicode_ci NOT NULL, UNIQUE KEY `artist_id` (`artist_id`) @@ -181,9 +183,9 @@ CREATE TABLE `catalog` ( `id` int(11) unsigned NOT NULL auto_increment, `name` varchar(128) character set utf8 default NULL, `path` varchar(255) character set utf8 default NULL, - `add_path` varchar(255) character set utf8 default NULL, `catalog_type` enum('local','remote') character set utf8 default NULL, `last_update` int(11) unsigned NOT NULL default '0', + `last_clean` int(11) unsigned default NULL, `last_add` int(11) unsigned NOT NULL default '0', `enabled` tinyint(1) unsigned NOT NULL default '1', `rename_pattern` varchar(255) character set utf8 default NULL, @@ -235,6 +237,59 @@ LOCK TABLES `democratic` WRITE; UNLOCK TABLES; -- +-- Table structure for table `dynamic_playlist` +-- + +DROP TABLE IF EXISTS `dynamic_playlist`; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +CREATE TABLE `dynamic_playlist` ( + `id` int(11) unsigned NOT NULL auto_increment, + `name` varchar(255) collate utf8_unicode_ci NOT NULL, + `user` int(11) NOT NULL, + `date` int(11) unsigned NOT NULL, + `type` varchar(128) collate utf8_unicode_ci NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +SET character_set_client = @saved_cs_client; + +-- +-- Dumping data for table `dynamic_playlist` +-- + +LOCK TABLES `dynamic_playlist` WRITE; +/*!40000 ALTER TABLE `dynamic_playlist` DISABLE KEYS */; +/*!40000 ALTER TABLE `dynamic_playlist` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `dynamic_playlist_data` +-- + +DROP TABLE IF EXISTS `dynamic_playlist_data`; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +CREATE TABLE `dynamic_playlist_data` ( + `id` int(11) unsigned NOT NULL auto_increment, + `dynamic_id` int(11) unsigned NOT NULL, + `field` varchar(255) collate utf8_unicode_ci NOT NULL, + `internal_operator` varchar(64) collate utf8_unicode_ci NOT NULL, + `external_operator` varchar(64) collate utf8_unicode_ci NOT NULL, + `value` varchar(255) collate utf8_unicode_ci NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +SET character_set_client = @saved_cs_client; + +-- +-- Dumping data for table `dynamic_playlist_data` +-- + +LOCK TABLES `dynamic_playlist_data` WRITE; +/*!40000 ALTER TABLE `dynamic_playlist_data` DISABLE KEYS */; +/*!40000 ALTER TABLE `dynamic_playlist_data` ENABLE KEYS */; +UNLOCK TABLES; + +-- -- Table structure for table `flagged` -- @@ -268,30 +323,6 @@ LOCK TABLES `flagged` WRITE; UNLOCK TABLES; -- --- Table structure for table `genre` --- - -DROP TABLE IF EXISTS `genre`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; -CREATE TABLE `genre` ( - `id` int(11) unsigned NOT NULL auto_increment, - `name` varchar(255) character set utf8 default NULL, - PRIMARY KEY (`id`), - KEY `name` (`name`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -SET character_set_client = @saved_cs_client; - --- --- Dumping data for table `genre` --- - -LOCK TABLES `genre` WRITE; -/*!40000 ALTER TABLE `genre` DISABLE KEYS */; -/*!40000 ALTER TABLE `genre` ENABLE KEYS */; -UNLOCK TABLES; - --- -- Table structure for table `ip_history` -- @@ -301,8 +332,9 @@ SET character_set_client = utf8; CREATE TABLE `ip_history` ( `id` int(11) unsigned NOT NULL auto_increment, `user` int(11) NOT NULL, - `ip` int(11) unsigned NOT NULL default '0', + `ip` varbinary(255) default NULL, `date` int(11) unsigned NOT NULL default '0', + `agent` varchar(255) collate utf8_unicode_ci default NULL, PRIMARY KEY (`id`), KEY `username` (`user`), KEY `date` (`date`), @@ -418,7 +450,6 @@ CREATE TABLE `playlist` ( `name` varchar(128) character set utf8 default NULL, `user` int(11) NOT NULL, `type` enum('private','public') character set utf8 default NULL, - `genre` int(11) unsigned NOT NULL, `date` int(11) unsigned NOT NULL, PRIMARY KEY (`id`), KEY `name` (`name`), @@ -447,7 +478,6 @@ CREATE TABLE `playlist_data` ( `playlist` int(11) unsigned NOT NULL default '0', `object_id` int(11) unsigned default NULL, `object_type` varchar(32) character set utf8 default NULL, - `dynamic_song` text collate utf8_unicode_ci, `track` int(11) unsigned NOT NULL default '0', PRIMARY KEY (`id`), KEY `playlist` (`playlist`) @@ -481,7 +511,7 @@ CREATE TABLE `preference` ( PRIMARY KEY (`id`), KEY `catagory` (`catagory`), KEY `name` (`name`) -) ENGINE=MyISAM AUTO_INCREMENT=56 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=MyISAM AUTO_INCREMENT=70 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; SET character_set_client = @saved_cs_client; -- @@ -490,7 +520,7 @@ SET character_set_client = @saved_cs_client; LOCK TABLES `preference` WRITE; /*!40000 ALTER TABLE `preference` DISABLE KEYS */; -INSERT INTO `preference` VALUES (1,'download','0','Allow Downloads',100,'boolean','options'),(4,'popular_threshold','10','Popular Threshold',25,'integer','interface'),(19,'sample_rate','32','Transcode Bitrate',25,'string','streaming'),(22,'site_title','Ampache :: Pour l\'Amour de la Musique','Website Title',100,'string','system'),(23,'lock_songs','0','Lock Songs',100,'boolean','system'),(24,'force_http_play','1','Forces Http play regardless of port',100,'boolean','system'),(25,'http_port','80','Non-Standard Http Port',100,'integer','system'),(41,'localplay_controller','0','Localplay Type',100,'special','options'),(29,'play_type','stream','Type of Playback',25,'special','streaming'),(31,'lang','en_US','Language',100,'special','interface'),(32,'playlist_type','m3u','Playlist Type',100,'special','playlist'),(33,'theme_name','classic','Theme',0,'special','interface'),(34,'ellipse_threshold_album','27','Album Ellipse Threshold',0,'integer','interface'),(35,'ellipse_threshold_artist','27','Artist Ellipse Threshold',0,'integer','interface'),(36,'ellipse_threshold_title','27','Title Ellipse Threshold',0,'integer','interface'),(51,'offset_limit','50','Offset Limit',5,'integer','interface'),(40,'localplay_level','0','Localplay Access',100,'special','options'),(44,'allow_stream_playback','1','Allow Streaming',100,'boolean','system'),(45,'allow_democratic_playback','0','Allow Democratic Play',100,'boolean','system'),(46,'allow_localplay_playback','0','Allow Localplay Play',100,'boolean','system'),(47,'stats_threshold','7','Statistics Day Threshold',25,'integer','interface'),(49,'min_object_count','1','Min Element Count',5,'integer','interface'),(52,'rate_limit','8192','Rate Limit',100,'integer','streaming'),(53,'playlist_method','default','Playlist Method',5,'string','playlist'),(55,'transcode','default','Transcoding',25,'string','streaming'),(57,'tags_userlist','','User to track', 0, 'string', 'tags'),(69,'show_lyrics','0','Show Lyrics',0,'boolean','interface'); +INSERT INTO `preference` VALUES (1,'download','0','Allow Downloads',100,'boolean','options'),(4,'popular_threshold','10','Popular Threshold',25,'integer','interface'),(19,'sample_rate','32','Transcode Bitrate',25,'string','streaming'),(22,'site_title','Ampache :: Pour l\'Amour de la Musique','Website Title',100,'string','system'),(23,'lock_songs','0','Lock Songs',100,'boolean','system'),(24,'force_http_play','1','Forces Http play regardless of port',100,'boolean','system'),(25,'http_port','80','Non-Standard Http Port',100,'integer','system'),(41,'localplay_controller','0','Localplay Type',100,'special','options'),(29,'play_type','stream','Type of Playback',25,'special','streaming'),(31,'lang','en_US','Language',100,'special','interface'),(32,'playlist_type','m3u','Playlist Type',100,'special','playlist'),(33,'theme_name','classic','Theme',0,'special','interface'),(34,'ellipse_threshold_album','27','Album Ellipse Threshold',0,'integer','interface'),(35,'ellipse_threshold_artist','27','Artist Ellipse Threshold',0,'integer','interface'),(36,'ellipse_threshold_title','27','Title Ellipse Threshold',0,'integer','interface'),(51,'offset_limit','50','Offset Limit',5,'integer','interface'),(40,'localplay_level','0','Localplay Access',100,'special','options'),(44,'allow_stream_playback','1','Allow Streaming',100,'boolean','system'),(45,'allow_democratic_playback','0','Allow Democratic Play',100,'boolean','system'),(46,'allow_localplay_playback','0','Allow Localplay Play',100,'boolean','system'),(47,'stats_threshold','7','Statistics Day Threshold',25,'integer','interface'),(49,'min_object_count','1','Min Element Count',5,'integer','interface'),(52,'rate_limit','8192','Rate Limit',100,'integer','streaming'),(53,'playlist_method','default','Playlist Method',5,'string','playlist'),(55,'transcode','default','Transcoding',25,'string','streaming'),(57,'tags_userlist','','User to track',0,'string','tags'),(69,'show_lyrics','0','Show Lyrics',0,'boolean','interface'); /*!40000 ALTER TABLE `preference` ENABLE KEYS */; UNLOCK TABLES; @@ -533,7 +563,7 @@ CREATE TABLE `session` ( `username` varchar(16) character set utf8 default NULL, `expire` int(11) unsigned NOT NULL default '0', `value` longtext collate utf8_unicode_ci NOT NULL, - `ip` int(11) unsigned default NULL, + `ip` varbinary(255) default NULL, `type` enum('mysql','ldap','http','api','xml-rpc') character set utf8 default NULL, `agent` varchar(255) character set utf8 default NULL, PRIMARY KEY (`id`), @@ -563,7 +593,7 @@ CREATE TABLE `session_stream` ( `user` int(11) unsigned NOT NULL, `agent` varchar(255) character set utf8 default NULL, `expire` int(11) unsigned NOT NULL, - `ip` int(11) unsigned default NULL, + `ip` varbinary(255) default NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; SET character_set_client = @saved_cs_client; @@ -598,14 +628,12 @@ CREATE TABLE `song` ( `size` int(11) unsigned NOT NULL default '0', `time` smallint(5) unsigned NOT NULL default '0', `track` smallint(5) unsigned default NULL, - `genre` int(11) unsigned default NULL, `played` tinyint(1) unsigned NOT NULL default '0', `enabled` tinyint(1) unsigned NOT NULL default '1', `update_time` int(11) unsigned default '0', `addition_time` int(11) unsigned default '0', `hash` varchar(64) character set utf8 default NULL, PRIMARY KEY (`id`), - KEY `genre` (`genre`), KEY `album` (`album`), KEY `artist` (`artist`), KEY `file` (`file`), @@ -654,6 +682,30 @@ LOCK TABLES `song_data` WRITE; UNLOCK TABLES; -- +-- Table structure for table `tag` +-- + +DROP TABLE IF EXISTS `tag`; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +CREATE TABLE `tag` ( + `id` int(11) unsigned NOT NULL auto_increment, + `name` varchar(255) collate utf8_unicode_ci default NULL, + UNIQUE KEY `name` (`name`), + KEY `map_id` (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +SET character_set_client = @saved_cs_client; + +-- +-- Dumping data for table `tag` +-- + +LOCK TABLES `tag` WRITE; +/*!40000 ALTER TABLE `tag` DISABLE KEYS */; +/*!40000 ALTER TABLE `tag` ENABLE KEYS */; +UNLOCK TABLES; + +-- -- Table structure for table `tag_map` -- @@ -684,28 +736,26 @@ LOCK TABLES `tag_map` WRITE; UNLOCK TABLES; -- --- Table structure for table `tags` +-- Table structure for table `tmp_browse` -- -DROP TABLE IF EXISTS `tags`; +DROP TABLE IF EXISTS `tmp_browse`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; -CREATE TABLE `tags` ( - `map_id` int(11) unsigned NOT NULL auto_increment, - `name` varchar(32) character set utf8 default NULL, - `order` tinyint(2) NOT NULL, - KEY `order` (`order`), - KEY `map_id` (`map_id`) +CREATE TABLE `tmp_browse` ( + `sid` varchar(128) collate utf8_unicode_ci NOT NULL, + `data` longtext collate utf8_unicode_ci NOT NULL, + UNIQUE KEY `sid` (`sid`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; SET character_set_client = @saved_cs_client; -- --- Dumping data for table `tags` +-- Dumping data for table `tmp_browse` -- -LOCK TABLES `tags` WRITE; -/*!40000 ALTER TABLE `tags` DISABLE KEYS */; -/*!40000 ALTER TABLE `tags` ENABLE KEYS */; +LOCK TABLES `tmp_browse` WRITE; +/*!40000 ALTER TABLE `tmp_browse` DISABLE KEYS */; +/*!40000 ALTER TABLE `tmp_browse` ENABLE KEYS */; UNLOCK TABLES; -- @@ -747,6 +797,7 @@ CREATE TABLE `tmp_playlist_data` ( `tmp_playlist` int(11) unsigned NOT NULL, `object_type` varchar(32) character set utf8 default NULL, `object_id` int(11) unsigned NOT NULL, + `track` int(11) unsigned default NULL, PRIMARY KEY (`id`), KEY `tmp_playlist` (`tmp_playlist`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -781,7 +832,7 @@ SET character_set_client = @saved_cs_client; LOCK TABLES `update_info` WRITE; /*!40000 ALTER TABLE `update_info` DISABLE KEYS */; -INSERT INTO `update_info` VALUES ('db_version','340018'); +INSERT INTO `update_info` VALUES ('db_version','350007'); /*!40000 ALTER TABLE `update_info` ENABLE KEYS */; UNLOCK TABLES; @@ -805,7 +856,7 @@ CREATE TABLE `user` ( `validation` varchar(128) character set utf8 default NULL, PRIMARY KEY (`id`), UNIQUE KEY `username` (`username`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; SET character_set_client = @saved_cs_client; -- @@ -818,6 +869,31 @@ LOCK TABLES `user` WRITE; UNLOCK TABLES; -- +-- Table structure for table `user_catalog` +-- + +DROP TABLE IF EXISTS `user_catalog`; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +CREATE TABLE `user_catalog` ( + `user` int(11) unsigned NOT NULL, + `catalog` int(11) unsigned NOT NULL, + `level` smallint(4) unsigned NOT NULL default '5', + KEY `user` (`user`), + KEY `catalog` (`catalog`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +SET character_set_client = @saved_cs_client; + +-- +-- Dumping data for table `user_catalog` +-- + +LOCK TABLES `user_catalog` WRITE; +/*!40000 ALTER TABLE `user_catalog` DISABLE KEYS */; +/*!40000 ALTER TABLE `user_catalog` ENABLE KEYS */; +UNLOCK TABLES; + +-- -- Table structure for table `user_preference` -- @@ -839,7 +915,7 @@ SET character_set_client = @saved_cs_client; LOCK TABLES `user_preference` WRITE; /*!40000 ALTER TABLE `user_preference` DISABLE KEYS */; -INSERT INTO `user_preference` VALUES (-1,1,'0'),(-1,4,'10'),(-1,19,'32'),(-1,22,'Ampache :: Pour l\'Amour de la Musique'),(-1,23,'0'),(-1,24,'1'),(-1,25,'80'),(-1,41,'0'),(-1,29,'stream'),(-1,31,'en_US'),(-1,32,'m3u'),(-1,33,'classic'),(-1,34,'27'),(-1,35,'27'),(-1,36,'27'),(-1,51,'50'),(-1,40,'0'),(-1,44,'1'),(-1,45,'0'),(-1,46,'0'),(-1,47,'7'),(-1,49,'1'),(-1,52,'8192'),(-1,53,'default'),(-1,55,'default'),(1,69,'0'); +INSERT INTO `user_preference` VALUES (-1,1,'0'),(-1,4,'10'),(-1,19,'32'),(-1,22,'Ampache :: Pour l\'Amour de la Musique'),(-1,23,'0'),(-1,24,'1'),(-1,25,'80'),(-1,41,'0'),(-1,29,'stream'),(-1,31,'en_US'),(-1,32,'m3u'),(-1,33,'classic'),(-1,34,'27'),(-1,35,'27'),(-1,36,'27'),(-1,51,'50'),(-1,40,'0'),(-1,44,'1'),(-1,45,'0'),(-1,46,'0'),(-1,47,'7'),(-1,49,'1'),(-1,52,'8192'),(-1,53,'default'),(-1,55,'default'),(-1,57,''),(-1,69,'0'); /*!40000 ALTER TABLE `user_preference` ENABLE KEYS */; UNLOCK TABLES; @@ -899,6 +975,42 @@ LOCK TABLES `user_vote` WRITE; /*!40000 ALTER TABLE `user_vote` DISABLE KEYS */; /*!40000 ALTER TABLE `user_vote` ENABLE KEYS */; UNLOCK TABLES; + +-- +-- Table structure for table `video` +-- + +DROP TABLE IF EXISTS `video`; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +CREATE TABLE `video` ( + `id` int(11) unsigned NOT NULL auto_increment, + `file` varchar(255) collate utf8_unicode_ci NOT NULL, + `catalog` int(11) unsigned NOT NULL, + `title` varchar(255) collate utf8_unicode_ci NOT NULL, + `video_codec` varchar(255) collate utf8_unicode_ci NOT NULL, + `audio_codec` varchar(255) collate utf8_unicode_ci NOT NULL, + `resolution_x` mediumint(8) unsigned NOT NULL, + `resolution_y` mediumint(8) unsigned NOT NULL, + `time` int(11) unsigned NOT NULL, + `size` bigint(20) unsigned NOT NULL, + `mime` varchar(255) collate utf8_unicode_ci NOT NULL, + `enabled` tinyint(1) NOT NULL default '1', + PRIMARY KEY (`id`), + KEY `file` (`file`), + KEY `enabled` (`enabled`), + KEY `title` (`title`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +SET character_set_client = @saved_cs_client; + +-- +-- Dumping data for table `video` +-- + +LOCK TABLES `video` WRITE; +/*!40000 ALTER TABLE `video` DISABLE KEYS */; +/*!40000 ALTER TABLE `video` ENABLE KEYS */; +UNLOCK TABLES; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; @@ -909,4 +1021,4 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2008-05-10 9:15:23 +-- Dump completed on 2009-03-08 5:04:46 diff --git a/sql/ampache40.sql b/sql/ampache40.sql index e2c21dd7..d0f7b546 100644 --- a/sql/ampache40.sql +++ b/sql/ampache40.sql @@ -17,7 +17,7 @@ -- -- Host: localhost Database: ampache -- ------------------------------------------------------ --- Server version 5.0.51a-3-log +-- Server version 5.0.77-1-log /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -35,18 +35,19 @@ SET character_set_client = utf8; CREATE TABLE `access_list` ( `id` int(11) unsigned NOT NULL auto_increment, `name` varchar(255) default NULL, - `start` int(11) unsigned NOT NULL default '0', - `end` int(11) unsigned NOT NULL default '0', - `dns` varchar(255) default NULL, + `start` varbinary(255) NOT NULL, + `end` varbinary(255) NOT NULL, `level` smallint(3) unsigned NOT NULL default '5', `type` varchar(64) default NULL, `user` int(11) NOT NULL, `key` varchar(255) default NULL, + `enabled` tinyint(1) unsigned NOT NULL default '1', PRIMARY KEY (`id`), KEY `start` (`start`), KEY `end` (`end`), - KEY `level` (`level`) -) TYPE=MyISAM; + KEY `level` (`level`), + KEY `enabled` (`enabled`) +) TYPE=MyISAM AUTO_INCREMENT=5; SET character_set_client = @saved_cs_client; -- @@ -55,6 +56,7 @@ SET character_set_client = @saved_cs_client; LOCK TABLES `access_list` WRITE; /*!40000 ALTER TABLE `access_list` DISABLE KEYS */; +INSERT INTO `access_list` VALUES (1,'DEFAULTv4','\0\0\0\0','ÿÿÿÿ',75,'interface',-1,NULL,1),(2,'DEFAULTv4','\0\0\0\0','ÿÿÿÿ',75,'stream',-1,NULL,1),(3,'DEFAULTv6','\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0','ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ',75,'interface',-1,NULL,1),(4,'DEFAULTv6','\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0','ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ',75,'stream',-1,NULL,1); /*!40000 ALTER TABLE `access_list` ENABLE KEYS */; UNLOCK TABLES; @@ -68,7 +70,7 @@ SET character_set_client = utf8; CREATE TABLE `album` ( `id` int(11) unsigned NOT NULL auto_increment, `name` varchar(255) default NULL, - `prefix` enum('The','An','A','Der','Die','Das','Ein','Eine') default NULL, + `prefix` varchar(32) default NULL, `year` int(4) unsigned NOT NULL default '1984', `disk` smallint(5) unsigned default NULL, PRIMARY KEY (`id`), @@ -98,7 +100,7 @@ CREATE TABLE `album_data` ( `album_id` int(11) unsigned NOT NULL, `art` mediumblob, `art_mime` varchar(64) default NULL, - `thumb` blob, + `thumb` mediumblob, `thumb_mime` varchar(64) default NULL, UNIQUE KEY `album_id` (`album_id`) ) TYPE=MyISAM; @@ -123,7 +125,7 @@ SET character_set_client = utf8; CREATE TABLE `artist` ( `id` int(11) unsigned NOT NULL auto_increment, `name` varchar(255) default NULL, - `prefix` enum('The','An','A','Der','Die','Das','Ein','Eine') default NULL, + `prefix` varchar(32) default NULL, PRIMARY KEY (`id`), KEY `name` (`name`) ) TYPE=MyISAM; @@ -149,7 +151,7 @@ CREATE TABLE `artist_data` ( `artist_id` int(11) unsigned NOT NULL, `art` mediumblob NOT NULL, `art_mime` varchar(32) default NULL, - `thumb` blob NOT NULL, + `thumb` mediumblob, `thumb_mime` varchar(32) default NULL, `bio` text NOT NULL, UNIQUE KEY `artist_id` (`artist_id`) @@ -176,9 +178,9 @@ CREATE TABLE `catalog` ( `id` int(11) unsigned NOT NULL auto_increment, `name` varchar(128) default NULL, `path` varchar(255) default NULL, - `add_path` varchar(255) default NULL, - `catalog_type` enum('local','remote') NOT NULL default 'local', + `catalog_type` enum('local','remote') default NULL, `last_update` int(11) unsigned NOT NULL default '0', + `last_clean` int(11) unsigned default NULL, `last_add` int(11) unsigned NOT NULL default '0', `enabled` tinyint(1) unsigned NOT NULL default '1', `rename_pattern` varchar(255) default NULL, @@ -230,6 +232,59 @@ LOCK TABLES `democratic` WRITE; UNLOCK TABLES; -- +-- Table structure for table `dynamic_playlist` +-- + +DROP TABLE IF EXISTS `dynamic_playlist`; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +CREATE TABLE `dynamic_playlist` ( + `id` int(11) unsigned NOT NULL auto_increment, + `name` varchar(255) NOT NULL, + `user` int(11) NOT NULL, + `date` int(11) unsigned NOT NULL, + `type` varchar(128) NOT NULL, + PRIMARY KEY (`id`) +) TYPE=MyISAM; +SET character_set_client = @saved_cs_client; + +-- +-- Dumping data for table `dynamic_playlist` +-- + +LOCK TABLES `dynamic_playlist` WRITE; +/*!40000 ALTER TABLE `dynamic_playlist` DISABLE KEYS */; +/*!40000 ALTER TABLE `dynamic_playlist` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `dynamic_playlist_data` +-- + +DROP TABLE IF EXISTS `dynamic_playlist_data`; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +CREATE TABLE `dynamic_playlist_data` ( + `id` int(11) unsigned NOT NULL auto_increment, + `dynamic_id` int(11) unsigned NOT NULL, + `field` varchar(255) NOT NULL, + `internal_operator` varchar(64) NOT NULL, + `external_operator` varchar(64) NOT NULL, + `value` varchar(255) NOT NULL, + PRIMARY KEY (`id`) +) TYPE=MyISAM; +SET character_set_client = @saved_cs_client; + +-- +-- Dumping data for table `dynamic_playlist_data` +-- + +LOCK TABLES `dynamic_playlist_data` WRITE; +/*!40000 ALTER TABLE `dynamic_playlist_data` DISABLE KEYS */; +/*!40000 ALTER TABLE `dynamic_playlist_data` ENABLE KEYS */; +UNLOCK TABLES; + +-- -- Table structure for table `flagged` -- @@ -239,9 +294,9 @@ SET character_set_client = utf8; CREATE TABLE `flagged` ( `id` int(11) unsigned NOT NULL auto_increment, `object_id` int(11) unsigned NOT NULL default '0', - `object_type` enum('artist','album','song') NOT NULL default 'song', + `object_type` enum('artist','album','song') default NULL, `user` int(11) NOT NULL, - `flag` enum('delete','retag','reencode','other') NOT NULL default 'other', + `flag` enum('delete','retag','reencode','other') default NULL, `date` int(11) unsigned NOT NULL default '0', `approved` tinyint(1) unsigned NOT NULL default '0', `comment` varchar(255) default NULL, @@ -263,30 +318,6 @@ LOCK TABLES `flagged` WRITE; UNLOCK TABLES; -- --- Table structure for table `genre` --- - -DROP TABLE IF EXISTS `genre`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; -CREATE TABLE `genre` ( - `id` int(11) unsigned NOT NULL auto_increment, - `name` varchar(255) default NULL, - PRIMARY KEY (`id`), - KEY `name` (`name`) -) TYPE=MyISAM; -SET character_set_client = @saved_cs_client; - --- --- Dumping data for table `genre` --- - -LOCK TABLES `genre` WRITE; -/*!40000 ALTER TABLE `genre` DISABLE KEYS */; -/*!40000 ALTER TABLE `genre` ENABLE KEYS */; -UNLOCK TABLES; - --- -- Table structure for table `ip_history` -- @@ -296,8 +327,9 @@ SET character_set_client = utf8; CREATE TABLE `ip_history` ( `id` int(11) unsigned NOT NULL auto_increment, `user` int(11) NOT NULL, - `ip` int(11) unsigned NOT NULL default '0', + `ip` varbinary(255) default NULL, `date` int(11) unsigned NOT NULL default '0', + `agent` varchar(255) default NULL, PRIMARY KEY (`id`), KEY `username` (`user`), KEY `date` (`date`), @@ -380,7 +412,7 @@ SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `object_count` ( `id` int(11) unsigned NOT NULL auto_increment, - `object_type` enum('album','artist','song','playlist','genre','catalog','live_stream','video') NOT NULL default 'song', + `object_type` enum('album','artist','song','playlist','genre','catalog','live_stream','video') default NULL, `object_id` int(11) unsigned NOT NULL default '0', `date` int(11) unsigned NOT NULL default '0', `user` int(11) unsigned NOT NULL, @@ -412,8 +444,7 @@ CREATE TABLE `playlist` ( `id` int(11) unsigned NOT NULL auto_increment, `name` varchar(128) default NULL, `user` int(11) NOT NULL, - `type` enum('private','public') NOT NULL default 'private', - `genre` int(11) unsigned NOT NULL, + `type` enum('private','public') default NULL, `date` int(11) unsigned NOT NULL, PRIMARY KEY (`id`), KEY `name` (`name`), @@ -442,7 +473,6 @@ CREATE TABLE `playlist_data` ( `playlist` int(11) unsigned NOT NULL default '0', `object_id` int(11) unsigned default NULL, `object_type` varchar(32) default NULL, - `dynamic_song` text, `track` int(11) unsigned NOT NULL default '0', PRIMARY KEY (`id`), KEY `playlist` (`playlist`) @@ -476,7 +506,7 @@ CREATE TABLE `preference` ( PRIMARY KEY (`id`), KEY `catagory` (`catagory`), KEY `name` (`name`) -) TYPE=MyISAM AUTO_INCREMENT=56; +) TYPE=MyISAM AUTO_INCREMENT=70; SET character_set_client = @saved_cs_client; -- @@ -485,7 +515,7 @@ SET character_set_client = @saved_cs_client; LOCK TABLES `preference` WRITE; /*!40000 ALTER TABLE `preference` DISABLE KEYS */; -INSERT INTO `preference` VALUES (1,'download','0','Allow Downloads',100,'boolean','options'),(4,'popular_threshold','10','Popular Threshold',25,'integer','interface'),(19,'sample_rate','32','Transcode Bitrate',25,'string','streaming'),(22,'site_title','Ampache :: Pour l\'Amour de la Musique','Website Title',100,'string','system'),(23,'lock_songs','0','Lock Songs',100,'boolean','system'),(24,'force_http_play','1','Forces Http play regardless of port',100,'boolean','system'),(25,'http_port','80','Non-Standard Http Port',100,'integer','system'),(41,'localplay_controller','0','Localplay Type',100,'special','options'),(29,'play_type','stream','Type of Playback',25,'special','streaming'),(31,'lang','en_US','Language',100,'special','interface'),(32,'playlist_type','m3u','Playlist Type',100,'special','playlist'),(33,'theme_name','classic','Theme',0,'special','interface'),(34,'ellipse_threshold_album','27','Album Ellipse Threshold',0,'integer','interface'),(35,'ellipse_threshold_artist','27','Artist Ellipse Threshold',0,'integer','interface'),(36,'ellipse_threshold_title','27','Title Ellipse Threshold',0,'integer','interface'),(51,'offset_limit','50','Offset Limit',5,'integer','interface'),(40,'localplay_level','0','Localplay Access',100,'special','options'),(44,'allow_stream_playback','1','Allow Streaming',100,'boolean','system'),(45,'allow_democratic_playback','0','Allow Democratic Play',100,'boolean','system'),(46,'allow_localplay_playback','0','Allow Localplay Play',100,'boolean','system'),(47,'stats_threshold','7','Statistics Day Threshold',25,'integer','interface'),(49,'min_object_count','1','Min Element Count',5,'integer','interface'),(52,'rate_limit','8192','Rate Limit',100,'integer','streaming'),(53,'playlist_method','default','Playlist Method',5,'string','playlist'),(55,'transcode','default','Transcoding',25,'string','streaming',),(69,'show_lyrics','0','Show Lyrics',0,'boolean','interface'); +INSERT INTO `preference` VALUES (1,'download','0','Allow Downloads',100,'boolean','options'),(4,'popular_threshold','10','Popular Threshold',25,'integer','interface'),(19,'sample_rate','32','Transcode Bitrate',25,'string','streaming'),(22,'site_title','Ampache :: Pour l\'Amour de la Musique','Website Title',100,'string','system'),(23,'lock_songs','0','Lock Songs',100,'boolean','system'),(24,'force_http_play','1','Forces Http play regardless of port',100,'boolean','system'),(25,'http_port','80','Non-Standard Http Port',100,'integer','system'),(41,'localplay_controller','0','Localplay Type',100,'special','options'),(29,'play_type','stream','Type of Playback',25,'special','streaming'),(31,'lang','en_US','Language',100,'special','interface'),(32,'playlist_type','m3u','Playlist Type',100,'special','playlist'),(33,'theme_name','classic','Theme',0,'special','interface'),(34,'ellipse_threshold_album','27','Album Ellipse Threshold',0,'integer','interface'),(35,'ellipse_threshold_artist','27','Artist Ellipse Threshold',0,'integer','interface'),(36,'ellipse_threshold_title','27','Title Ellipse Threshold',0,'integer','interface'),(51,'offset_limit','50','Offset Limit',5,'integer','interface'),(40,'localplay_level','0','Localplay Access',100,'special','options'),(44,'allow_stream_playback','1','Allow Streaming',100,'boolean','system'),(45,'allow_democratic_playback','0','Allow Democratic Play',100,'boolean','system'),(46,'allow_localplay_playback','0','Allow Localplay Play',100,'boolean','system'),(47,'stats_threshold','7','Statistics Day Threshold',25,'integer','interface'),(49,'min_object_count','1','Min Element Count',5,'integer','interface'),(52,'rate_limit','8192','Rate Limit',100,'integer','streaming'),(53,'playlist_method','default','Playlist Method',5,'string','playlist'),(55,'transcode','default','Transcoding',25,'string','streaming'),(57,'tags_userlist','','User to track',0,'string','tags'),(69,'show_lyrics','0','Show Lyrics',0,'boolean','interface'); /*!40000 ALTER TABLE `preference` ENABLE KEYS */; UNLOCK TABLES; @@ -499,7 +529,7 @@ SET character_set_client = utf8; CREATE TABLE `rating` ( `id` int(11) unsigned NOT NULL auto_increment, `user` int(11) NOT NULL, - `object_type` enum('artist','album','song','steam','video') NOT NULL default 'artist', + `object_type` enum('artist','album','song','steam','video') default NULL, `object_id` int(11) unsigned NOT NULL default '0', `rating` tinyint(4) NOT NULL, PRIMARY KEY (`id`), @@ -528,8 +558,8 @@ CREATE TABLE `session` ( `username` varchar(16) default NULL, `expire` int(11) unsigned NOT NULL default '0', `value` longtext NOT NULL, - `ip` int(11) unsigned default NULL, - `type` enum('mysql','ldap','http','api','xml-rpc') NOT NULL, + `ip` varbinary(255) default NULL, + `type` enum('mysql','ldap','http','api','xml-rpc') default NULL, `agent` varchar(255) default NULL, PRIMARY KEY (`id`), KEY `expire` (`expire`), @@ -558,7 +588,7 @@ CREATE TABLE `session_stream` ( `user` int(11) unsigned NOT NULL, `agent` varchar(255) default NULL, `expire` int(11) unsigned NOT NULL, - `ip` int(11) unsigned default NULL, + `ip` varbinary(255) default NULL, PRIMARY KEY (`id`) ) TYPE=MyISAM; SET character_set_client = @saved_cs_client; @@ -589,18 +619,16 @@ CREATE TABLE `song` ( `title` varchar(255) default NULL, `bitrate` mediumint(8) unsigned NOT NULL default '0', `rate` mediumint(8) unsigned NOT NULL default '0', - `mode` enum('abr','vbr','cbr') default 'cbr', + `mode` enum('abr','vbr','cbr') default NULL, `size` int(11) unsigned NOT NULL default '0', `time` smallint(5) unsigned NOT NULL default '0', `track` smallint(5) unsigned default NULL, - `genre` int(11) unsigned default NULL, `played` tinyint(1) unsigned NOT NULL default '0', `enabled` tinyint(1) unsigned NOT NULL default '1', `update_time` int(11) unsigned default '0', `addition_time` int(11) unsigned default '0', `hash` varchar(64) default NULL, PRIMARY KEY (`id`), - KEY `genre` (`genre`), KEY `album` (`album`), KEY `artist` (`artist`), KEY `file` (`file`), @@ -649,6 +677,30 @@ LOCK TABLES `song_data` WRITE; UNLOCK TABLES; -- +-- Table structure for table `tag` +-- + +DROP TABLE IF EXISTS `tag`; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +CREATE TABLE `tag` ( + `id` int(11) unsigned NOT NULL auto_increment, + `name` varchar(255) default NULL, + UNIQUE KEY `name` (`name`), + KEY `map_id` (`id`) +) TYPE=MyISAM; +SET character_set_client = @saved_cs_client; + +-- +-- Dumping data for table `tag` +-- + +LOCK TABLES `tag` WRITE; +/*!40000 ALTER TABLE `tag` DISABLE KEYS */; +/*!40000 ALTER TABLE `tag` ENABLE KEYS */; +UNLOCK TABLES; + +-- -- Table structure for table `tag_map` -- @@ -657,13 +709,15 @@ SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `tag_map` ( `id` int(11) unsigned NOT NULL auto_increment, + `tag_id` int(11) unsigned NOT NULL, `object_id` int(11) unsigned NOT NULL, `object_type` varchar(16) default NULL, `user` int(11) NOT NULL, PRIMARY KEY (`id`), KEY `object_id` (`object_id`), KEY `object_type` (`object_type`), - KEY `user_id` (`user`) + KEY `user_id` (`user`), + KEY `tag_id` (`tag_id`) ) TYPE=MyISAM; SET character_set_client = @saved_cs_client; @@ -677,28 +731,26 @@ LOCK TABLES `tag_map` WRITE; UNLOCK TABLES; -- --- Table structure for table `tags` +-- Table structure for table `tmp_browse` -- -DROP TABLE IF EXISTS `tags`; +DROP TABLE IF EXISTS `tmp_browse`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; -CREATE TABLE `tags` ( - `map_id` int(11) unsigned NOT NULL, - `name` varchar(32) default NULL, - `order` tinyint(2) NOT NULL, - KEY `order` (`order`), - KEY `map_id` (`map_id`) +CREATE TABLE `tmp_browse` ( + `sid` varchar(128) NOT NULL, + `data` longtext NOT NULL, + UNIQUE KEY `sid` (`sid`) ) TYPE=MyISAM; SET character_set_client = @saved_cs_client; -- --- Dumping data for table `tags` +-- Dumping data for table `tmp_browse` -- -LOCK TABLES `tags` WRITE; -/*!40000 ALTER TABLE `tags` DISABLE KEYS */; -/*!40000 ALTER TABLE `tags` ENABLE KEYS */; +LOCK TABLES `tmp_browse` WRITE; +/*!40000 ALTER TABLE `tmp_browse` DISABLE KEYS */; +/*!40000 ALTER TABLE `tmp_browse` ENABLE KEYS */; UNLOCK TABLES; -- @@ -740,6 +792,7 @@ CREATE TABLE `tmp_playlist_data` ( `tmp_playlist` int(11) unsigned NOT NULL, `object_type` varchar(32) default NULL, `object_id` int(11) unsigned NOT NULL, + `track` int(11) unsigned default NULL, PRIMARY KEY (`id`), KEY `tmp_playlist` (`tmp_playlist`) ) TYPE=MyISAM; @@ -774,7 +827,7 @@ SET character_set_client = @saved_cs_client; LOCK TABLES `update_info` WRITE; /*!40000 ALTER TABLE `update_info` DISABLE KEYS */; -INSERT INTO `update_info` VALUES ('db_version','340018'); +INSERT INTO `update_info` VALUES ('db_version','350007'); /*!40000 ALTER TABLE `update_info` ENABLE KEYS */; UNLOCK TABLES; @@ -798,7 +851,7 @@ CREATE TABLE `user` ( `validation` varchar(128) default NULL, PRIMARY KEY (`id`), UNIQUE KEY `username` (`username`) -) TYPE=MyISAM; +) TYPE=MyISAM AUTO_INCREMENT=2; SET character_set_client = @saved_cs_client; -- @@ -811,6 +864,31 @@ LOCK TABLES `user` WRITE; UNLOCK TABLES; -- +-- Table structure for table `user_catalog` +-- + +DROP TABLE IF EXISTS `user_catalog`; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +CREATE TABLE `user_catalog` ( + `user` int(11) unsigned NOT NULL, + `catalog` int(11) unsigned NOT NULL, + `level` smallint(4) unsigned NOT NULL default '5', + KEY `user` (`user`), + KEY `catalog` (`catalog`) +) TYPE=MyISAM; +SET character_set_client = @saved_cs_client; + +-- +-- Dumping data for table `user_catalog` +-- + +LOCK TABLES `user_catalog` WRITE; +/*!40000 ALTER TABLE `user_catalog` DISABLE KEYS */; +/*!40000 ALTER TABLE `user_catalog` ENABLE KEYS */; +UNLOCK TABLES; + +-- -- Table structure for table `user_preference` -- @@ -832,7 +910,7 @@ SET character_set_client = @saved_cs_client; LOCK TABLES `user_preference` WRITE; /*!40000 ALTER TABLE `user_preference` DISABLE KEYS */; -INSERT INTO `user_preference` VALUES (-1,1,'0'),(-1,4,'10'),(-1,19,'32'),(-1,22,'Ampache :: Pour l\'Amour de la Musique'),(-1,23,'0'),(-1,24,'1'),(-1,25,'80'),(-1,41,'0'),(-1,29,'stream'),(-1,31,'en_US'),(-1,32,'m3u'),(-1,33,'classic'),(-1,34,'27'),(-1,35,'27'),(-1,36,'27'),(-1,51,'50'),(-1,40,'0'),(-1,44,'1'),(-1,45,'0'),(-1,46,'0'),(-1,47,'7'),(-1,49,'1'),(-1,52,'8192'),(-1,53,'default'),(-1,55,'default'),(1,69,'0'); +INSERT INTO `user_preference` VALUES (-1,1,'0'),(-1,4,'10'),(-1,19,'32'),(-1,22,'Ampache :: Pour l\'Amour de la Musique'),(-1,23,'0'),(-1,24,'1'),(-1,25,'80'),(-1,41,'0'),(-1,29,'stream'),(-1,31,'en_US'),(-1,32,'m3u'),(-1,33,'classic'),(-1,34,'27'),(-1,35,'27'),(-1,36,'27'),(-1,51,'50'),(-1,40,'0'),(-1,44,'1'),(-1,45,'0'),(-1,46,'0'),(-1,47,'7'),(-1,49,'1'),(-1,52,'8192'),(-1,53,'default'),(-1,55,'default'),(-1,57,''),(-1,69,'0'); /*!40000 ALTER TABLE `user_preference` ENABLE KEYS */; UNLOCK TABLES; @@ -892,6 +970,42 @@ LOCK TABLES `user_vote` WRITE; /*!40000 ALTER TABLE `user_vote` DISABLE KEYS */; /*!40000 ALTER TABLE `user_vote` ENABLE KEYS */; UNLOCK TABLES; + +-- +-- Table structure for table `video` +-- + +DROP TABLE IF EXISTS `video`; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +CREATE TABLE `video` ( + `id` int(11) unsigned NOT NULL auto_increment, + `file` varchar(255) NOT NULL, + `catalog` int(11) unsigned NOT NULL, + `title` varchar(255) NOT NULL, + `video_codec` varchar(255) NOT NULL, + `audio_codec` varchar(255) NOT NULL, + `resolution_x` mediumint(8) unsigned NOT NULL, + `resolution_y` mediumint(8) unsigned NOT NULL, + `time` int(11) unsigned NOT NULL, + `size` bigint(20) unsigned NOT NULL, + `mime` varchar(255) NOT NULL, + `enabled` tinyint(1) NOT NULL default '1', + PRIMARY KEY (`id`), + KEY `file` (`file`), + KEY `enabled` (`enabled`), + KEY `title` (`title`) +) TYPE=MyISAM; +SET character_set_client = @saved_cs_client; + +-- +-- Dumping data for table `video` +-- + +LOCK TABLES `video` WRITE; +/*!40000 ALTER TABLE `video` DISABLE KEYS */; +/*!40000 ALTER TABLE `video` ENABLE KEYS */; +UNLOCK TABLES; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; @@ -899,4 +1013,4 @@ UNLOCK TABLES; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2008-04-21 2:08:18 +-- Dump completed on 2009-03-08 5:05:52 diff --git a/templates/install.css b/templates/install.css index 10eb86eb..f5d8a8a4 100644 --- a/templates/install.css +++ b/templates/install.css @@ -1,6 +1,6 @@ /** * - * Copyright (c) 2001 - 2007 Ampache.org + * Copyright (c) Ampache.org * All rights reserved. * * This program is free software; you can redistribute it and/or @@ -118,15 +118,15 @@ textarea:focus{ /* Extras */ .ok { -font-weight:bold; -color:#009900; -margin:10px 10px 10px 10px; + font-weight:bold; + color:#009900; + margin:10px 10px 10px 10px; } .notok { -font-weight:bold; -color:#FF3300; -margin:10px 10px 10px 10px; + font-weight:bold; + color:#FF3300; + margin:3px 3px 3px 3px; } /* Bottom */ diff --git a/templates/show_install.inc.php b/templates/show_install.inc.php index 799ba65b..7c2bce79 100644 --- a/templates/show_install.inc.php +++ b/templates/show_install.inc.php @@ -36,7 +36,7 @@ if (INSTALL != '1') { exit; } <div id="text-box"> <div class="notify"> - <strong><?php echo _('Requirements'); ?></strong> + <h3><?php echo _('Requirements'); ?></h3> <p> <?php echo _("This Page handles the installation of the Ampache database and the creation of the ampache.cfg.php file. Before you continue please make sure that you have the following pre-requisites"); ?> </p> diff --git a/templates/show_install_check.inc.php b/templates/show_install_check.inc.php new file mode 100644 index 00000000..896a3cbd --- /dev/null +++ b/templates/show_install_check.inc.php @@ -0,0 +1,112 @@ +<?php +/* + + Copyright (c) Ampache.org + All rights reserved. + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2 + of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ +?> +<?php if (INSTALL != '1') { exit; } ?> +<h4><?php echo _('Required'); ?></h4> +<p><?php echo _('PHP Version'); ?>: +<?php + if(!check_php_ver()) { + $string = phpversion() . " " . _('Hash Function Exists') . " " . print_boolean(function_exists('hash_algos')) . " " . _('SHA256 Support') . " " . print_boolean(in_array('sha256',$algos)); + echo debug_result($string,false); + Error::add_error('install',_('PHP Version')); + } + else { + echo debug_result(phpversion(),true); + } +?> +</p> +<p><?php echo _('Mysql for PHP'); ?>: +<?php + if (!check_php_mysql()) { + echo debug_result('',false); + Error::add_error('install',_('Mysql for PHP')); + } + else { + echo debug_result(mysql_get_client_info(),true); + } +?> +</p> +<p><?php echo _('PHP Session Support'); ?>: +<?php + if (!check_php_session()) { + echo debug_result('',false); + Error::add_error('install',_('PHP Session Support')); + } + else { + echo debug_result('',true); + } +?> +</p> +<p><?php echo _('PHP ICONV Support'); ?>: +<?php + if (!check_php_iconv()) { + echo debug_result('',false); + Error::add_error('install',_('PHP ICONV Support')); + } + else { + echo debug_result('',true); + } +?> +</p> +<p><?php echo _('PHP PCRE Support'); ?>: +<?php + if (!check_php_pcre()) { + echo debug_result('',false); + Error::add_error('install',_('PHP PCRE Support')); + } + else { + echo debug_result('',true); + } +?> +</p> +<p><?php echo _('PHP PutENV Support'); ?>: +<?php + if (!check_putenv()) { + echo debug_result('',false); + Error::add_error('install',_('PHP PutENV Support')); + } + else { + echo debug_result('',true); + } +?> +</p> +<hr /> +<h4><?php echo _('Optional'); ?></h4> +<p><?php echo _('Gettext Support'); ?>: +<?php + if (!check_gettext()) { + echo debug_result(_('Gettext Emulator will be used'),false); + } + else { + echo debug_result('',true); + } +?> +</p> +<p><?php echo _('Mbstring Support'); ?>: +<?php + if (!check_mbstring()) { + echo debug_result(_('Multibyte Chracter may not detect correct'),false); + } + else { + echo debug_result('',true); + } +?> +</p> diff --git a/templates/show_install_config.inc.php b/templates/show_install_config.inc.php index 7586cf9b..080ee358 100644 --- a/templates/show_install_config.inc.php +++ b/templates/show_install_config.inc.php @@ -92,12 +92,10 @@ if (INSTALL != '1') { exit; } <td>[ <?php if (!is_readable($configfile)) { - $status['read_config'] = 'false'; - echo " <span class=\"notok\">ERROR</span> "; + echo debug_result('',false); } else { - $status['read_config'] = 'true'; - echo " <span class=\"ok\">OK</span> "; + echo debug_result('',true); } ?> ] @@ -111,12 +109,10 @@ if (INSTALL != '1') { exit; } <?php $results = @parse_ini_file($configfile); if (!check_config_values($results)) { - $status['parse_config'] = 'false'; - echo " <span class=\"notok\">ERROR</span> "; + echo debug_result('',false); } else { - $status['parse_config'] = 'true'; - echo " <span class=\"ok\">OK</span> "; + echo debug_result('',true); } ?> ] diff --git a/templates/show_install_lang.inc.php b/templates/show_install_lang.inc.php index a079708c..f2bc46a1 100644 --- a/templates/show_install_lang.inc.php +++ b/templates/show_install_lang.inc.php @@ -36,7 +36,7 @@ </div> <div id="text-box"> <div class="notify"> - <strong><?php echo _('Requirements'); ?></strong> + <h3><?php echo _('Requirements'); ?></h3> <p> <?php echo _('This Page handles the installation of the Ampache database and the creation of the ampache.cfg.php file. Before you continue please make sure that you have the following pre-requisites'); ?> </p> @@ -47,103 +47,19 @@ <p> <?php echo _("Once you have ensured that you have the above requirements please fill out the information below. You will only be asked for the required config values. If you would like to make changes to your ampache install at a later date simply edit /config/ampache.cfg.php"); ?> </p> - </div> +<?php require_once 'templates/show_install_check.inc.php'; ?> +</div> +<?php if (Error::occurred()) { ?> <div class="content"> - <h3><?php echo _('System Checks'); ?></h3> - <h4><?php echo _('Requirements'); ?></h4> - <p><?php echo _('PHP Version'); ?>: - <?php - if(!check_php_ver()) { - echo " <font color=\"red\">ERROR</font> " . phpversion() . " " . _('Hash Function Exists') . " " - . print_boolean(function_exists('hash_algos')) . " " . _('SHA256 Support') . " " . print_boolean(in_array('sha256',$algos)); - $results = $results + 1; - } else { - echo " <font color=\"green\"> OK </font><i>" . phpversion() . "</i>"; - } - ?> - </p> - <p><?php echo _('Mysql for PHP'); ?>: - <?php - if (!check_php_mysql()) { - echo " <font color=\"red\">ERROR</font> "; - $results = $results + 1; - } else { - if(strcmp('5.0.0',mysql_get_client_info()) > 0) { - echo " <font color=\"#FF6600\"> WARNING </font> " . mysql_get_client_info() . "<strong>We recommend MySQL version more than 5.0.0</strong>"; - } else { - echo " <font color=\"green\"> OK </font>"; - echo "<i>" . mysql_get_client_info() . "</i>"; - } - } - ?> - </p> - <p><?php echo _('PHP Session Support'); ?>: - <?php - if (!check_php_session()) { - echo " <font color=\"red\">ERROR</font> "; - $results = $results + 1; - } else { - echo " <font color=\"green\"> OK </font> "; - } - ?> - </p> - <p><?php echo _('PHP ICONV Support'); ?>: - <?php - if (!check_php_iconv()) { - echo " <font color=\"red\">ERROR</font> "; - $results = $results + 1; - } else { - echo " <font color=\"green\"> OK </font> "; - } - ?> - </p> - <p><?php echo _('PHP PCRE Support'); ?>: - <?php - if (!check_php_pcre()) { - echo " <font color=\"red\">ERROR</font> "; - $results = $results + 1; - } else { - echo " <font color=\"green\"> OK </font> "; - } - ?> - </p> - <p><?php echo _('PHP PutENV Support'); ?>: - <?php - if (!check_putenv()) { - echo " <font color=\"red\">ERROR</font> "; - $results = $results + 1; - } else { - echo " <font color=\"green\"> OK </font> "; - } - ?> - </p> - <hr /> - <h4><?php echo _('Optional'); ?></h4> - <p><?php echo _('Gettext Support'); ?>: - <?php - if (!function_exists('gettext')) { - echo " <font color=\"#FF6600\">" . _('WARNING: This server will use gettext emulator.') . "</font> "; - } else { - echo " <font color=\"green\"> OK </font> "; - } - ?> - </p> - <p><?php echo _('Mbstring Support'); ?>: - <?php - if (!function_exists('mb_check_encoding')) { - echo " <font color=\"#FF6600\">WARNING</font> "; - } else { - echo " <font color=\"green\"> OK </font> "; - } - ?> - </p> + <span class="fatalerror"><?php echo _('Minimum Requirements not met. Unable to Install Ampache.'); ?></span> </div> - <?php if($results == 0) { ?> - <div class="content"> - <strong><?php echo _('Choose installation language.'); ?></strong> - <p> - <?php Error::display('general'); ?> - </p> +<?php } ?> + +<div class="content"> + <strong><?php echo _('Choose installation language.'); ?></strong> + <p> + <?php Error::display('general'); ?> + </p> <form method="post" action="<?php echo WEB_PATH . "?action=init"; ?>" enctype="multipart/form-data" > <?php @@ -165,12 +81,6 @@ echo "</select>\n"; </form> </div> - <?php } else { /* if results */ ?> - <div class="content"> - <?php echo _('Ampache does not <strong>run</strong> correctly by this server.'); ?><br /> - <?php echo _('Please contact your server administrator, and fix them.'); ?> - </div> - <?php } /* if results */ ?> <div id="bottom"> <p><strong>Ampache Installation.</strong><br /> For the love of Music.</p> diff --git a/templates/show_test.inc.php b/templates/show_test.inc.php index 5c193f98..c8f569be 100644 --- a/templates/show_test.inc.php +++ b/templates/show_test.inc.php @@ -46,12 +46,10 @@ <td valign="top">[ <?php if (!check_php_ver()) { - $status['php_ver'] = 'false'; - echo " <font color=\"red\">ERROR</font> "; + echo debug_result('',false); } else { - $status['php_ver'] = 'true'; - echo " <font color=\"green\"> OK </font> "; + echo debug_result('',true); } ?> ] @@ -65,12 +63,10 @@ <td valign="top">[ <?php if (!check_php_mysql()) { - $status['mysql_php'] = 'false'; - echo " <font color=\"red\">ERROR</font> "; + echo debug_result('',false); } else { - $status['mysql_php'] = 'true'; - echo " <font color=\"green\"> OK </font> "; + echo debug_result('',true); } ?> ] @@ -84,12 +80,10 @@ <td valign="top">[ <?php if (!check_php_session()) { - $status['session_php'] = 'false'; - echo " <font color=\"red\">ERROR</font> "; + echo debug_result('',false); } else { - $status['session_php'] = 'true'; - echo " <font color=\"green\"> OK </font> "; + echo debug_result('',true); } ?> ] @@ -103,12 +97,10 @@ <td valign="top">[ <?php if (!check_php_iconv()) { - $status['iconv_php'] = 'false'; - echo " <font color=\"red\">ERROR</font> "; + echo debug_result('',false); } else { - $status['iconv_php'] = 'true'; - echo "<font color=\"green\"> OK </font> "; + echo debug_result('',true); } ?>] </td> @@ -121,11 +113,10 @@ <td valign="top">[ <?php if (!check_php_pcre()) { - $status['pcre_php'] = 'false'; - echo " <font color=\"red\">ERROR</font> "; + echo debug_result('',false); } else { - echo "<font color=\"green\"> OK </font> "; + echo debug_result('',true); } ?>] </td> @@ -138,11 +129,10 @@ <td valign="top">[ <?php if (!check_putenv()) { - $status['putevn_php'] = false; - echo " <font color=\"red\">ERROR</font> "; + echo debug_result('',false); } else { - echo "<font color=\"green\"> OK </font> "; + echo debug_result('',true); } ?>] </td> @@ -155,10 +145,10 @@ <td valign="top">[ <?php if (!is_readable($configfile)) { - echo " <font color=\"red\">ERROR</font> "; + echo debug_result('',false); } else { - echo " <font color=\"green\"> OK   </font> "; + echo debug_result('',true); } ?> ] @@ -177,11 +167,10 @@ $results = @parse_ini_file($configfile); Config::set_by_array($results); if (!check_config_values($results)) { - echo " <font color=\"red\">ERROR</font> "; + echo debug_result('',false); } else { - $status['parse_config'] = true; - echo " <font color=\"green\"> OK </font> "; + echo debug_result('',true); } ?> ] @@ -196,12 +185,10 @@ <?php $db = check_database($results['database_hostname'], $results['database_username'], $results['database_password'],$results['database_name']); if (!$db) { - $status['check_db'] = 'false'; - echo " <font color=\"red\">ERROR</font> "; + echo debug_result('',false); } else { - $status['check_db'] = 'true'; - echo " <font color=\"green\"> OK </font> "; + echo debug_result('',true); } ?> ] @@ -216,19 +203,16 @@ <?php $db_inserted = check_database_inserted($db,$results['local_db']); if (!$db_inserted) { - $status['check_db_insert'] = 'false'; - echo " <font color=\"red\">ERROR</font> "; + echo debug_result('',false); } else { - $status['check_db_insert'] = 'true'; - echo " <font color=\"green\"> OK </font> "; + echo debug_result('',true); } ?> ] </td> <td> - This checks a few key tables to make sure that you have successfully inserted the ampache database and - that the user has access to the database + <?php echo _('This checks a few key tables to make sure that you have successfully inserted the ampache database and that the user has access to the database'); ?> </td> </tr> <tr> @@ -250,16 +234,14 @@ echo " <img src=\"" . $results['web_path'] ."/images/icon_enable.png\" /> "; } else { - $status['check_webpath'] = false; - echo "<font color=\"red\">ERROR</font>"; + echo debug_result('',false); } ?> ] </td> <td> - This test makes sure that your web_path variable is set correctly and that we are able to get to the index page. If you do not see a check mark - here then your web_path is not set correctly. + <?php echo _('This test makes sure that your web_path variable is set correctly and that we are able to get to the index page. If you do not see a check mark here then your web_path is not set correctly.'); ?> </td> </tr> </table> |