Changeset 1058 for trunk/admin
- Timestamp:
- Feb 28, 2006, 2:13:16 AM (18 years ago)
- Location:
- trunk/admin
- Files:
-
- 2 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/cat_modify.php
r1004 r1058 3 3 // | PhpWebGallery - a PHP based picture gallery | 4 4 // | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net | 5 // | Copyright (C) 2003-200 5PhpWebGallery Team - http://phpwebgallery.net |5 // | Copyright (C) 2003-2006 PhpWebGallery Team - http://phpwebgallery.net | 6 6 // +-----------------------------------------------------------------------+ 7 7 // | branch : BSF (Best So Far) … … 259 259 '', 260 260 get_complete_dir($category['id'])))); 261 $template->assign_block_vars('upload' ,array());262 261 } 263 262 else … … 301 300 } 302 301 303 if (is_numeric($category['site_id']) and $category['site_id'] != 1) 302 $category['cat_dir'] = get_complete_dir($_GET['cat_id']); 303 if (is_numeric($category['site_id']) and url_is_remote($category['cat_dir']) ) 304 304 { 305 305 $query = ' … … 312 312 } 313 313 314 if (!$category['is_virtual'] and !url_is_remote($category['cat_dir']) ) 315 { 316 $template->assign_block_vars('upload' ,array()); 317 } 318 314 319 //----------------------------------------------------------- sending html code 315 320 $template->assign_var_from_handle('ADMIN_CONTENT', 'categories'); -
trunk/admin/site_manager.php
-
Property
svn:eol-style
set to
native
r1033 r1058 64 64 else 65 65 { 66 array_push($page['errors'], l10n(' remote_site_file_not_found'));66 array_push($page['errors'], l10n('site_err_remote_file_not_found')); 67 67 } 68 68 } … … 100 100 { 101 101 array_push($page['errors'], 102 l10n(' remote_site_already_exists').' ['.$url.']');102 l10n('site_already_exists').' ['.$url.']'); 103 103 } 104 104 if (count($page['errors']) == 0) … … 115 115 { 116 116 array_push($page['errors'], 117 l10n(' remote_site_error').' : '.$first_line);117 l10n('site_err').' : '.$first_line); 118 118 } 119 119 } 120 120 else 121 121 { 122 array_push($page['errors'], l10n(' remote_site_file_not_found') );122 array_push($page['errors'], l10n('site_err_remote_file_not_found') ); 123 123 } 124 124 } … … 143 143 pwg_query($query); 144 144 array_push($page['infos'], 145 $url.' '.l10n(' remote_site_created'));145 $url.' '.l10n('site_created')); 146 146 } 147 147 } … … 189 189 delete_site($page['site']); 190 190 array_push($page['infos'], 191 $galleries_url.' '.l10n(' remote_site_deleted'));191 $galleries_url.' '.l10n('site_deleted')); 192 192 break; 193 193 } … … 197 197 $template->assign_vars( array( 198 198 'F_ACTION' => PHPWG_ROOT_PATH.'admin.php' 199 .get_query_string_diff( array('action','site') ) 199 .get_query_string_diff( array('action','site') ) 200 200 ) ); 201 201 202 202 // +-----------------------------------------------------------------------+ 203 203 // | remote sites list | … … 227 227 $update_url.= '?page=site_update'; 228 228 $update_url.= '&site='.$row['id']; 229 230 229 $template->assign_block_vars( 231 230 'sites.site', 232 231 array( 233 232 'NAME' => $row['galleries_url'], 234 'TYPE' => l10n( $is_remote ? ' Remote' : 'Local' ),233 'TYPE' => l10n( $is_remote ? 'site_remote' : 'site_local' ), 235 234 'CATEGORIES' => $row['nb_categories'], 236 235 'IMAGES' => isset($row['nb_images']) ? $row['nb_images'] : 0, 237 'U_ UPDATE' => $update_url236 'U_SYNCHRONIZE' => $update_url 238 237 ) 239 238 ); 240 241 239 if ($is_remote) 242 240 { -
Property
svn:eol-style
set to
-
trunk/admin/site_reader_local.php
-
Property
svn:eol-style
set to
native
r1029 r1058 47 47 if (!is_dir($this->site_url)) 48 48 { 49 array_push($errors, array('path' => $this->site_url, 'type' => 'PWG-ERROR-NO DIR'));49 array_push($errors, array('path' => $this->site_url, 'type' => 'PWG-ERROR-NO-FS')); 50 50 return false; 51 51 } … … 61 61 62 62 /** 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'] 64 64 * and $conf['picture_ext'] 65 65 * @param string $path recurse in this directory … … 131 131 } 132 132 133 // returns the name of the attributes that are supported for 133 // returns the name of the attributes that are supported for 134 134 // update/synchronization according to configuration 135 135 function get_update_attributes() 136 136 { 137 137 global $conf; 138 $update_fields = array( 'has_high', 'representative_ext', 138 $update_fields = array( 'has_high', 'representative_ext', 139 139 'filesize', 'width', 'height' ); 140 140 if ($conf['use_exif']) … … 166 166 return null; 167 167 } 168 168 169 169 $data = array(); 170 170 171 171 $filename = basename($file); 172 172 $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), 174 174 get_filename_wo_extension($filename) ); 175 175 176 176 $data['filesize'] = floor(filesize($file)/1024); 177 177 if ($image_size = @getimagesize($file)) -
Property
svn:eol-style
set to
-
trunk/admin/site_reader_remote.php
-
Property
svn:eol-style
set to
native
r1046 r1058 72 72 else 73 73 { 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')); 75 75 return false; 76 76 } … … 95 95 96 96 /** 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 98 98 * according to listing.xml 99 99 * @param string $path recurse in this directory only … … 110 110 foreach ( $files as $file) 111 111 { 112 $data = $this->get_element_attributes($file, 112 $data = $this->get_element_attributes($file, 113 113 $this->insert_attributes); 114 114 $elements[$file] = $data; … … 120 120 } 121 121 122 // returns the name of the attributes that are supported for 122 // returns the name of the attributes that are supported for 123 123 // update/synchronization according to listing.xml 124 124 function get_update_attributes() … … 130 130 function get_element_update_attributes($file) 131 131 { 132 return $this->get_element_attributes($file, 132 return $this->get_element_attributes($file, 133 133 $this->update_attributes); 134 134 } … … 138 138 * Returns a hash of image/file attributes 139 139 * @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 141 141 * returned 142 142 */ … … 144 144 { 145 145 $xml_element = $this->site_files[$file]; 146 if ( ! isset($xml_element) ) 146 if ( ! isset($xml_element) ) 147 147 { 148 148 return null; … … 153 153 if (getAttribute($xml_element, $att) != '') 154 154 { 155 $val = html_entity_decode( getAttribute($xml_element, $att));155 $val = getAttribute($xml_element, $att); 156 156 $data[$att] = addslashes($val); 157 157 } -
Property
svn:eol-style
set to
-
trunk/admin/site_update.php
-
Property
svn:eol-style
set to
native
r1033 r1058 51 51 52 52 $error_labels = array( 53 'PWG-UPDATE-1' => array( l10n('update_wrong_dirname_short'), 53 'PWG-UPDATE-1' => array( l10n('update_wrong_dirname_short'), 54 54 l10n('update_wrong_dirname_info') ), 55 55 'PWG-UPDATE-2' => array( l10n('update_missing_tn_short'), 56 l10n('update_missing_tn_info') 56 l10n('update_missing_tn_info') 57 57 . 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'), 59 59 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')) 64 64 ); 65 65 $errors = array(); … … 409 409 $insert{'date_available'} = CURRENT_DATE; 410 410 $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 } 412 419 $insert{'path'} = $path; 413 420 … … 431 438 $insert{'date_available'} = CURRENT_DATE; 432 439 $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 } 433 448 $insert{'path'} = $path; 434 449 … … 525 540 foreach ($fields['update'] as $field) 526 541 { 527 $data[$field] = getAttribute($row['infos'], $field);542 $data[$field] = addslashes( getAttribute($row['infos'], $field) ); 528 543 } 529 544 … … 582 597 // | synchronize metadata | 583 598 // +-----------------------------------------------------------------------+ 584 if (isset($_POST['submit']) and preg_match('/^metadata/', $_POST['sync']) 599 if (isset($_POST['submit']) and preg_match('/^metadata/', $_POST['sync']) 585 600 and !$general_failure) 586 601 { … … 643 658 mass_updates(IMAGES_TABLE, $fields, $datas); 644 659 } 645 660 646 661 echo '<!-- metadata update : '; 647 662 echo get_elapsed_time($start, get_moment()); … … 672 687 if ($site_is_remote and !isset($_POST['submit']) ) 673 688 { 674 $used_metadata.= ' + ' . l10n('Aditionnal remote attributes');689 $used_metadata.= ' + ...'; 675 690 } 676 691 -
Property
svn:eol-style
set to
Note: See TracChangeset
for help on using the changeset viewer.