Advertisement:

Author Topic: Ad importer images crash  (Read 1267 times)

badluck

  • Newbie
  • *
  • Posts: 12
Ad importer images crash
« on: January 18, 2014, 12:10:34 am »
When i was importing xml ads with remote images links it was ok, all images where loaded, but when i uplaoded images local, download time was 0.002 and import plugin crashed with an fatal error. Again, few hours of debug and fix released (i use last version of osclass).

in index.php from ads importer plugin folder replace :

Code: [Select]
foreach($image_list as $image) {
        $tmp_name = "adimporterimage_".time();
        $image_ok = osc_downloadFile($image->nodeValue, $tmp_name);
        if($image_ok) {
            $photos['error'][] = 0;
            $photos['size'][] = 100;
            $photos['type'][] = 'image/jpeg';
            $photos['tmp_name'][] = osc_content_path()."downloads/".$tmp_name;
        }
    }

with


Code: [Select]
foreach($image_list as $k=>$image) {
        $tmp_name = "adimporterimage_".$k."_".time();
        $image_ok = osc_downloadFile($image->nodeValue, $tmp_name);
        if($image_ok) {
            $photos['error'][] = 0;
            $photos['size'][] = 100;
            $photos['type'][] = 'image/jpeg';
            $photos['tmp_name'][] = osc_content_path()."downloads/".$tmp_name;
        }
    }

tomshaft

  • Hero Member
  • *****
  • Posts: 862
  • Osshaft for Osclass - Add 650 posts to my total
Re: Ad importer images crash
« Reply #1 on: January 18, 2014, 12:17:49 am »
This is what is needed. Many, many plugins fail in latest Osclass so must be "updated"....
 
Tom

frosticek

  • Hero Member
  • *****
  • Posts: 3948
Re: Ad importer images crash
« Reply #2 on: January 18, 2014, 12:47:54 am »
@badluck
Thanks for nice update, please root this to @_CONEJO so he can update plugin  ;)