#1084 image upload don't load thumb (imagegals/tiki-upload_image)

v1.8RC
closed-out-of-date
nobody
None
5
2004-02-16
2003-11-27
Anonymous
No

Hi,
I installed tikiwiki v1.8 rc2:
1) upload in image galleries don't load (autogenerated)
thumb data and so it show big image.
2) During image upload error:
Notice: Undefined index: extension in
/data/web/hosting/classe-123/nightmania.net/www/tiki-upload_image.php
on line 238

I tried to resolve it:

1) In lib/imagegals/imagegallib.php in function
store_image_data a copy from $this->image to $data is
missing probabilly removed during addslashes clean.

--- imagegallib.orig.php Thu Nov 27 19:30:25 2003
+++ imagegallib.php Thu Nov 27 19:31:16 2003
@@ -513,6 +513,8 @@

if ($gal_use_db == 'y') {
// Prepare to store data in
database
+ // readded without addslashes
by sancio
+ $data = $this->image;
} else {
// Store data in directory
switch ($this->type) {

2) In tiki-upload_image.orig.php line 230:
$tmpfname = tempnam($tmpDir, "TMPIMG");
In tiki 1.7.4 '.jpg' wat appended to $tmpfname and all
work fine (some not deleted file in /tmp).
Now $tmpfname don't have an extension, but:
$t_pinfo = pathinfo($tmpfname);
$t_type = $t_pinfo["extension"];

I don't know because $t_type is passed to insert_image,
my stupid workaround:

--- tiki-upload_image.orig.php Thu Nov 27 03:57:17 2003
+++ tiki-upload_image.php Thu Nov 27 19:47:08 2003
@@ -235,8 +235,8 @@
fclose ($fp);
unlink ($tmpfname);
$t_pinfo =
pathinfo($tmpfname);
- $t_type =
$t_pinfo["extension"];
- $t_type = 'image/' .
$t_type;
+ //$t_type =
$t_pinfo["extension"];
+ $t_type = 'image/'; //
. $t_type;

$imageId

$imagegallib->insert_image($_REQUEST["galleryId"],
$name, $_REQUEST["description"], $filename, $type, $data,

Discussion

  • Philippe Cloutier

    • status: open --> closed-out-of-date
     
  • Philippe Cloutier

    Logged In: YES
    user_id=738765

    Please give us some update about that.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks