1
danruiid
Image Manager DB bug!
  • 2003/9/26 23:07

  • danruiid

  • Just popping in

  • Posts: 5

  • Since: 2002/12/3


Well, in maintaining my tradiiton of bringing bad news, I submit:

Using the Image Manager, I create a category that stores the images inside the database. I upload. Good.

Now, I attempt to rename one of the images. All of the images disappear. I get a page that says "image 1 upload failed," "image 2 upload failed," etc. All relevent data is still present in the database.

???

Don't you just love bad news? I'm off to

2
domifara
Re: Image Manager DB bug!
  • 2003/10/14 3:50

  • domifara

  • Just popping in

  • Posts: 25

  • Since: 2003/9/11


Yesterday About this bug, since the cause was found
Quote:
danruiid wrote:
Using the Image Manager, I create a category that stores the images inside the database. I upload. Good.

Now, I attempt to rename one of the images. All of the images disappear.


ALL xoops2.0.X : spell miss imagebody table name

'image_body' --> 'imagebody'

/kernel/image.php from about line 160
Before
if (isset($image_body) && $image_body != '') {
                
$sql sprintf("UPDATE %s SET image_body = %s WHERE image_id = %u"$this->db->prefix([u][color=990000]'image_body'[/color][/u]), $this->db->quoteString($image_body), $image_id);
                if (!
$result $this->db->query($sql)) {
                    
$this->db->query(sprintf("DELETE FROM %s WHERE image_id = %u"$this->db->prefix('image'), $image_id));
                    return 
false;
                }
            }

After
if (isset($image_body) && $image_body != '') {
                
$sql sprintf("UPDATE %s SET image_body = %s WHERE image_id = %u"$this->db->prefix([u][color=990000]'imagebody'[/color][/u]), $this->db->quoteString($image_body), $image_id);
                if (!
$result $this->db->query($sql)) {
                    
$this->db->query(sprintf("DELETE FROM %s WHERE image_id = %u"$this->db->prefix('image'), $image_id));
                    return 
false;
                }
            }


Login

Who's Online

233 user(s) are online (136 user(s) are browsing Support Forums)


Members: 0


Guests: 233


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits