Changeset 1616
- Timestamp:
- Nov 22, 2006, 3:57:41 AM (17 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/action.php
r1612 r1616 83 83 } 84 84 85 // TODO - check permissions 85 $query=' 86 SELECT id FROM '.CATEGORIES_TABLE.' 87 INNER JOIN '.IMAGE_CATEGORY_TABLE.' 88 ON category_id=id 89 WHERE image_id='.$id.' 90 AND category_id NOT IN ('.$user['forbidden_categories'].') 91 LIMIT 1 92 ;'; 93 if ( mysql_num_rows(pwg_query($query))<1 ) 94 { 95 do_error(401, 'Access denied'); 96 } 86 97 87 98 include_once(PHPWG_ROOT_PATH.'include/functions_picture.inc.php'); … … 99 110 break; 100 111 case 'h': 112 if ( $user['enabled_high']!='true' ) 113 { 114 do_error(401, 'Access denied h'); 115 } 101 116 $file = get_high_path($element_info); 102 117 break; … … 122 137 $ctype = mime_content_type($file); 123 138 } 139 140 $gmt_mtime = gmdate('D, d M Y H:i:s', filemtime($file)).' GMT'; 141 $http_headers[] = 'Last-Modified: '.$gmt_mtime; 142 143 // following lines would indicate how the client should handle the cache 144 /* $max_age=300; 145 $http_headers[] = 'Expires: '.gmdate('D, d M Y H:i:s', time()+$max_age).' GMT'; 146 // HTTP/1.1 only 147 $http_headers[] = 'Cache-Control: private, must-revalidate, max-age='.$max_age;*/ 148 149 if ( isset( $_SERVER['HTTP_IF_MODIFIED_SINCE'] ) ) 150 { 151 header("HTTP/1.1 304 Not modified "); 152 header("Status: 304 Not modified"); 153 foreach ($http_headers as $header) 154 { 155 header( $header ); 156 } 157 exit(); 158 } 124 159 } 160 125 161 if (!isset($ctype)) 126 162 { // give it a guess … … 136 172 $http_headers[] = 'Content-Transfer-Encoding: binary'; 137 173 } 138 $http_headers[] = 'Pragma: public'; 139 $http_headers[] = 'Expires: 0'; 140 $http_headers[] = 'Cache-Control: must-revalidate, post-check=0, pre-check=0'; 141 174 else 175 { 176 $http_headers[] = 'Content-Disposition: inline; filename="' 177 .basename($file).'";'; 178 } 142 179 143 180 foreach ($http_headers as $header) … … 145 182 header( $header ); 146 183 } 147 header("Cache-Control: private",false); //???148 184 149 185 // Looking at the safe_mode configuration for execution time -
trunk/include/config_default.inc.php
r1610 r1616 533 533 //$conf['default_admin_layout']='yoga/dark'; 534 534 535 536 $conf[' disable_plugins']=false;535 // should we load the active plugins ? true=Yes, false=No 536 $conf['enable_plugins']=true; 537 537 ?> -
trunk/include/functions_plugins.inc.php
r1604 r1616 244 244 { 245 245 global $conf; 246 if ($conf['disable_plugins']) 247 { 248 return; 249 } 250 251 $plugins = get_db_plugins('active'); 252 foreach( $plugins as $plugin) 253 {// include main from a function to avoid using same function context 254 load_plugin($plugin); 255 } 256 trigger_action('plugins_loaded'); 246 if ($conf['enable_plugins']) 247 { 248 $plugins = get_db_plugins('active'); 249 foreach( $plugins as $plugin) 250 {// include main from a function to avoid using same function context 251 load_plugin($plugin); 252 } 253 trigger_action('plugins_loaded'); 254 } 257 255 } 258 256 ?>
Note: See TracChangeset
for help on using the changeset viewer.