Changeset 1029
- Timestamp:
- Feb 8, 2006, 2:17:07 AM (18 years ago)
- Location:
- trunk
- Files:
-
- 6 added
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin.php
r1007 r1029 66 66 $template->assign_vars( 67 67 array( 68 'U_SITE_MANAGER'=> $link_start.'site_manager', 68 69 'U_HISTORY'=> $link_start.'stats', 69 70 'U_FAQ'=> $link_start.'help', -
trunk/admin/include/functions_metadata.php
r903 r1029 176 176 * 177 177 * @param int id_uppercat 178 * @param int site_id 178 179 * @param boolean recursive ? 179 180 * @param boolean only newly added files ? 180 181 * @return array 181 182 */ 182 function get_filelist($category_id = '', $recursive = false, $only_new = false) 183 function get_filelist($category_id = '', $site_id=1, $recursive = false, 184 $only_new = false) 183 185 { 184 186 // filling $cat_ids : all categories required … … 188 190 SELECT id 189 191 FROM '.CATEGORIES_TABLE.' 190 WHERE site_id = 1192 WHERE site_id = '.$site_id.' 191 193 AND dir IS NOT NULL'; 192 194 if (is_numeric($category_id)) -
trunk/admin/update.php
r967 r1029 744 744 } 745 745 $start = get_moment(); 746 $files = get_filelist($opts['category_id'], 746 $files = get_filelist($opts['category_id'], 1, 747 747 $opts['recursive'], 748 748 $opts['only_new']); -
trunk/category.php
r1022 r1029 38 38 session_unset(); 39 39 session_destroy(); 40 setcookie(session_name(),'',0, '/');40 setcookie(session_name(),'',0, cookie_path() ); 41 41 $url = 'category.php'; 42 42 redirect( $url ); -
trunk/identification.php
r1004 r1029 52 52 $session_length = $conf['remember_me_length']; 53 53 } 54 session_set_cookie_params($session_length); 54 55 session_start(); 55 56 $_SESSION['id'] = $row['id']; -
trunk/include/common.inc.php
r1027 r1029 148 148 if (count(array_diff($existing, $applied)) > 0) 149 149 { 150 ob_start();// buffer output so that cookies work 150 151 echo 151 152 '<p>' -
trunk/include/functions.inc.php
r1027 r1029 975 975 976 976 /** 977 * returns the $str in current language if possible or $str enclosed 978 * in special chars 979 */ 980 function get_lang($str) 981 { 982 global $lang; 983 if ( isset($lang[$str]) ) 984 { 985 return $lang[$str]; 986 } 987 return '@@'.$str.'@@'; 988 } 989 990 /** 977 991 * which upgrades are available ? 978 992 * -
trunk/include/functions_category.inc.php
r1022 r1029 322 322 function get_category_preferred_image_orders() 323 323 { 324 global $ lang, $conf;324 global $conf; 325 325 return array( 326 326 array('Default', '', true), 327 array($lang['best_rated_cat'], 'average_rate DESC', $conf['rate']), 328 array($lang['most_visited_cat'], 'hit DESC', true), 329 array($lang['Creation date'], 'date_creation DESC', true), 330 array($lang['Availability date'], 'date_available DESC', true) 327 array(get_lang('best_rated_cat'), 'average_rate DESC', $conf['rate']), 328 array(get_lang('most_visited_cat'), 'hit DESC', true), 329 array(get_lang('Creation date'), 'date_creation DESC', true), 330 array(get_lang('Availability date'), 'date_available DESC', true), 331 array(get_lang('File name'), 'file ASC', true) 331 332 ); 332 333 } -
trunk/include/functions_session.inc.php
r1023 r1029 70 70 ini_set('session.use_trans_sid', intval($conf['session_use_trans_sid'])); 71 71 ini_set('session.name', $conf['session_name']); 72 ini_set('session.cookie_path', dirname($_SERVER['PHP_SELF'])); 72 ini_set('session.cookie_path', cookie_path() ); 73 } 74 75 // cookie_path returns the path to use for the PhpWebGallery cookie. 76 // If PhpWebGallery is installed on : 77 // http://domain.org/meeting/gallery/category.php 78 // cookie_path will return : "/meeting/gallery" 79 function cookie_path() 80 { 81 if ( isset($_SERVER['REDIRECT_URL']) ) 82 { // mod_rewrite is activated for upper level directories. we must set the 83 // cookie to the path shown in the browser otherwise it will be discarded. 84 $scr = $_SERVER['REDIRECT_URL']; 85 } 86 else 87 { 88 $scr = $_SERVER['PHP_SELF']; 89 } 90 return substr($scr,0,strrpos( $scr,'/')); 73 91 } 74 92 -
trunk/language/en_UK.iso-8859-1/common.lang.php
r1020 r1029 65 65 $lang['Error sending email'] = 'Error sending email'; 66 66 $lang['File'] = 'File'; 67 $lang['File name'] = 'File name'; 67 68 $lang['Filesize'] = 'Filesize'; 68 69 $lang['Filter and display'] = 'Filter and display'; -
trunk/language/fr_FR.iso-8859-1/common.lang.php
r1025 r1029 64 64 $lang['Error sending email'] = 'Erreur à l\'envoi du mail'; 65 65 $lang['File'] = 'Fichier'; 66 $lang['File name'] = 'Nom du fichier'; 66 67 $lang['Filesize'] = 'Poids'; 67 68 $lang['Filter and display'] = 'Filtrer et afficher'; -
trunk/picture.php
r1020 r1029 250 250 if ($i == 'current') 251 251 { 252 $url_high=$cat_directory.'/pwg_high/'.$row['file']; 253 if (url_is_remote($cat_directory)) 252 if ($row['has_high']=='true') 254 253 { 255 if ($row['has_high']) 256 { 257 $picture[$i]['high'] = $url_high; 258 } 259 } 260 else 261 { 262 if (@fopen($url_high, 'r')) 263 { 264 $picture[$i]['high'] = $url_high; 265 } 254 $url_high=$cat_directory.'/pwg_high/'.$row['file']; 255 $picture[$i]['high'] = $url_high; 266 256 } 267 257 } … … 1055 1045 // navigation bar creation 1056 1046 $url = PHPWG_ROOT_PATH.'picture.php'; 1057 $url.= get_query_string_diff(array('rate','add_fav' ));1047 $url.= get_query_string_diff(array('rate','add_fav','start')); 1058 1048 1059 1049 if (!isset( $_GET['start'] ) -
trunk/template/yoga/admin.tpl
r963 r1029 15 15 <ul> 16 16 <li><a href="{U_FAQ}">{lang:instructions}</a></li> 17 <li><a href="{U_SITE_MANAGER}">{lang:Site manager}</a></li> 17 18 <li><a href="{U_SITES}">{lang:remote_sites}</a></li> 18 19 <li><a href="{U_HISTORY}">{lang:history}</a></li> … … 68 69 <div id="content"> 69 70 <!-- BEGIN errors --> 70 <div id="errors">71 <div class="errors"> 71 72 <ul> 72 73 <!-- BEGIN error --> -
trunk/template/yoga/theme/clear/themeconf.inc.php
r960 r1029 5 5 'icon_dir' => PHPWG_ROOT_PATH.'template/yoga/icon', 6 6 'admin_icon_dir' => PHPWG_ROOT_PATH.'template/yoga/icon/admin', 7 'mime_icon_dir' => PHPWG_ROOT_PATH.'template/yoga/icon/m ymetypes'7 'mime_icon_dir' => PHPWG_ROOT_PATH.'template/yoga/icon/mimetypes/' 8 8 ); 9 9 ?> -
trunk/template/yoga/theme/dark/themeconf.inc.php
r960 r1029 5 5 'icon_dir' => PHPWG_ROOT_PATH.'template/yoga/icon', 6 6 'admin_icon_dir' => PHPWG_ROOT_PATH.'template/yoga/icon/admin', 7 'mime_icon_dir' => PHPWG_ROOT_PATH.'template/yoga/icon/m ymetypes'7 'mime_icon_dir' => PHPWG_ROOT_PATH.'template/yoga/icon/mimetypes/' 8 8 ); 9 9 ?> -
trunk/tools/create_listing_file.php
r1020 r1029 45 45 $conf['version'] = '%PWGVERSION%'; 46 46 47 // $conf['use_exif'] set to true if you want to use Exif Date as "creation 48 // date" for the element, otherwise, set to false 47 // $conf['use_exif'] set to true if you want to use Exif information 49 48 $conf['use_exif'] = true; 49 50 // use_exif_mapping: same behaviour as use_iptc_mapping 51 $conf['use_exif_mapping'] = array( 52 'date_creation' => 'DateTimeOriginal' 53 ); 50 54 51 55 // $conf['use_iptc'] set to true if you want to use IPTC informations of the … … 321 325 if ($file != '.' 322 326 and $file != '..' 327 and $file != '.svn' 323 328 and $file != 'thumbnail' 324 329 and $file != 'pwg_high' … … 345 350 $dirs.= "\n".$indent.'</dir'.$level.'>'; 346 351 } 347 return $dirs; 352 return $dirs; 348 353 } 349 354 … … 426 431 if ($exif = @read_exif_data($dir.'/'.$fs_file)) 427 432 { 428 if (isset($exif['DateTime']))433 foreach ($conf['use_exif_mapping'] as $pwg_key => $exif_key ) 429 434 { 430 preg_match('/^(\d{4}):(\d{2}):(\d{2})/' 431 ,$exif['DateTime'] 432 ,$matches); 433 $element['date_creation'] = 434 $matches[1].'-'.$matches[2].'-'.$matches[3]; 435 if (isset($exif[$exif_key])) 436 { 437 if ( in_array($pwg_key, array('date_creation','date_available') ) ) 438 { 439 if (preg_match('/^(\d{4}):(\d{2}):(\d{2})/' 440 ,$exif[$exif_key] 441 ,$matches)) 442 { 443 $element[$pwg_key] = 444 $matches[1].'-'.$matches[2].'-'.$matches[3]; 445 } 446 } 447 else 448 { 449 $element[$pwg_key] = $exif[$exif_key]; 450 } 451 } 435 452 } 436 453 } … … 525 542 $listing.= ' generation_date="'.date('Y-m-d').'"'; 526 543 $listing.= ' phpwg_version="'.$conf{'version'}.'"'; 544 545 $attrs=array(); 546 if ($conf['use_iptc']) 547 { 548 $attrs = array_merge($attrs, array_keys($conf['use_iptc_mapping']) ); 549 } 550 if ($conf['use_exif']) 551 { 552 $attrs = array_merge($attrs, array_keys($conf['use_exif_mapping']) ); 553 } 554 $listing.= ' metadata="'.implode(',',array_unique($attrs)).'"'; 527 555 528 556 $end = strrpos($_SERVER['PHP_SELF'], '/') + 1;
Note: See TracChangeset
for help on using the changeset viewer.