Changeset 2521 for trunk/include
- Timestamp:
- Sep 12, 2008, 4:17:35 AM (16 years ago)
- Location:
- trunk/include
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/functions.inc.php
r2505 r2521 748 748 if (empty($msg)) 749 749 { 750 $redirect_msg = l10n('redirect_msg'); 751 } 752 else 753 { 754 $redirect_msg = $msg; 755 } 756 $redirect_msg = nl2br($redirect_msg); 750 $msg = nl2br(l10n('redirect_msg')); 751 } 757 752 758 753 $refresh = $refresh_time; … … 765 760 766 761 $template->set_filenames( array( 'redirect' => 'redirect.tpl' ) ); 762 $template->assign('REDIRECT_MSG', $msg); 763 767 764 $template->parse('redirect'); 768 765 -
trunk/include/functions_category.inc.php
r2517 r2521 259 259 { 260 260 global $conf, $page; 261 262 return array( 261 262 return trigger_event('get_category_preferred_image_orders', 263 array( 263 264 array(l10n('default_sort'), '', true), 264 265 array(l10n('Average rate'), 'average_rate DESC', $conf['rate']), … … 270 271 l10n('Rank'), 271 272 'rank ASC', 272 ('categories' == $page['section'] and !isset($page['flat']))273 ('categories' == @$page['section'] and !isset($page['flat'])) 273 274 ) 274 ) ;275 )); 275 276 } 276 277 -
trunk/include/functions_search.inc.php
r2451 r2521 353 353 else 354 354 { 355 if ( strcspn($ch, '%_')==0) 356 {// escape LIKE specials %_ 357 $ch = '\\'.$ch; 358 } 355 359 $crt_token .= $ch; 356 360 } … … 367 371 break; 368 372 default: 373 if ( strcspn($ch, '%_')==0) 374 {// escape LIKE specials %_ 375 $ch = '\\'.$ch; 376 } 369 377 $crt_token .= $ch; 370 378 } -
trunk/include/functions_session.inc.php
r2299 r2521 91 91 } 92 92 93 function get_remote_addr_session_hash() 94 { 95 return vsprintf( "%02X%02X", explode('.',$_SERVER['REMOTE_ADDR']) ); 96 } 97 93 98 /** 94 99 * this function returns … … 103 108 SELECT data 104 109 FROM '.SESSIONS_TABLE.' 105 WHERE id = \''. $session_id.'\'110 WHERE id = \''.get_remote_addr_session_hash().$session_id.'\' 106 111 ;'; 107 112 $result = pwg_query($query); … … 129 134 SET expiration = now(), 130 135 data = \''.$data.'\' 131 WHERE id = \''. $session_id.'\'136 WHERE id = \''.get_remote_addr_session_hash().$session_id.'\' 132 137 ;'; 133 138 pwg_query($query); … … 139 144 INSERT INTO '.SESSIONS_TABLE.' 140 145 (id,data,expiration) 141 VALUES(\''. $session_id.'\',\''.$data.'\',now())146 VALUES(\''.get_remote_addr_session_hash().$session_id.'\',\''.$data.'\',now()) 142 147 ;'; 143 148 mysql_query($query); … … 155 160 DELETE 156 161 FROM '.SESSIONS_TABLE.' 157 WHERE id = \''. $session_id.'\'162 WHERE id = \''.get_remote_addr_session_hash().$session_id.'\' 158 163 ;'; 159 164 pwg_query($query); -
trunk/include/page_header.php
r2299 r2521 70 70 // refresh 71 71 if ( isset( $refresh ) and intval($refresh) >= 0 72 and isset( $url_link ) and isset( $redirect_msg ))72 and isset( $url_link ) ) 73 73 { 74 74 $template->assign( 75 75 array( 76 'REDIRECT_MSG' => $redirect_msg,77 76 'page_refresh' => array( 78 77 'TIME' => $refresh, -
trunk/include/template.class.php
r2513 r2521 63 63 $this->smarty->register_modifier( 'explode', array('Template', 'mod_explode') ); 64 64 $this->smarty->register_block('html_head', array(&$this, 'block_html_head') ); 65 $this->smarty->register_function('known_script', array(&$this, 'func_known_script') , false);65 $this->smarty->register_function('known_script', array(&$this, 'func_known_script') ); 66 66 $this->smarty->register_prefilter( array('Template', 'prefilter_white_space') ); 67 67 if ( $conf['compiled_template_cache_language'] ) -
trunk/include/ws_core.inc.php
r2499 r2521 379 379 if ( is_null($this->_responseEncoder) ) 380 380 { 381 set_status_header( 500);381 set_status_header(400); 382 382 @header("Content-Type: text/plain"); 383 383 echo ("Cannot process your request. Unknown response format. 384 Request format: ".@$this->_requestFormat." handler:".$this->_requestHandler." 385 Response format: ".@$this->_responseFormat." encoder:".$this->_responseEncoder." 386 "); 384 Request format: ".@$this->_requestFormat." Response format: ".@$this->_responseFormat."\n"); 387 385 var_export($this); 388 386 die(0); … … 392 390 { 393 391 $this->sendResponse( 394 new PwgError( 500, 'Unknown request format')392 new PwgError(400, 'Unknown request format') 395 393 ); 396 394 return; -
trunk/include/ws_protocols/rest_handler.php
r2299 r2521 31 31 foreach ($param_array as $name => $value) 32 32 { 33 if ($name=='format' or $name=='partner')33 if ($name=='format') 34 34 continue; // ignore - special keys 35 35 if ($name=='method') … … 46 46 { 47 47 $service->sendResponse( 48 new PwgError( 400, 'Missing "method" name')48 new PwgError(WS_ERR_INVALID_METHOD, 'Missing "method" name') 49 49 ); 50 50 return;
Note: See TracChangeset
for help on using the changeset viewer.