diff --git a/classes/irc.class.php b/classes/irc.class.php
index f9b36e73..9569e18b 100644
--- a/classes/irc.class.php
+++ b/classes/irc.class.php
@@ -29,6 +29,9 @@ abstract class IRC_BOT {
public $Restart = 0; //Die by default
public function __construct() {
+ if (isset($_SERVER['HOME']) && is_dir($_SERVER['HOME']) && getcwd() != $_SERVER['HOME']) {
+ chdir($_SERVER['HOME']);
+ }
//ini_set('memory_limit', '12M');
restore_error_handler(); //Avoid PHP error logging
set_time_limit(0);
diff --git a/opensearch.php b/opensearch.php
index 7fc25f01..325aa952 100644
--- a/opensearch.php
+++ b/opensearch.php
@@ -24,7 +24,6 @@ switch ($Type) {
case 'artists':
?>
-
http=($SSL?'s':'')?>://=SITE_URL?>/torrents.php?action=advanced
break;
diff --git a/sections/artist/autocomplete.php b/sections/artist/autocomplete.php
index ed1700da..bec92ce4 100644
--- a/sections/artist/autocomplete.php
+++ b/sections/artist/autocomplete.php
@@ -1,4 +1,7 @@
+if (empty($_GET['query'])) {
+ error(0);
+}
header('Content-Type: application/json; charset=utf-8');
$FullName = rawurldecode($_GET['query']);
@@ -30,10 +33,11 @@ if (!$AutoSuggest) {
}
$Matched = 0;
-$Suggestions = array();
$ArtistIDs = array();
-$Response = array();
-$Response['query'] = $FullName;
+$Response = array(
+ 'query' => $FullName,
+ 'suggestions' => array()
+);
foreach ($AutoSuggest as $Suggestion) {
list($ID, $Name) = $Suggestion;
if (stripos($Name, $FullName) === 0) {
diff --git a/sections/torrents/autocomplete_tags.php b/sections/torrents/autocomplete_tags.php
index bfa21624..94deb256 100644
--- a/sections/torrents/autocomplete_tags.php
+++ b/sections/torrents/autocomplete_tags.php
@@ -24,10 +24,11 @@ if (!$AutoSuggest) {
}
$Matched = 0;
-$Suggestions = array();
$ArtistIDs = array();
-$Response = array();
-$Response['query'] = $FullName;
+$Response = array(
+ 'query' => $FullName,
+ 'suggestions' => array()
+);
foreach ($AutoSuggest as $Suggestion) {
list($Name) = $Suggestion;
if (stripos($Name, $FullName) === 0) {
diff --git a/static/functions/autocomplete.js b/static/functions/autocomplete.js
index a6e6efaf..59927076 100644
--- a/static/functions/autocomplete.js
+++ b/static/functions/autocomplete.js
@@ -5,26 +5,31 @@ $(document).ready(function() {
var url = new URL();
$('#artistsearch' + SELECTOR).autocomplete({
- serviceUrl : ARTIST_AUTOCOMPLETE_URL,
+ deferRequestBy: 300,
onSelect : function(suggestion) {
window.location = 'artist.php?id=' + suggestion['data'];
},
+ serviceUrl : ARTIST_AUTOCOMPLETE_URL,
});
if (url.path == 'torrents' || url.path == 'upload' || url.path == 'artist' || (url.path == 'requests' && url.query['action'] == 'new') || url.path == 'collages') {
$("#artist" + SELECTOR).autocomplete({
+ deferRequestBy: 300,
serviceUrl : ARTIST_AUTOCOMPLETE_URL
});
$("#artistsimilar" + SELECTOR).autocomplete({
+ deferRequestBy: 300,
serviceUrl : ARTIST_AUTOCOMPLETE_URL
});
}
if (url.path == 'torrents' || url.path == 'upload' || url.path == 'collages' || url.path == 'requests' || url.path == 'top10' || (url.path == 'requests' && url.query['action'] == 'new')) {
$("#tags" + SELECTOR).autocomplete({
- serviceUrl : TAGS_AUTOCOMPLETE_URL,
- delimiter: ','
+ deferRequestBy: 300,
+ delimiter: ',',
+ serviceUrl : TAGS_AUTOCOMPLETE_URL
});
$("#tagname" + SELECTOR).autocomplete({
+ deferRequestBy: 300,
serviceUrl : TAGS_AUTOCOMPLETE_URL,
});
}
diff --git a/static/styles/global.css b/static/styles/global.css
index 8007169c..e0dac1ba 100644
--- a/static/styles/global.css
+++ b/static/styles/global.css
@@ -547,3 +547,7 @@ tr.torrent .bookmark>a:after {
width: 250px;
display: block;
}
+
+.setting_description p {
+ margin-top: 1em;
+}