Changeset 2770
- Timestamp:
- Oct 18, 2008, 2:45:45 AM (16 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/common.inc.php
r2700 r2770 37 37 if( !get_magic_quotes_gpc() ) 38 38 { 39 function sanitize_mysql_kv(&$v, $k) 40 { 41 $v = addslashes($v); 42 } 39 43 if( is_array( $_GET ) ) 40 44 { 41 while( list($k, $v) = each($_GET) ) 42 { 43 if( is_array($_GET[$k]) ) 44 { 45 while( list($k2, $v2) = each($_GET[$k]) ) 46 { 47 $_GET[$k][$k2] = addslashes($v2); 48 } 49 @reset($_GET[$k]); 50 } 51 else 52 { 53 $_GET[$k] = addslashes($v); 54 } 55 } 56 @reset($_GET); 57 } 58 59 if( is_array($_POST) ) 60 { 61 while( list($k, $v) = each($_POST) ) 62 { 63 if( is_array($_POST[$k]) ) 64 { 65 while( list($k2, $v2) = each($_POST[$k]) ) 66 { 67 $_POST[$k][$k2] = addslashes($v2); 68 } 69 @reset($_POST[$k]); 70 } 71 else 72 { 73 $_POST[$k] = addslashes($v); 74 } 75 } 76 @reset($_POST); 77 } 78 79 if( is_array($_COOKIE) ) 80 { 81 while( list($k, $v) = each($_COOKIE) ) 82 { 83 if( is_array($_COOKIE[$k]) ) 84 { 85 while( list($k2, $v2) = each($_COOKIE[$k]) ) 86 { 87 $_COOKIE[$k][$k2] = addslashes($v2); 88 } 89 @reset($_COOKIE[$k]); 90 } 91 else 92 { 93 $_COOKIE[$k] = addslashes($v); 94 } 95 } 96 @reset($_COOKIE); 45 array_walk_recursive( $_GET, 'sanitize_mysql_kv' ); 46 } 47 if( is_array( $_POST ) ) 48 { 49 array_walk_recursive( $_POST, 'sanitize_mysql_kv' ); 50 } 51 if( is_array( $_COOKIE ) ) 52 { 53 array_walk_recursive( $_COOKIE, 'sanitize_mysql_kv' ); 97 54 } 98 55 } -
trunk/include/functions_category.inc.php
r2586 r2770 274 274 'rank ASC', 275 275 ('categories' == @$page['section'] and !isset($page['flat']) and !isset($page['chronology_field']) ) 276 ) 276 ), 277 array( l10n('permissions'), 'level DESC', is_admin() ) 277 278 )); 278 279 } -
trunk/include/ws_functions.inc.php
r2757 r2770 188 188 return new PwgError(401, 'Access denied'); 189 189 } 190 $params['image_id'] = array_map( 'intval',$params['image_id'] ); 190 191 if ( empty($params['image_id']) ) 191 192 { … … 292 293 GROUP BY i.id 293 294 '.$order_by.' 294 LIMIT '. $params['per_page']*$params['page'].','.$params['per_page'];295 LIMIT '.(int)($params['per_page']*$params['page']).','.(int)$params['per_page']; 295 296 296 297 $result = pwg_query($query); … … 684 685 WHERE '.$where_comments.' 685 686 ORDER BY date 686 LIMIT '. $params['comments_per_page']*(int)$params['comments_page'].687 ','. $params['comments_per_page'];687 LIMIT '.(int)($params['comments_per_page']*$params['comments_page']). 688 ','.(int)$params['comments_per_page']; 688 689 689 690 $result = pwg_query($query); … … 858 859 return new PwgError(401, 'Access denied'); 859 860 } 861 $params['image_id'] = array_map( 'intval',$params['image_id'] ); 860 862 if ( empty($params['image_id']) ) 861 863 { … … 1343 1345 AND ', $where_clauses).' 1344 1346 '.$order_by.' 1345 LIMIT '. $params['per_page']*$params['page'].','.$params['per_page'];1347 LIMIT '.(int)($params['per_page']*$params['page']).','.(int)$params['per_page']; 1346 1348 1347 1349 $result = pwg_query($query); -
trunk/index.php
r2699 r2770 198 198 foreach ( $cats as $cat ) 199 199 { 200 $hints[] = get_cat_display_name( array($cat) );200 $hints[] = get_cat_display_name( array($cat), '', false ); 201 201 } 202 202 $template->assign( 'category_search_results', $hints); -
trunk/template/yoga/index.tpl
r2545 r2770 33 33 34 34 {if isset($U_MODE_FLAT) } 35 <li><a href="{$U_MODE_FLAT}" title="{'mode_flat_hint'|@translate}" rel="nofollow"><img src="{$ROOT_URL}{$themeconf.icon_dir}/flat.png" class="button" alt="{'mode_flat_hint'|@translate}" ></a></li>35 <li><a href="{$U_MODE_FLAT}" title="{'mode_flat_hint'|@translate}" rel="nofollow"><img src="{$ROOT_URL}{$themeconf.icon_dir}/flat.png" class="button" alt="{'mode_flat_hint'|@translate}" /></a></li> 36 36 {/if} 37 37 38 38 {if isset($U_MODE_NORMAL) } 39 <li><a href="{$U_MODE_NORMAL}" title="{'mode_normal_hint'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/normal_mode.png" class="button" alt="{'mode_normal_hint'|@translate}" ></a></li>39 <li><a href="{$U_MODE_NORMAL}" title="{'mode_normal_hint'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/normal_mode.png" class="button" alt="{'mode_normal_hint'|@translate}" /></a></li> 40 40 {/if} 41 41 42 42 {if isset($U_MODE_POSTED) } 43 <li><a href="{$U_MODE_POSTED}" title="{'mode_posted_hint'|@translate}" rel="nofollow"><img src="{$ROOT_URL}{$themeconf.icon_dir}/calendar.png" class="button" alt="{'mode_posted_hint'|@translate}" ></a></li>43 <li><a href="{$U_MODE_POSTED}" title="{'mode_posted_hint'|@translate}" rel="nofollow"><img src="{$ROOT_URL}{$themeconf.icon_dir}/calendar.png" class="button" alt="{'mode_posted_hint'|@translate}" /></a></li> 44 44 {/if} 45 45 46 46 {if isset($U_MODE_CREATED) } 47 <li><a href="{$U_MODE_CREATED}" title="{'mode_created_hint'|@translate}" rel="nofollow"><img src="{$ROOT_URL}{$themeconf.icon_dir}/calendar_created.png" class="button" alt="{'mode_created_hint'|@translate}" ></a></li>47 <li><a href="{$U_MODE_CREATED}" title="{'mode_created_hint'|@translate}" rel="nofollow"><img src="{$ROOT_URL}{$themeconf.icon_dir}/calendar_created.png" class="button" alt="{'mode_created_hint'|@translate}" /></a></li> 48 48 {/if} 49 49 … … 72 72 73 73 {if !empty($category_search_results) } 74 <div style="font-size:16px; text-align:left;margin:10px">{'Category results for'|@translate} <strong>{$QUERY_SEARCH}</strong> :74 <div style="font-size:16px;margin:10px 16px">{'Category results for'|@translate} <strong>{$QUERY_SEARCH}</strong> : 75 75 <em><strong> 76 76 {foreach from=$category_search_results item=res name=res_loop} … … 83 83 84 84 {if !empty($tag_search_results) } 85 <div style="font-size:16px; text-align:left;margin:10px">{'Tag results for'|@translate} <strong>{$QUERY_SEARCH}</strong> :85 <div style="font-size:16px;margin:10px 16px">{'Tag results for'|@translate} <strong>{$QUERY_SEARCH}</strong> : 86 86 <em><strong> 87 87 {foreach from=$tag_search_results item=res name=res_loop}
Note: See TracChangeset
for help on using the changeset viewer.