Changeset 527

Show
Ignore:
Timestamp:
05/24/08 17:27:20 (5 years ago)
Author:
Tatzelwurm
Message:

Kein "rn" Problem mehr bei fehlerhaften Eingaben

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • downloadDatabase/files/lib/acp/form/DownloadDBDataAddForm.class.php

    r524 r527  
    1111 *  
    1212 * @author              Robert "Tatzelwurm" Hempel 
    13  * @copyright   2007/2008 INSIDE das Hrspiel 
     13 * @copyright   2007/2008 INSIDE das Hörspiel 
    1414 * @license     GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php> 
    1515 * @package             de.inside.wcf.downloaddb 
     
    6161                                 
    6262                if (isset($_POST['katID']))                     $this->katID            = intval($_REQUEST['katID']); 
    63                 if (isset($_POST['name']))                      $this->name                     = escapeString(StringUtil::trim($_REQUEST['name'])); 
    64                 if (isset($_POST['description']))       $this->description      = escapeString(StringUtil::trim($_POST['description'])); 
     63                if (isset($_POST['name']))                      $this->name                     = StringUtil::trim($_REQUEST['name']); 
     64                if (isset($_POST['description']))       $this->description      = StringUtil::trim($_POST['description']); 
    6565                if (isset($_POST['previewIMG']))        $this->previewIMG       = StringUtil::encodeHTML($_POST['previewIMG']); 
    6666                if (isset($_POST['previewFile']))       $this->previewFile      = StringUtil::encodeHTML($_POST['previewFile']); 
     
    8080                if (isset($_FILES['previewArray']))     $this->previewArray = $_FILES['previewArray']; 
    8181                // Action 
    82                 if (isset($_POST['action']))            $this->action           = escapeString($_POST['action']); 
     82                if (isset($_POST['action']))            $this->action           = StringUtil::toLowerCase(escapeString($_POST['action'])); 
    8383        } 
    8484         
     
    135135                                        // import file 
    136136                                        $this->dataID = DownloadDBDataEditor::createFile($this->upload['tmp_name'], $this->upload['name'], $this->upload['type'], 'upload'); 
    137                                         $this->groesse = $this->upload['size']; 
     137                                        $this->groesse = intval($this->upload['size']); 
    138138                                } else { 
    139139                                        throw new UserInputException('upload'); 
     
    150150                                                        } 
    151151                                                        $this->groesse = @filesize($_SERVER['DOCUMENT_ROOT'].$this->link); 
    152                                                         $this->mimeType = ''; 
    153152// Funktioniert nur wenn "fileinfo" in php aktiviert ist!!  
    154153//                                                      $finfo = @finfo_open(FILEINFO_MIME); // return mime type ala mimetype extension 
    155154//                                                      $this->mimeType = @finfo_file($finfo, $_SERVER['DOCUMENT_ROOT'].$this->link); 
     155                                                        $this->mimeType = ''; /*#### Entfernen wenn fileinfo aktiv ist ###*/ 
    156156// daher ist $mimeType = ''; 
    157157                                                } 
     
    168168// Funktioniert nur wenn "fileinfo" in php aktiviert ist!!  
    169169//                                                      $finfo = @finfo_open(FILEINFO_MIME); // return mime type ala mimetype extension 
    170 //                                                      $this->mimeType = finfo_file($finfo, $this->link); 
     170//                                                      $this->mimeType = @finfo_file($finfo, $_SERVER['DOCUMENT_ROOT'].$this->link); 
     171                                                        $this->mimeType = ''; /*#### Entfernen wenn fileinfo aktiv ist ###*/ 
    171172// daher ist $mimeType = ''; 
    172173                                                } 
     
    205206                                        $dataset->updateDataset(array( 
    206207                                                        'katID'                 => intval($this->katID), 
    207                                                         'name'                  => $this->name, 
    208                                                         'description'   => $this->description, 
     208                                                        'name'                  => escapeString($this->name), 
     209                                                        'description'   => escapeString($this->description), 
    209210                                                        'previewIMG'    => escapeString($this->previewIMG), 
    210211                                                        'previewFile'   => StringUtil::encodeHTML($this->previewFile), 
     
    229230                                // dataID = NULL 
    230231                                //Create new Dataset if no file is given 
    231                                 $dataset = DownloadDBDataEditor::createDataset(intval($this->katID), $this->name, $this->description ,array( 
     232                                $dataset = DownloadDBDataEditor::createDataset(intval($this->katID), escapeString($this->name), escapeString($this->description) ,array( 
    232233                                                        'link'                  => $this->link, 
    233234                                                        'fileName'              => escapeString($this->fileName), 
     
    308309                        'katOptions'    => $this->katOptions, 
    309310                        'katID'                 => $this->katID, 
    310                         'name'                  => stripslashes($this->name), 
    311                         'description'   => stripslashes($this->description), 
     311                        'name'                  => $this->name, 
     312                        'description'   => $this->description, 
    312313                        'previewIMG'    => $this->previewIMG, 
    313314                        'previewFile'   => $this->previewFile,