Changeset 1058 for trunk/upload.php


Ignore:
Timestamp:
Feb 28, 2006, 2:13:16 AM (18 years ago)
Author:
rvelices
Message:

remake of Remote sites and synchronize: final integration and old code cleanup

fix: xml getAttribute always decodes html entities and added encodeAttribute
function

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/upload.php

    r1036 r1058  
    33// | PhpWebGallery - a PHP based picture gallery                           |
    44// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
    5 // | Copyright (C) 2003-2005 PhpWebGallery Team - http://phpwebgallery.net |
     5// | Copyright (C) 2003-2006 PhpWebGallery Team - http://phpwebgallery.net |
    66// +-----------------------------------------------------------------------+
    77// | branch        : BSF (Best So Far)
     
    126126  $page['cat_name']       = $result['name'];
    127127  $page['cat_uploadable'] = $result['uploadable'];
    128   if ($page['cat_site_id'] != 1 or !$page['cat_uploadable'])
     128  if ( url_is_remote($page['cat_dir']) or !$page['cat_uploadable'])
    129129  {
    130130    echo '<div style="text-align:center;">'.$lang['upload_forbidden'].'<br />';
     
    183183  //        date_creation="2004-08-14" name="" />
    184184  $xml_infos = '<infos';
    185   $xml_infos.= ' author="'.htmlspecialchars($_POST['author'],ENT_QUOTES).'"';
    186   $xml_infos.= ' comment="'.htmlspecialchars($_POST['comment'],ENT_QUOTES).'"';
    187   $xml_infos.= ' date_creation="'.$date_creation.'"';
    188   $xml_infos.= ' name="'.htmlspecialchars( $_POST['name'], ENT_QUOTES).'"';
     185  $xml_infos.= encodeAttribute('author', $_POST['author']);
     186  $xml_infos.= encodeAttribute('comment', $_POST['comment']);
     187  $xml_infos.= encodeAttribute('date_creation', $date_creation);
     188  $xml_infos.= encodeAttribute('name', $_POST['name']);
    189189  $xml_infos.= ' />';
    190190
Note: See TracChangeset for help on using the changeset viewer.