Ticket #4118

XoopsImageHandleのdelete()でDB保存したデータが未削除
Date d'ouverture: 2004-03-25 04:34 Dernière mise à jour: 2004-03-30 19:33

Rapporteur:
Propriétaire:
(Aucun)
Type:
État:
Atteints
Composant:
(Aucun)
Jalon:
(Aucun)
Priorité:
5 - moyen
Sévérité:
5 - moyen
Résolution:
Fixed
Fichier:
Aucun

Détails

kernel/image.phpで、定義されているXoopsImageHandleの
deleteメソッドですが、
function delete(&$image)
{
if (get_class($image) != 'xoopsimage') {
return false;
}
$id = $image->getVar('image_id');
$sql = sprintf("DELETE FROM %s WHERE image_id
= %u", $this->db->prefix('image'), $id);
if (!$result = $this->db->query($sql)) {
return false;
}
$sql = sprintf("DELETE FROM %s WHERE image_id
= %u", $this->db->prefix('imagebody'), $id);
return true;
}
となっていて、最後の$sqlは発行されていないため、イメージマ
ネージャでDB保存している場合、保存されたバイナリデータが削
除されずにゴミとして残ってしまいます。

Ticket History (1/1 Histories)

2004-03-30 19:33 Updated by: onokazu
  • Ticket Close date is changed to 2004-03-30 19:33
  • Résolution Update from Aucun to Fixed
  • État Update from Ouvert to Atteints
Commentaire
Logged In: YES
user_id=754

ありがとうございます。修正いたしました。
http://cvs.sourceforge.jp/cgi-
bin/viewcvs.cgi/xoops/xoops2/kernel/image.php.diff?
r1=1.3&r2=1.4

Attachment File List

No attachments

Modifier

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Connexion