mirror of
https://github.com/WhatCD/Gazelle.git
synced 2024-12-13 19:06:27 +00:00
Empty commit
This commit is contained in:
parent
b6c5857f33
commit
3c9d06c18a
@ -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;
|
||||
|
@ -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 "<br />";
|
||||
|
||||
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);
|
||||
|
@ -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');
|
||||
?>
|
||||
<div class="thin">
|
||||
@ -264,13 +258,6 @@ function checked($Checked) {
|
||||
</td>
|
||||
</tr>
|
||||
<!-- -->
|
||||
<tr>
|
||||
<td class="label"><strong>Torrent Recommendations</strong></td>
|
||||
<td>
|
||||
<input type="checkbox" name="torrent_recommendations" id="torrent_recommendations" <?=$RecommendationsEnabled?> />
|
||||
<label for="torrent_recommendations">Allow people to send you torrent recommendations.</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label"><strong>Auto-save text</strong></td>
|
||||
<td>
|
||||
|
@ -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']);
|
||||
|
Loading…
Reference in New Issue
Block a user