Changeset 724 for trunk/app/controllers

Show
Ignore:
Timestamp:
08/14/08 15:21:41 (4 months ago)
Author:
aarkerio
Message:

Little changes

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/app/controllers/shares_controller.php

    r696 r724  
    103103     
    104104    /** Security: checks to see if file is an image, if not do not allow upload ==*/ 
    105     if ( $type == "application/x-php"): // .php is not a valid file!!!     
     105    if ( $type == 'application/x-php'):  // .php is not valid file!!!     
    106106        $msg = 'Error the file '. $file_name . ' is not valid. No se pueden agregar archivos .php, subelo como .txt'; 
    107107        /**  delete uploaded file ==*/ 
     
    112112     
    113113    if ( $file_size > $maxfilesize): 
    114      $msg  = 'Error. The image is too big. Bigger than 30 MB. The current size: ' . $file_size ; 
    115          
     114    $msg  = 'Error. The image is too big. Bigger than 30 MB. The current size: ' . $file_size ;      
    116115        /**  delete uploaded file ==*/ 
    117116        unlink($file); 
     
    120119    endif; 
    121120     
    122     $conditions  = array("user_id" =>  $this->Auth->user('id')); 
    123      
    124     $order       = "Share.id DESC"; 
     121    $conditions  = array('user_id' =>  $this->Auth->user('id')); 
     122     
     123    $order       = 'Share.id DESC'; 
    125124     
    126125    $current_id  = $this->Share->field('id', $conditions, $order); 
     
    130129    $extension   = $this->get_extension($file_name); 
    131130     
    132     $allowed     = array("pdf", "doc", "xls", "xcf", "ppt", "sxw", "odt", "odc", "ods", "odp", "abw", "html", "zip", "rar", "gz", "png", "jpg", "gif", "svg", "mp3", "ogg", "flac", "txt"); 
     131    $allowed     = array('pdf', 'doc', 'xls', 'xcf', 'ppt', 'sxw', 'odt', 'odc', 'swf', 'ods', 'odp', 'abw', 'html', 'zip', 'rar', 'gz', 'png', 'jpg', 'gif', 'svg', 'mp3', 'ogg', 'flac', 'txt'); 
    133132     
    134133    if ( !in_array($extension, $allowed) ): 
    135             die("This does not look like one allowed file ". $extension); 
     134            die(__('This does not look like one allowed file', true) .' '. $extension); 
    136135    endif; 
    137136