Changeset 1058


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

Location:
trunk
Files:
4 deleted
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin.php

    r1049 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)
     
    8282    'U_CAT_STATUS'=> $opt_link.'status',
    8383    'U_CAT_OPTIONS'=> $link_start.'cat_options',
    84     'U_CAT_UPDATE'=> $link_start.'update',
     84    'U_CAT_UPDATE'=> $link_start.'site_update&site=1',
    8585    'U_WAITING'=> $link_start.'waiting',
    8686    'U_COMMENTS'=> $link_start.'comments',
     
    106106    );
    107107}
    108  
     108
    109109//------------------------------------------------------------- content display
    110110$page['errors'] = array();
  • trunk/admin/cat_modify.php

    r1004 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)
     
    259259                                       '',
    260260                                       get_complete_dir($category['id']))));
    261   $template->assign_block_vars('upload' ,array());
    262261}
    263262else
     
    301300}
    302301
    303 if (is_numeric($category['site_id']) and $category['site_id'] != 1)
     302$category['cat_dir'] = get_complete_dir($_GET['cat_id']);
     303if (is_numeric($category['site_id']) and url_is_remote($category['cat_dir']) )
    304304{
    305305  $query = '
     
    312312}
    313313
     314if (!$category['is_virtual'] and !url_is_remote($category['cat_dir']) )
     315{
     316  $template->assign_block_vars('upload' ,array());
     317}
     318
    314319//----------------------------------------------------------- sending html code
    315320$template->assign_var_from_handle('ADMIN_CONTENT', 'categories');
  • trunk/admin/site_manager.php

    • Property svn:eol-style set to native
    r1033 r1058  
    6464  else
    6565  {
    66     array_push($page['errors'], l10n('remote_site_file_not_found'));
     66    array_push($page['errors'], l10n('site_err_remote_file_not_found'));
    6767  }
    6868}
     
    100100  {
    101101    array_push($page['errors'],
    102       l10n('remote_site_already_exists').' ['.$url.']');
     102      l10n('site_already_exists').' ['.$url.']');
    103103  }
    104104  if (count($page['errors']) == 0)
     
    115115        {
    116116          array_push($page['errors'],
    117                      l10n('remote_site_error').' : '.$first_line);
     117                     l10n('site_err').' : '.$first_line);
    118118        }
    119119      }
    120120      else
    121121      {
    122         array_push($page['errors'], l10n('remote_site_file_not_found') );
     122        array_push($page['errors'], l10n('site_err_remote_file_not_found') );
    123123      }
    124124    }
     
    143143    pwg_query($query);
    144144    array_push($page['infos'],
    145                $url.' '.l10n('remote_site_created'));
     145               $url.' '.l10n('site_created'));
    146146  }
    147147}
     
    189189      delete_site($page['site']);
    190190      array_push($page['infos'],
    191                  $galleries_url.' '.l10n('remote_site_deleted'));
     191                 $galleries_url.' '.l10n('site_deleted'));
    192192      break;
    193193    }
     
    197197$template->assign_vars( array(
    198198  'F_ACTION' => PHPWG_ROOT_PATH.'admin.php'
    199                 .get_query_string_diff( array('action','site') ) 
     199                .get_query_string_diff( array('action','site') )
    200200  ) );
    201  
     201
    202202// +-----------------------------------------------------------------------+
    203203// |                           remote sites list                           |
     
    227227  $update_url.= '?page=site_update';
    228228  $update_url.= '&site='.$row['id'];
    229 
    230229  $template->assign_block_vars(
    231230    'sites.site',
    232231    array(
    233232      'NAME' => $row['galleries_url'],
    234       'TYPE' => l10n( $is_remote ? 'Remote' : 'Local' ),
     233      'TYPE' => l10n( $is_remote ? 'site_remote' : 'site_local' ),
    235234      'CATEGORIES' => $row['nb_categories'],
    236235      'IMAGES' => isset($row['nb_images']) ? $row['nb_images'] : 0,
    237       'U_UPDATE' => $update_url
     236      'U_SYNCHRONIZE' => $update_url
    238237     )
    239238   );
    240 
    241239   if ($is_remote)
    242240   {
  • trunk/admin/site_reader_local.php

    • Property svn:eol-style set to native
    r1029 r1058  
    4747  if (!is_dir($this->site_url))
    4848  {
    49     array_push($errors, array('path' => $this->site_url, 'type' => 'PWG-ERROR-NODIR'));
     49    array_push($errors, array('path' => $this->site_url, 'type' => 'PWG-ERROR-NO-FS'));
    5050    return false;
    5151  }
     
    6161
    6262/**
    63  * Returns an array with all file system files according to $conf['file_ext'] 
     63 * Returns an array with all file system files according to $conf['file_ext']
    6464 * and $conf['picture_ext']
    6565 * @param string $path recurse in this directory
     
    131131}
    132132
    133 // returns the name of the attributes that are supported for 
     133// returns the name of the attributes that are supported for
    134134// update/synchronization according to configuration
    135135function get_update_attributes()
    136136{
    137137  global $conf;
    138   $update_fields = array( 'has_high', 'representative_ext', 
     138  $update_fields = array( 'has_high', 'representative_ext',
    139139      'filesize', 'width', 'height' );
    140140  if ($conf['use_exif'])
     
    166166    return null;
    167167  }
    168  
     168
    169169  $data = array();
    170  
     170
    171171  $filename = basename($file);
    172172  $data['has_high'] = $this->get_has_high( dirname($file), $filename );
    173   $data['representative_ext'] = $this->get_representative_ext( dirname($file), 
     173  $data['representative_ext'] = $this->get_representative_ext( dirname($file),
    174174                                        get_filename_wo_extension($filename) );
    175  
     175
    176176  $data['filesize'] = floor(filesize($file)/1024);
    177177  if ($image_size = @getimagesize($file))
  • trunk/admin/site_reader_remote.php

    • Property svn:eol-style set to native
    r1046 r1058  
    7272  else
    7373  {
    74     array_push($errors, array('path' => $listing_file, 'type' => 'PWG-ERROR-NO-FS'));
     74    array_push($errors, array('path' => $listing_file, 'type' => 'PWG-ERROR-NOLISTING'));
    7575    return false;
    7676  }
     
    9595
    9696/**
    97  * Returns a hash with all elements (images and files) inside the full $path 
     97 * Returns a hash with all elements (images and files) inside the full $path
    9898 * according to listing.xml
    9999 * @param string $path recurse in this directory only
     
    110110      foreach ( $files as $file)
    111111      {
    112         $data = $this->get_element_attributes($file, 
     112        $data = $this->get_element_attributes($file,
    113113                                              $this->insert_attributes);
    114114        $elements[$file] = $data;
     
    120120}
    121121
    122 // returns the name of the attributes that are supported for 
     122// returns the name of the attributes that are supported for
    123123// update/synchronization according to listing.xml
    124124function get_update_attributes()
     
    130130function get_element_update_attributes($file)
    131131{
    132     return $this->get_element_attributes($file, 
     132    return $this->get_element_attributes($file,
    133133                                         $this->update_attributes);
    134134}
     
    138138 * Returns a hash of image/file attributes
    139139 * @param string $file fully qualified file name
    140  * @param array $attributes specifies which attributes to retrieve 
     140 * @param array $attributes specifies which attributes to retrieve
    141141 *  returned
    142142*/
     
    144144{
    145145  $xml_element = $this->site_files[$file];
    146   if ( ! isset($xml_element) ) 
     146  if ( ! isset($xml_element) )
    147147  {
    148148    return null;
     
    153153    if (getAttribute($xml_element, $att) != '')
    154154    {
    155       $val = html_entity_decode( getAttribute($xml_element, $att) );
     155      $val = getAttribute($xml_element, $att);
    156156      $data[$att] = addslashes($val);
    157157    }
  • trunk/admin/site_update.php

    • Property svn:eol-style set to native
    r1033 r1058  
    5151
    5252$error_labels = array(
    53   'PWG-UPDATE-1' => array( l10n('update_wrong_dirname_short'), 
     53  'PWG-UPDATE-1' => array( l10n('update_wrong_dirname_short'),
    5454                           l10n('update_wrong_dirname_info') ),
    5555  'PWG-UPDATE-2' => array( l10n('update_missing_tn_short'),
    56                            l10n('update_missing_tn_info') 
     56                           l10n('update_missing_tn_info')
    5757                           . implode(',', $conf['picture_ext']) ),
    58   'PWG-ERROR-NO-FS' => array( l10n('Does not exist'),
     58  'PWG-ERROR-NO-FS' => array( l10n('update_missing_file_or_dir'),
    5959                             l10n('update_missing_file_or_dir_info')),
    60   'PWG-ERROR-VERSION' => array( l10n('Invalid PhpWebGalley version'),
    61                              l10n('update_pwg_version_differs_info')),
    62   'PWG-ERROR-NOLISTING' => array( l10n('remote_site_listing_not_found'),
    63                              l10n('remote_site_listing_not_found_info'))
     60  'PWG-ERROR-VERSION' => array( l10n('update_err_pwg_version_differs'),
     61                             l10n('update_err_pwg_version_differs_info')),
     62  'PWG-ERROR-NOLISTING' => array( l10n('update_err_remote_listing_not_found'),
     63                             l10n('update_err_remote_listing_not_found_info'))
    6464                      );
    6565$errors = array();
     
    409409        $insert{'date_available'} = CURRENT_DATE;
    410410        $insert{'tn_ext'} = $fs[$path]['tn_ext'];
    411         $insert{'has_high'} = $fs[$path]['has_high'];
     411        if ( isset($fs[$path]['has_high']) )
     412        {
     413          $insert{'has_high'} = $fs[$path]['has_high'];
     414        }
     415        else
     416        {
     417          $insert{'has_high'} = null;
     418        }
    412419        $insert{'path'} = $path;
    413420
     
    431438      $insert{'date_available'} = CURRENT_DATE;
    432439      $insert{'has_high'} = $fs[$path]['has_high'];
     440      if ( isset($fs[$path]['has_high']) )
     441      {
     442        $insert{'has_high'} = $fs[$path]['has_high'];
     443      }
     444      else
     445      {
     446        $insert{'has_high'} = null;
     447      }
    433448      $insert{'path'} = $path;
    434449
     
    525540      foreach ($fields['update'] as $field)
    526541      {
    527         $data[$field] = getAttribute($row['infos'], $field);
     542        $data[$field] = addslashes( getAttribute($row['infos'], $field) );
    528543      }
    529544
     
    582597// |                          synchronize metadata                         |
    583598// +-----------------------------------------------------------------------+
    584 if (isset($_POST['submit']) and preg_match('/^metadata/', $_POST['sync']) 
     599if (isset($_POST['submit']) and preg_match('/^metadata/', $_POST['sync'])
    585600         and !$general_failure)
    586601{
     
    643658    mass_updates(IMAGES_TABLE, $fields, $datas);
    644659  }
    645  
     660
    646661  echo '<!-- metadata update : ';
    647662  echo get_elapsed_time($start, get_moment());
     
    672687if ($site_is_remote and !isset($_POST['submit']) )
    673688{
    674   $used_metadata.= ' + ' . l10n('Aditionnal remote attributes');
     689  $used_metadata.= ' + ...';
    675690}
    676691
  • trunk/category.php

    r1057 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)
     
    436436  // upload a picture in the category
    437437  if (is_numeric($page['cat'])
    438       and $page['cat_site_id'] == 1
     438//      and $page['cat_site_id'] == 1
    439439      and $page['cat_dir'] != ''
    440440      and $page['cat_uploadable'])
  • trunk/include/functions_xml.inc.php

    r862 r1058  
    5454//  echo htmlentities($element).'<br /><br />';
    5555  $regex = '/^<\w+[^>]*'.$attribute.'\s*=\s*"('.VAL_REG.')"/i';
    56   if ( preg_match( $regex, $element, $out ) ) return $out[1];
     56  if ( preg_match( $regex, $element, $out ) )
     57  {
     58    return html_entity_decode($out[1], ENT_QUOTES);
     59  }
    5760  else return '';
     61}
     62
     63// The function encode Attribute returns the xml attribute $attribute="$value"
     64function encodeAttribute( $attribute, $value )
     65{
     66  return $attribute.'="'.htmlspecialchars($value, ENT_QUOTES).'" ';
    5867}
    5968       
  • trunk/language/en_UK.iso-8859-1/admin.lang.php

    r1049 r1058  
    136136$lang['Select at least one picture'] = 'Select at least one picture';
    137137$lang['Select at least one user'] = 'Select at least one user';
     138$lang['Site manager'] = 'Site manager';
    138139$lang['Show info'] = 'Show info';
    139140$lang['Show number of comments'] = 'Show number of comments';
     
    192193$lang['dissociate from category'] = 'dissociate from category';
    193194$lang['dissociate from group'] = 'dissociate from group';
    194 $lang['down'] = 'Move down';
    195195$lang['edit category permissions'] = 'edit category permissions';
    196196$lang['edit'] = 'Edit';
     
    245245$lang['registration_date'] = 'registration date';
    246246$lang['remote_site'] = 'Remote site';
    247 $lang['remote_site_already_exists'] = 'This site already exists';
    248247$lang['remote_site_clean'] = 'clean';
    249248$lang['remote_site_clean_hint'] = 'remove remote listing.xml file';
    250 $lang['remote_site_create'] = 'Create a new site : (give its URL to create_listing_file.php)';
    251 $lang['remote_site_created'] = 'created';
    252 $lang['remote_site_delete'] = 'delete';
    253 $lang['remote_site_delete_hint'] = 'delete this site and all its attached elements';
    254 $lang['remote_site_deleted'] = 'deleted';
    255 $lang['remote_site_error'] = 'an error happened';
    256 $lang['remote_site_file_not_found'] = 'file create_listing_file.php on remote site was not found';
    257249$lang['remote_site_generate'] = 'generate listing';
    258250$lang['remote_site_generate_hint'] = 'generate file listing.xml on remote site';
    259 $lang['remote_site_listing_not_found'] = 'listing.xml file was not found';
    260251$lang['remote_site_local_found'] = 'A local listing.xml file has been found for ';
    261 $lang['remote_site_local_new'] = '(new site)';
    262252$lang['remote_site_local_update'] = 'read local listing.xml and update';
    263 $lang['remote_site_removed'] = 'was removed on remote site';
    264 $lang['remote_site_removed_title'] = 'Removed elements';
     253$lang['remote_site_test'] = 'test';
     254$lang['remote_site_test_hint'] = 'test this remote site';
    265255$lang['remote_site_uncorrect_url'] = 'Remote site url must start by http or https and must only contain characters among "/", "a-zA-Z0-9", "-" or "_"';
    266 $lang['remote_site_update'] = 'update';
    267 $lang['remote_site_update_hint'] = 'read remote listing.xml and updates database';
    268 $lang['remote_sites'] = 'Remote sites';
    269256$lang['remove keyword'] = 'remove keyword';
    270257$lang['selection'] = 'selection';
    271258$lang['set to'] = 'set to';
    272259$lang['singly represented'] = 'singly represented';
     260$lang['site_already_exists'] = 'This site already exists';
     261$lang['site_create'] = 'Create a new site : (give its URL to create_listing_file.php)';
     262$lang['site_created'] = 'created';
     263$lang['site_delete'] = 'delete';
     264$lang['site_delete_hint'] = 'delete this site and all its attached elements';
     265$lang['site_deleted'] = 'deleted';
     266$lang['site_err'] = 'an error happened';
     267$lang['site_err_remote_file_not_found'] = 'file create_listing_file.php on remote site was not found';
     268$lang['site_local'] = 'Local';
     269$lang['site_remote'] = 'Remote';
     270$lang['site_synchronize'] = 'synchronize';
     271$lang['site_synchronize_hint'] = 'update the database from files';
    273272$lang['stats_addr'] = 'IP Address';
    274273$lang['stats_category'] = 'Category';
     
    337336$lang['update_default_title'] = 'Choose an option';
    338337$lang['update_display_info'] = 'display maximum informations (added categories and elements, deleted categories and elements)';
    339 $lang['update_elements_metadata_sync'] = 'elements informations synchronized with files metadata';
     338$lang['update_missing_file_or_dir'] = 'File/directory read error';
     339$lang['update_missing_file_or_dir_info'] = 'The file or directory cannot be accessed (either it does not exist or the access is denied)';
     340$lang['update_err_pwg_version_differs'] = 'PhpWebGallery version differs on the remote site';
     341$lang['update_err_pwg_version_differs_info'] = 'Version of create_listing_file.php on the remote site and PhpWebGallery must be the same';
     342$lang['update_err_remote_listing_not_found'] = 'listing.xml file was not found';
     343$lang['update_err_remote_listing_not_found_info'] = 'listing.xml file was not found on the remote site. This file is generated by choosing the "generate listing" command in the Site manager';
    340344$lang['update_error_list_title'] = 'Error list';
    341345$lang['update_errors_caption'] = 'Errors caption';
     
    345349$lang['update_nb_del_categories'] = 'categories deleted in the database';
    346350$lang['update_nb_del_elements'] = 'elements deleted in the database';
     351$lang['update_nb_elements_metadata_available'] = 'images candidates for metadata synchronization';
     352$lang['update_nb_elements_metadata_sync'] = 'elements informations synchronized with files metadata';
    347353$lang['update_nb_errors'] = 'errors during synchronization';
    348354$lang['update_nb_new_categories'] = 'categories added in the database';
  • trunk/language/fr_FR.iso-8859-1/admin.lang.php

    r1049 r1058  
    136136$lang['Select at least one picture'] = 'Sélectionner au moins une image';
    137137$lang['Select at least one user'] = 'Séléctionner au moins un utilisateur';
     138$lang['Site manager'] = 'Gestionnaire des sites';
    138139$lang['Show info'] = 'Montrer les informations';
    139140$lang['Show number of comments'] = 'Montrer le nombre de commentaires';
     
    244245$lang['registration_date'] = 'date d\'enregistrement';
    245246$lang['remote_site'] = 'Site distant';
    246 $lang['remote_site_already_exists'] = 'Ce site existe déjà';
    247247$lang['remote_site_clean'] = 'nettoyer';
    248248$lang['remote_site_clean_hint'] = 'supprimer le fichier listing.xml distant';
    249 $lang['remote_site_create'] = 'Créer un nouveau site distant : (donner son URL vers create_listing_file.php)';
    250 $lang['remote_site_created'] = 'créé';
    251 $lang['remote_site_delete'] = 'supprimer';
    252 $lang['remote_site_delete_hint'] = 'supprimer ce site distant et toutes les informations associées';
    253 $lang['remote_site_deleted'] = 'supprimé';
    254 $lang['remote_site_error'] = 'une erreur est survenue';
    255 $lang['remote_site_file_not_found'] = 'le fichier create_listing_file.php est introuvable sur le site distant';
    256249$lang['remote_site_generate'] = 'générer le listing';
    257250$lang['remote_site_generate_hint'] = 'générer le fichier listing.xml sur le site distant';
    258 $lang['remote_site_listing_not_found'] = 'le fichier listing.xml est introuvable';
    259251$lang['remote_site_local_found'] = 'Un fichier listing.xml local a été trouvé pour ';
    260 $lang['remote_site_local_new'] = '(nouveau site)';
    261252$lang['remote_site_local_update'] = 'lire le listing.xml local et mettre à jour';
    262 $lang['remote_site_removed'] = 'a été supprimé du site distant';
    263 $lang['remote_site_removed_title'] = 'Éléments supprimés';
     253$lang['remote_site_test'] = 'tester';
     254$lang['remote_site_test_hint'] = 'tester ce site distant';
    264255$lang['remote_site_uncorrect_url'] = 'L\'URL d\'un site distant doit commencer par "http" ou "https" et ne doit contenir des caractères que parmi "/", "a-zA-Z0-9", "-" ou "_"';
    265 $lang['remote_site_update'] = 'synchronisation';
    266 $lang['remote_site_update_hint'] = 'lit le fichier listing.xml distant et met à jour la base de données';
    267 $lang['remote_sites'] = 'Sites distants';
    268256$lang['remove keyword'] = 'supprimer mot-clef';
    269257$lang['selection'] = 'sélection';
    270258$lang['set to'] = 'changer en';
    271259$lang['singly represented'] = 'représentant fixe';
     260$lang['site_already_exists'] = 'Ce site existe déjà';
     261$lang['site_create'] = 'Créer un nouveau site distant : (donner son URL vers create_listing_file.php)';
     262$lang['site_created'] = 'créé';
     263$lang['site_delete'] = 'supprimer';
     264$lang['site_delete_hint'] = 'supprimer ce site et toutes les informations associées';
     265$lang['site_deleted'] = 'supprimé';
     266$lang['site_err'] = 'une erreur est survenue';
     267$lang['site_err_remote_file_not_found'] = 'le fichier create_listing_file.php est introuvable sur le site distant';
     268$lang['site_local'] = 'Local';
     269$lang['site_remote'] = 'Distant';
     270$lang['site_synchronize'] = 'synchroniser';
     271$lang['site_synchronize_hint'] = 'met à jour la base de données à partir des fichiers';
    272272$lang['stats_addr'] = 'Adresse IP';
    273273$lang['stats_category'] = 'Catégorie';
     
    336336$lang['update_default_title'] = 'Choisir une option';
    337337$lang['update_display_info'] = 'afficher un maximum d\'informations (catégories ajoutées, éléments ajoutés, catégories et éléments supprimés)';
    338 $lang['update_elements_metadata_sync'] = 'informations des images synchronisées avec les méta-données';
     338$lang['update_missing_file_or_dir'] = 'Erreur d\'ouverture fichier/répertoire';
     339$lang['update_missing_file_or_dir_info'] = 'Le fichier ou répertoire ne peut pas être accede (soit il n\'existe pas, soit l\'accés est refusé)';
     340$lang['update_err_pwg_version_differs'] = 'La version PhpWebGallery sur le site distant est differente';
     341$lang['update_err_pwg_version_differs_info'] = 'La version de create_listing_file.php sur le site distant et PhpWebGallery doit être la même';
     342$lang['update_err_remote_listing_not_found'] = 'le fichier listing.xml est introuvable';
     343$lang['update_err_remote_listing_not_found_info'] = 'le fichier listing.xml est introuvable sur le site distant. Ce fichier est generé en choisissant la commande "générer le listing" dans le gestionnaire de sites';
    339344$lang['update_error_list_title'] = 'Liste des erreurs';
    340345$lang['update_errors_caption'] = 'Légende des erreurs';
     
    344349$lang['update_nb_del_categories'] = 'catégories supprimées de la base de données';
    345350$lang['update_nb_del_elements'] = 'éléments supprimés de la base de données';
     351$lang['update_nb_elements_metadata_available'] = 'images candidates à la synchronisation avec les méta-données';
     352$lang['update_nb_elements_metadata_sync'] = 'informations des images synchronisées avec les méta-données';
    346353$lang['update_nb_errors'] = 'erreurs survenues durant la synchronisation';
    347354$lang['update_nb_new_categories'] = 'catégories ajoutées dans la base de données';
  • trunk/template/yoga/admin.tpl

    r1049 r1058  
    1616        <li><a href="{U_FAQ}">{lang:instructions}</a></li>
    1717        <li><a href="{U_SITE_MANAGER}">{lang:Site manager}</a></li>
    18         <li><a href="{U_SITES}">{lang:remote_sites}</a></li>
    1918        <li><a href="{U_HISTORY}">{lang:history}</a></li>
    2019        <li><a href="{U_CAT_UPDATE}">{lang:update}</a></li>
  • trunk/template/yoga/admin/site_manager.tpl

    • Property svn:eol-style set to native
    r1045 r1058  
    44    <li><a href="{U_HELP}" onclick="popuphelp(this.href); return false;" title="{lang:Help}"><img src="{themeconf:icon_dir}/help.png" class="button" alt="(?)"></a></li>
    55  </ul>
    6   <h2>{lang:remote_sites}</h2>
     6  <h2>{lang:Site manager}</h2>
    77</div>
    88
     
    2323    <a href="{sites.site.NAME}" target="_blank">{sites.site.NAME}</a><br>({sites.site.TYPE}, {sites.site.CATEGORIES} {lang:categories}, {sites.site.IMAGES} {lang:picture}s)
    2424  </td><td> 
    25     [<a href="{sites.site.U_UPDATE}" title="{lang:update this site}">{lang:remote_site_update}</a>]
     25    [<a href="{sites.site.U_SYNCHRONIZE}" title="{lang:site_synchronize_hint}">{lang:site_synchronize}</a>]
    2626    <!-- BEGIN delete -->
    2727      [<a href="{sites.site.delete.U_DELETE}" onclick="return confirm('{lang:Are you sure?}');"
    28                 title="{lang:remote_site_delete_hint}">{lang:remote_site_delete}</a>]
     28                title="{lang:site_delete_hint}">{lang:site_delete}</a>]
    2929    <!-- END delete -->
    3030    <!-- BEGIN remote -->
    3131      <br>
    32       [<a href="{sites.site.remote.U_TEST}" title="{lang:@@}">{lang:Test}</a>]
     32      [<a href="{sites.site.remote.U_TEST}" title="{lang:remote_site_test_hint}">{lang:remote_site_test}</a>]
    3333      [<a href="{sites.site.remote.U_GENERATE}" title="{lang:remote_site_generate_hint}">{lang:remote_site_generate}</a>]
    3434      [<a href="{sites.site.remote.U_CLEAN}" title="{lang:remote_site_clean_hint}">{lang:remote_site_clean}</a>]
     
    4141<form action="{F_ACTION}" method="post">
    4242  <p>
    43     <label for="galleries_url" >{lang:remote_site_create}</label>
     43    <label for="galleries_url" >{lang:site_create}</label>
    4444    <input type="text" name="galleries_url" id="galleries_url" />
    4545  </p>
  • trunk/template/yoga/admin/site_update.tpl

    • Property svn:eol-style set to native
    r1029 r1058  
    2222<h3>{L_RESULT_METADATA}</h3>
    2323<ul>
    24   <li>{metadata_result.NB_ELEMENTS_DONE} {lang:update_elements_metadata_sync}</li>
    25   <li>{metadata_result.NB_ELEMENTS_CANDIDATES} {lang:elements available for synchronization}</li>
     24  <li>{metadata_result.NB_ELEMENTS_DONE} {lang:update_nb_elements_metadata_sync}</li>
     25  <li>{metadata_result.NB_ELEMENTS_CANDIDATES} {lang:update_nb_elements_metadata_available}</li>
    2626  <li>{lang:update_used_metadata} : {METADATA_LIST}</li>
    2727</ul>
  • 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.