Ignore:
Timestamp:
Apr 18, 2016, 11:06:31 AM (9 years ago)
Author:
ddtddt
Message:

[extensions] - read_metadata - Beta 2 - test format file + ass thumbnail

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/read_metadata/admin.php

    r31552 r31555  
    5959if (isset($_POST['submitreadmetadata'])){
    6060  if (isset($_POST['idreadmetadata']) and is_numeric($_POST['idreadmetadata'])){
    61         $query = 'select name,file,path FROM ' . IMAGES_TABLE . ' WHERE id = \''.$_POST['idreadmetadata'].'\';';
     61        $query = 'select id,name,file,path FROM ' . IMAGES_TABLE . ' WHERE id = \''.$_POST['idreadmetadata'].'\';';
    6262        $result = pwg_query($query);
    6363        $row = pwg_db_fetch_assoc($result);
     
    6767          redirect($admin_base_url);
    6868        }
     69        if(exif_imagetype($filename) != IMAGETYPE_JPEG and exif_imagetype($filename) != IMAGETYPE_TIFF_II and exif_imagetype($filename) != IMAGETYPE_TIFF_MM){
     70          $_SESSION['page_infos'] = array(l10n('This file type isn\'t use metadata'));
     71          redirect($admin_base_url);           
     72        }
     73        $rd_image = new SrcImage($row);
    6974        $name=$row['name'];
    7075        $file=$row['file'];
     
    7479                  'RM_NAME' => $name,
    7580                  'RM_FILE' => $file,
     81                  'RM_SCR' => DerivativeImage::url(IMG_THUMB, $rd_image),
    7682        ));
    7783        /*IPTC*/
Note: See TracChangeset for help on using the changeset viewer.