Changeset 1107
- Timestamp:
- Mar 28, 2006, 3:26:37 AM (18 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/site_manager.php
-
Property
svn:keywords
set to
Author Date Id Revision
r1080 r1107 7 7 // | branch : BSF (Best So Far) 8 8 // | file : $RCSfile$ 9 // | last update : $Date : 2006-01-31 21:46:26 -0500 (Tue, 31 Jan 2006)$10 // | last modifier : $Author : rvelices$11 // | revision : $Revision : 1020$9 // | last update : $Date$ 10 // | last modifier : $Author$ 11 // | revision : $Revision$ 12 12 // +-----------------------------------------------------------------------+ 13 13 // | This program is free software; you can redistribute it and/or modify | … … 112 112 if ($is_remote) 113 113 { 114 $clf_url = $url.'create_listing_file.php'; 115 $clf_url.= '?action=test'; 116 $clf_url.= '&version='.PHPWG_VERSION; 117 if ($lines = @file($clf_url)) 114 if ( ! isset($_POST['no_check']) ) 118 115 { 119 $first_line = strip_tags($lines[0]); 120 if (!preg_match('/^PWG-INFO-2:/', $first_line)) 116 $clf_url = $url.'create_listing_file.php'; 117 $clf_url.= '?action=test'; 118 $clf_url.= '&version='.PHPWG_VERSION; 119 if ($lines = @file($clf_url)) 121 120 { 122 array_push($page['errors'], 123 l10n('site_err').' : '.$first_line); 121 $first_line = strip_tags($lines[0]); 122 if (!preg_match('/^PWG-INFO-2:/', $first_line)) 123 { 124 array_push($page['errors'], 125 l10n('site_err').' : '.$first_line); 126 } 124 127 } 125 }126 else127 {128 array_push($page['errors'], l10n('site_err_remote_file_not_found') );128 else 129 { 130 array_push($page['errors'], l10n('site_err_remote_file_not_found') ); 131 } 129 132 } 130 133 } … … 211 214 // +-----------------------------------------------------------------------+ 212 215 216 if ( is_file(PHPWG_ROOT_PATH.'listing.xml') ) 217 { 218 $xml_content = getXmlCode(PHPWG_ROOT_PATH.'listing.xml'); 219 $local_listing_site_url = getAttribute( 220 getChild($xml_content, 'informations'), 221 'url' 222 ); 223 if ( !url_is_remote($local_listing_site_url) ) 224 { 225 $local_listing_site_url = null; 226 } 227 } 228 213 229 $query = ' 214 230 SELECT s.*, COUNT(c.id) AS nb_categories, SUM(c.nb_images) AS nb_images 215 FROM '.SITES_TABLE.' AS s LEFT JOIN '.CATEGORIES_TABLE.' AS c216 ON s.id=c.site_id217 GROUP BY s.id'.231 FROM '.SITES_TABLE.' AS s LEFT JOIN '.CATEGORIES_TABLE.' AS c 232 ON s.id=c.site_id 233 GROUP BY s.id'. 218 234 ';'; 219 235 $result = pwg_query($query); … … 255 271 } 256 272 257 if ($row['id'] != 1) 258 { 259 $template->assign_block_vars( 'sites.site.delete', 260 array('U_DELETE' => $base_url.'delete') ); 261 } 262 } 273 if ($row['id'] != 1) 274 { 275 $template->assign_block_vars( 'sites.site.delete', 276 array('U_DELETE' => $base_url.'delete') ); 277 } 278 279 if ( isset($local_listing_site_url) and 280 $row['galleries_url']==$local_listing_site_url ) 281 { 282 $local_listing_site_id = $row['id']; 283 $template->assign_block_vars( 'local_listing', 284 array( 285 'URL' => $local_listing_site_url, 286 ) 287 ); 288 289 $template->assign_block_vars( 'local_listing.update', 290 array( 291 'U_SYNCHRONIZE' => $update_url.'&local_listing=1' 292 ) 293 ); 294 } 295 } 296 297 if ( isset($local_listing_site_url) and !isset($local_listing_site_id) ) 298 { 299 $template->assign_block_vars( 'local_listing', 300 array( 301 'URL' => $local_listing_site_url, 302 ) 303 ); 304 305 $template->assign_block_vars( 'local_listing.create', 306 array('NAME' => $local_listing_site_url) 307 ); 308 } 309 263 310 264 311 $template->assign_var_from_handle('ADMIN_CONTENT', 'site_manager'); -
Property
svn:keywords
set to
-
trunk/admin/site_reader_remote.php
-
Property
svn:keywords
set to
Author Date Id Revision
r1064 r1107 7 7 // | branch : BSF (Best So Far) 8 8 // | file : $RCSfile$ 9 // | last update : $Date : 2005-12-03 17:03:58 -0500 (Sat, 03 Dec 2005)$10 // | last modifier : $Author : plg$11 // | revision : $Revision : 967$9 // | last update : $Date$ 10 // | last modifier : $Author$ 11 // | revision : $Revision$ 12 12 // +-----------------------------------------------------------------------+ 13 13 // | This program is free software; you can redistribute it and/or modify | … … 32 32 33 33 var $site_url; 34 var $listing_url; 34 35 var $site_dirs; 35 36 var $site_files; … … 37 38 var $update_attributes; 38 39 39 function RemoteSiteReader($url )40 function RemoteSiteReader($url, $listing_url) 40 41 { 41 42 $this->site_url = $url; … … 46 47 'representative_ext', 'has_high', 'filesize', 'width', 'height' 47 48 ); 49 50 if (!isset($listing_url)) 51 { 52 $this->listing_url = $this->site_url.'/listing.xml'; 53 } 54 else 55 { 56 $this->listing_url = $listing_url; 57 } 48 58 } 49 59 … … 56 66 { 57 67 global $errors; 58 59 $listing_file = $this->site_url.'/listing.xml'; 60 if (@fopen($listing_file, 'r')) 68 69 if (@fopen($this->listing_url, 'r')) 61 70 { 62 71 $this->site_dirs = array(); 63 72 $this->site_files = array(); 64 $xml_content = getXmlCode($ listing_file);73 $xml_content = getXmlCode($this->listing_url); 65 74 $info_xml_element = getChild($xml_content, 'informations'); 66 75 if (getAttribute($info_xml_element , 'phpwg_version') != PHPWG_VERSION) … … 69 78 $errors, 70 79 array( 71 'path' => $ listing_file,80 'path' => $this->listing_url, 72 81 'type' => 'PWG-ERROR-VERSION' 73 82 ) 74 83 ); 75 84 76 85 return false; 77 86 } … … 81 90 explode(',', getAttribute($info_xml_element, 'metadata')) 82 91 ); 83 92 84 93 $this->build_structure($xml_content, '', 0); 85 94 86 95 return true; 87 96 } … … 91 100 $errors, 92 101 array( 93 'path' => $ listing_file,102 'path' => $this->listing_url, 94 103 'type' => 'PWG-ERROR-NOLISTING' 95 104 ) -
Property
svn:keywords
set to
-
trunk/admin/site_update.php
-
Property
svn:keywords
set to
Author Date Id Revision
r1072 r1107 7 7 // | branch : BSF (Best So Far) 8 8 // | file : $RCSfile$ 9 // | last update : $Date : 2005-12-03 17:03:58 -0500 (Sat, 03 Dec 2005)$10 // | last modifier : $Author : plg$11 // | revision : $Revision : 967$9 // | last update : $Date$ 10 // | last modifier : $Author$ 11 // | revision : $Revision$ 12 12 // +-----------------------------------------------------------------------+ 13 13 // | This program is free software; you can redistribute it and/or modify | … … 87 87 { 88 88 include_once(PHPWG_ROOT_PATH.'admin/site_reader_remote.php'); 89 $site_reader = new RemoteSiteReader($site_url); 89 $local_listing = null; 90 if ( isset($_GET['local_listing']) 91 and $_GET['local_listing'] ) 92 { 93 $local_listing = PHPWG_ROOT_PATH.'listing.xml'; 94 } 95 $site_reader = new RemoteSiteReader($site_url, $local_listing); 90 96 } 91 97 else … … 432 438 ) 433 439 ); 434 440 435 441 continue; 436 442 } … … 454 460 'path' => $path, 455 461 ); 456 462 457 463 array_push( 458 464 $inserts, 459 465 $insert 460 466 ); 461 467 462 468 array_push( 463 469 $insert_links, … … 725 731 } 726 732 $update_fields = $site_reader->get_update_attributes(); 727 $update_fields = array_merge($update_fields, 'date_metadata_update');733 $update_fields = array_merge($update_fields, array('date_metadata_update')); 728 734 $fields = 729 735 array( -
Property
svn:keywords
set to
-
trunk/include/calendar_base.class.php
-
Property
svn:keywords
set to
Author Date Id Revision
r1092 r1107 6 6 // | branch : BSF (Best So Far) 7 7 // | file : $RCSfile$ 8 // | last update : $Date : 2006-01-27 02:11:43 +0100 (ven, 27 jan 2006)$9 // | last modifier : $Author : rvelices$10 // | revision : $Revision : 1014$8 // | last update : $Date$ 9 // | last modifier : $Author$ 10 // | revision : $Revision$ 11 11 // +-----------------------------------------------------------------------+ 12 12 // | This program is free software; you can redistribute it and/or modify | … … 182 182 $nav_bar .= '<span class="'.$class_prefix.'">'; 183 183 $url = duplicate_index_url( 184 array('chronology_date'=>array_merge($date_components, $item)),184 array('chronology_date'=>array_merge($date_components,array($item))), 185 185 array( 'start' ) 186 186 ); … … 208 208 $nav_bar .= '<span class="'.$class_prefix.'">'; 209 209 $url = duplicate_index_url( 210 array('chronology_date'=>array_merge($date_components, 'any')),210 array('chronology_date'=>array_merge($date_components,array('any'))), 211 211 array( 'start' ) 212 212 ); -
Property
svn:keywords
set to
-
trunk/language/en_UK.iso-8859-1/admin.lang.php
r1105 r1107 302 302 $lang['remote_site_generate'] = 'generate listing'; 303 303 $lang['remote_site_generate_hint'] = 'generate file listing.xml on remote site'; 304 $lang['remote_site_local_create'] = 'Create this site'; 304 305 $lang['remote_site_local_found'] = 'A local listing.xml file has been found for '; 305 306 $lang['remote_site_local_update'] = 'read local listing.xml and update'; -
trunk/language/fr_FR.iso-8859-1/admin.lang.php
r1105 r1107 302 302 $lang['remote_site_generate'] = 'générer le listing'; 303 303 $lang['remote_site_generate_hint'] = 'générer le fichier listing.xml sur le site distant'; 304 $lang['remote_site_local_create'] = 'Créer ce site'; 304 305 $lang['remote_site_local_found'] = 'Un fichier listing.xml local a été trouvé pour '; 305 306 $lang['remote_site_local_update'] = 'lire le listing.xml local et mettre à jour'; -
trunk/picture.php
r1106 r1107 28 28 define('PHPWG_ROOT_PATH','./'); 29 29 include_once(PHPWG_ROOT_PATH.'include/common.inc.php'); 30 include_once(PHPWG_ROOT_PATH.'include/functions_rate.inc.php');31 30 include(PHPWG_ROOT_PATH.'include/section_init.inc.php'); 32 31 … … 166 165 case 'rate' : 167 166 { 167 include_once(PHPWG_ROOT_PATH.'include/functions_rate.inc.php'); 168 168 rate_picture($page['image_id'], $_GET['rate']); 169 169 redirect($url_self); … … 757 757 include(PHPWG_ROOT_PATH.'include/picture_rate.inc.php'); 758 758 include(PHPWG_ROOT_PATH.'include/picture_comment.inc.php'); 759 include(PHPWG_ROOT_PATH.'include/picture_metadata.inc.php'); 760 759 if ($metadata_showable and isset($_GET['metadata'])) 760 { 761 include(PHPWG_ROOT_PATH.'include/picture_metadata.inc.php'); 762 } 761 763 //------------------------------------------------------------ log informations 762 764 pwg_log( 'picture', $title_img, $picture['current']['file'] ); -
trunk/template/yoga/admin/site_manager.tpl
-
Property
svn:keywords
set to
Author Date Id Revision
r1085 r1107 1 <!-- $Id : remote_site.tpl 980 2005-12-10 15:24:53Z chrisaga$ -->1 <!-- $Id$ --> 2 2 <div class="titrePage"> 3 3 <ul class="categoryActions"> … … 16 16 </div> 17 17 <!-- END remote_output --> 18 19 <!-- BEGIN local_listing --> 20 {lang:remote_site_local_found} {local_listing.URL} 21 <!-- BEGIN create --> 22 <form action="" method="post"> 23 <p> 24 {lang:remote_site_local_create}: 25 <input type="hidden" name="no_check" value="1"/> 26 <input type="hidden" name="galleries_url" value="{local_listing.URL}" /> 27 <input type="submit" name="submit" value="{lang:submit}"/> 28 </p> 29 </form> 30 <!-- END create --> 31 <!-- BEGIN update --> 32 <a href="{local_listing.update.U_SYNCHRONIZE}" title="{lang:remote_site_local_update}">{lang:site_synchronize}</a> 33 <!-- END update --> 34 <!-- END local_listing --> 18 35 19 36 <!-- BEGIN sites --> -
Property
svn:keywords
set to
Note: See TracChangeset
for help on using the changeset viewer.