PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Fehler in admincp/subscriptions.php ?


Robert9
14.12.2005, 19:23
DELETE FROM access
WHERE forumid IN (0,N;) AND
userid = 1;

Obige query wird beim Deaktivieren eines Abos ausgeführt bzw. eben nicht.

in class_paid_subscription.php steht:
$subscription_forums = explode(',', $sub['forums']);
if (is_array($subscription_forums) AND !empty($subscription_forums))
{
$forumlist = "0";
foreach ($subscription_forums AS $key)
{
$forumlist .= ",$key";
}
$this->registry->db->query_write("
DELETE FROM " . TABLE_PREFIX . "access
WHERE forumid IN ($forumlist) AND
userid = $userid
");
}

Jetzt bleibt die Frage, wo kommt das N; her?

Robert9
14.12.2005, 19:39
Ok. Entwarnung. Warum auch immer steht das N; in meiner Datenbank; evtl. vom Update über geblieben.

Robert9
14.12.2005, 19:49
Trotzdem stimmt irgendwas nicht.
Setze ich aktiv auf no, => (0,)
Setze ich aktiv auf yes = > forumid IN ()

Beides ist Mist.

Abhilfe schafft in 228 add: $forumlist = "0";

und in 376
if (intval($key) > 0) {
$forumlist .= ",$key";
}


Aber der Fehler muss woanders liegen, oder?

Mystics
14.12.2005, 23:25
Das sollte helfen:

http://www.vbulletin-germany.com/forum/showpost.php?p=129435&postcount=7