From 3c9d06c18a0058bfcb5de16a5bbf192657eee12a Mon Sep 17 00:00:00 2001 From: Git Date: Fri, 8 Mar 2013 08:00:45 +0000 Subject: [PATCH] Empty commit --- sections/requests/requests.php | 4 ++++ sections/tools/misc/update_geoip.php | 11 +++++------ sections/user/edit.php | 13 ------------- sections/user/takeedit.php | 18 ------------------ 4 files changed, 9 insertions(+), 37 deletions(-) diff --git a/sections/requests/requests.php b/sections/requests/requests.php index dc819a97..df4ac26a 100644 --- a/sections/requests/requests.php +++ b/sections/requests/requests.php @@ -132,6 +132,10 @@ $Words = explode(' ', $SearchString); foreach($Words as $Word) { $Word = trim($Word); + // Skip isolated hyphens to enable "Artist - Title" searches + if ($Word == '-') { + continue; + } if($Word[0] == '!' && strlen($Word) >= 2) { if(strpos($Word,'!',1) === false) { $SearchWords['exclude'][] = $Word; diff --git a/sections/tools/misc/update_geoip.php b/sections/tools/misc/update_geoip.php index d1756d75..f0eeb3f4 100644 --- a/sections/tools/misc/update_geoip.php +++ b/sections/tools/misc/update_geoip.php @@ -7,12 +7,11 @@ View::show_header(); //requires wget, unzip commands to be installed -shell_exec('wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity_CSV/GeoLiteCity_'.date('Ym').'01.zip'); -//shell_exec('wget http://debug.what.cd/GeoLiteCity_'.date('Ym').'01.zip'); -shell_exec('unzip GeoLiteCity_'.date('Ym').'01.zip'); -shell_exec('rm GeoLiteCity_'.date('Ym').'01.zip'); +shell_exec('wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity_CSV/GeoLiteCity-latest.zip'); +shell_exec('unzip GeoLiteCity-latest.zip'); +shell_exec('rm GeoLiteCity-latest.zip'); -if(($Locations = file("GeoLiteCity_".date('Ym')."01/GeoLiteCity-Location.csv", FILE_IGNORE_NEW_LINES)) === false) { +if(($Locations = file("GeoLiteCity_".date('Ym')."05/GeoLiteCity-Location.csv", FILE_IGNORE_NEW_LINES)) === false) { error("Download or extraction of maxmind database failed"); } array_shift($Locations); @@ -31,7 +30,7 @@ echo "There are ".count($CountryIDs)." CountryIDs"; echo "
"; -if(($Blocks = file("GeoLiteCity_".date('Ym')."01/GeoLiteCity-Blocks.csv", FILE_IGNORE_NEW_LINES)) === false) { +if(($Blocks = file("GeoLiteCity_".date('Ym')."05/GeoLiteCity-Blocks.csv", FILE_IGNORE_NEW_LINES)) === false) { echo "Error"; } array_shift($Blocks); diff --git a/sections/user/edit.php b/sections/user/edit.php index dd894466..c17eec21 100644 --- a/sections/user/edit.php +++ b/sections/user/edit.php @@ -66,12 +66,6 @@ function checked($Checked) { $LastFMUsername = ""; list($LastFMUsername) = $DB->next_record(); -$DB->query("SELECT Enable FROM users_enable_recommendations WHERE ID = '$UserID' AND Enable = 1"); -if($DB->record_count() > 0) { - $RecommendationsEnabled = "value='1' checked='checked'"; -} - - echo $Val->GenerateJS('userform'); ?>
@@ -264,13 +258,6 @@ function checked($Checked) { - - Torrent Recommendations - - /> - - - Auto-save text diff --git a/sections/user/takeedit.php b/sections/user/takeedit.php index f502975a..dae007b1 100644 --- a/sections/user/takeedit.php +++ b/sections/user/takeedit.php @@ -248,24 +248,6 @@ $DB->query("INSERT INTO lastfm_users (ID, Username) VALUES ('$UserID', '$LastFMUsername')"); } -$RecommendationsEnabled = $_POST['torrent_recommendations']; - -// Make sure user has recommentations enabled before removing them. -if($RecommendationsEnabled == 'on') { - $DB->query("INSERT INTO - users_enable_recommendations - (ID, Enable) VALUES ('$UserID', '1') - ON DUPLICATE KEY UPDATE Enable = '1'"); -} else { - $DB->query("SELECT Enable FROM users_enable_recommendations WHERE ID = '$UserID' AND Enable = 1"); - if($DB->record_count() > 0) { - $DB->query("INSERT INTO - users_enable_recommendations - (ID, Enable) VALUES ('$UserID', '0') - ON DUPLICATE KEY UPDATE Enable = '0'"); - } -} - // Information on how the user likes to download torrents is stored in cache if($DownloadAlt != $LoggedUser['DownloadAlt']) { $Cache->delete_value('user_'.$LoggedUser['torrent_pass']);