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
24a2f6fe4c
commit
b11239da33
@ -44,10 +44,10 @@
|
||||
if (stripos($Name,$FullName) === 0) {
|
||||
$Suggestions[] = display_str($Name);
|
||||
$Snatches[] = number_format($Snatch).' snatches';
|
||||
$Links[] = 'http'.($SSL?'s':'').'://'.$_SERVER['HTTP_HOST'].'/artist.php?id='.$ID;
|
||||
$ArtistIDs[] = $ID;
|
||||
if (++$Matched > 9) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
echo json_encode(array($FullName,$Suggestions,$Snatches,$Links));
|
||||
echo json_encode(array($FullName,$Suggestions,$Snatches,$ArtistIDs));
|
||||
|
@ -389,19 +389,17 @@
|
||||
FROM artists_alias AS aa
|
||||
WHERE aa.Name = '".db_string($Artist['name'])."'");
|
||||
|
||||
if($DB->record_count() > 0) {
|
||||
while($Result = $DB->next_record(MYSQLI_NUM, false)) {
|
||||
list($ArtistID, $AliasID, $AliasName, $Redirect) = $Result;
|
||||
if(!strcasecmp($Artist['name'], $AliasName)) {
|
||||
if($Redirect) {
|
||||
$AliasID = $Redirect;
|
||||
}
|
||||
break;
|
||||
while(list($ArtistID, $AliasID, $AliasName, $Redirect) = $DB->next_record(MYSQLI_NUM, false)) {
|
||||
if(!strcasecmp($Artist['name'], $AliasName)) {
|
||||
if($Redirect) {
|
||||
$AliasID = $Redirect;
|
||||
}
|
||||
$ArtistForm[$Importance][$Num] = array('id' => $ArtistID, 'aliasid' => $AliasID, 'name' => $AliasName);
|
||||
$Cache->delete_value('artist_'.$ArtistID);
|
||||
break;
|
||||
}
|
||||
$ArtistForm[$Importance][$Num] = array('id' => $ArtistID, 'aliasid' => $AliasID, 'name' => $AliasName);
|
||||
$Cache->delete_value('artist_'.$ArtistID);
|
||||
} else {
|
||||
}
|
||||
if(!$ArtistID) {
|
||||
//2. For each artist that didn't exist, create an artist.
|
||||
$DB->query("INSERT INTO artists_group (Name) VALUES ('".db_string($Artist['name'])."')");
|
||||
$ArtistID = $DB->inserted_id();
|
||||
|
@ -515,17 +515,16 @@
|
||||
aa.Redirect
|
||||
FROM artists_alias AS aa
|
||||
WHERE aa.Name = '".db_string($Artist['name'])."'");
|
||||
if($DB->record_count() > 0){
|
||||
while($Result = $DB->next_record(MYSQLI_NUM, false)) {
|
||||
list($ArtistID, $AliasID, $AliasName, $Redirect) = $Result;
|
||||
if($DB->record_count() > 0) {
|
||||
while(list($ArtistID, $AliasID, $AliasName, $Redirect) = $DB->next_record(MYSQLI_NUM, false)) {
|
||||
if(!strcasecmp($Artist['name'], $AliasName)) {
|
||||
if($Redirect) {
|
||||
$AliasID = $Redirect;
|
||||
}
|
||||
$ArtistForm[$Importance][$Num] = array('id' => $ArtistID, 'aliasid' => $AliasID, 'name' => $AliasName);
|
||||
break;
|
||||
}
|
||||
}
|
||||
$ArtistForm[$Importance][$Num] = array('id' => $ArtistID, 'aliasid' => $AliasID, 'name' => $AliasName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ Spent hours debugging opera, turns out they reserve the global variable autocomp
|
||||
var autocomp = {
|
||||
id: "",
|
||||
value: "",
|
||||
href: null,
|
||||
artistid: null,
|
||||
timer: null,
|
||||
input: null,
|
||||
list: null,
|
||||
@ -23,7 +23,7 @@ var autocomp = {
|
||||
},
|
||||
end: function () {
|
||||
//this.input.value = this.value;
|
||||
this.href = null;
|
||||
this.artistid = null;
|
||||
this.highlight(-1);
|
||||
this.list.style.visibility = 'hidden';
|
||||
clearTimeout(this.timer);
|
||||
@ -35,7 +35,7 @@ var autocomp = {
|
||||
case 27: //esc
|
||||
break;
|
||||
case 8: //backspace
|
||||
this.href = null;
|
||||
this.artistid = null;
|
||||
this.list.style.visibility = 'hidden';
|
||||
this.timer = setTimeout("autocomp.get('" + escape(this.input.value) + "');",500);
|
||||
break;
|
||||
@ -43,17 +43,17 @@ var autocomp = {
|
||||
case 40: //down
|
||||
this.highlight(key);
|
||||
if(this.pos !== -1) {
|
||||
this.href = this.list.children[this.pos].href;
|
||||
this.artistid = this.list.children[this.pos].artistid;
|
||||
this.input.value = this.list.children[this.pos].textContent || this.list.children[this.pos].value;
|
||||
}
|
||||
break;
|
||||
case 13:
|
||||
if(this.href != null) {
|
||||
window.location = this.href;
|
||||
if(this.artistid != null) {
|
||||
window.location = this.id + '.php?id='+this.artistid;
|
||||
}
|
||||
return 0;
|
||||
default:
|
||||
this.href = null;
|
||||
this.artistid = null;
|
||||
this.timer = setTimeout("autocomp.get('" + escape(this.input.value) + "');",300);
|
||||
return 1;
|
||||
}
|
||||
@ -107,7 +107,7 @@ var autocomp = {
|
||||
if (this.pos !== -1) {
|
||||
this.list.children[this.pos].className = "highlight";
|
||||
} else {
|
||||
this.href = null;
|
||||
this.artistid = null;
|
||||
this.input.value = this.value;
|
||||
}
|
||||
},
|
||||
@ -133,12 +133,12 @@ var autocomp = {
|
||||
li = document.createElement('li');
|
||||
li.innerHTML = data[1][i];
|
||||
li.i = i;
|
||||
li.href = data[3][i];
|
||||
li.artistid = data[3][i];
|
||||
listener.set(li,'mouseover',function(){
|
||||
autocomp.highlight(this.i);
|
||||
});
|
||||
listener.set(li,'click',function(){
|
||||
window.location = this.href;
|
||||
window.location = autocomp.id + '.php?id='+this.artistid;
|
||||
});
|
||||
this.list.appendChild(li);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user