Last active
August 29, 2015 13:58
-
-
Save kp1/10333948 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/class/album.class.php b/lib/class/album.class.php | |
index 4f6e1ff..0280cb8 100644 | |
--- a/lib/class/album.class.php | |
+++ b/lib/class/album.class.php | |
@@ -201,13 +201,13 @@ class Album extends database_object { | |
$disk = 0; | |
} | |
- if (isset(self::$_mapcache[$name][$year][$disk][$mbid])) { | |
- return self::$_mapcache[$name][$year][$disk][$mbid]; | |
+ if (isset(self::$_mapcache[$name][$disk][$mbid])) { | |
+ return self::$_mapcache[$name][$disk][$mbid]; | |
} | |
$sql = 'SELECT `id` FROM `album` WHERE `name` = ? AND `disk` = ? AND ' . | |
- '`year` = ? AND `mbid` '; | |
- $params = array($name, $disk, $year); | |
+ ' `mbid` '; | |
+ $params = array($name, $disk); | |
if ($mbid) { | |
$sql .= '= ? '; | |
@@ -230,7 +230,7 @@ class Album extends database_object { | |
if ($row = Dba::fetch_assoc($db_results)) { | |
$id = $row['id']; | |
- self::$_mapcache[$name][$year][$disk][$mbid] = $id; | |
+ self::$_mapcache[$name][$disk][$mbid] = $id; | |
return $id; | |
} | |
@@ -247,7 +247,7 @@ class Album extends database_object { | |
} | |
$id = Dba::insert_id(); | |
- self::$_mapcache[$name][$year][$disk][$mbid] = $id; | |
+ self::$_mapcache[$name][$disk][$mbid] = $id; | |
return $id; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment