diff options
Diffstat (limited to '')
-rw-r--r-- | include/functions_category.inc.php | 2 | ||||
-rw-r--r-- | include/functions_search.inc.php | 4 | ||||
-rw-r--r-- | include/functions_user.inc.php | 11 | ||||
-rw-r--r-- | include/ws_functions.inc.php | 4 | ||||
-rw-r--r-- | picture.php | 4 | ||||
-rw-r--r-- | template/yoga/default-layout.css | 2 |
6 files changed, 9 insertions, 18 deletions
diff --git a/include/functions_category.inc.php b/include/functions_category.inc.php index 77657b8b1..53f98a5c2 100644 --- a/include/functions_category.inc.php +++ b/include/functions_category.inc.php @@ -270,7 +270,7 @@ function get_category_preferred_image_orders() array( l10n('Rank'), 'rank ASC', - ('categories' == @$page['section'] and !isset($page['flat'])) + ('categories' == @$page['section'] and !isset($page['flat']) and !isset($page['chronology_field']) ) ) )); } diff --git a/include/functions_search.inc.php b/include/functions_search.inc.php index 2ec709936..dac9bd2d7 100644 --- a/include/functions_search.inc.php +++ b/include/functions_search.inc.php @@ -299,7 +299,7 @@ SELECT DISTINCT(id) * @param string field * @return string */ -function get_qsearch_like_clause($q, $field) +function get_qsearch_like_clause($q, $field, $before='%', $after='%') { $q = stripslashes($q); $tokens = array(); @@ -393,7 +393,7 @@ function get_qsearch_like_clause($q, $field) continue; if ( strlen($tokens[$i])==0) continue; - $clauses[] = $field.' LIKE "%'.addslashes($tokens[$i]).'%"'; + $clauses[] = $field.' LIKE "'.$before.addslashes($tokens[$i]).$after.'"'; } return count($clauses) ? '('.implode(' OR ', $clauses).')' : null; diff --git a/include/functions_user.inc.php b/include/functions_user.inc.php index b25105c6e..472487342 100644 --- a/include/functions_user.inc.php +++ b/include/functions_user.inc.php @@ -42,7 +42,7 @@ function validate_mail_address($user_id, $mail_address) } $atom = '[-a-z0-9!#$%&\'*+\\/=?^_`{|}~]'; // before arobase - $domain = '([a-z0-9]([-a-z0-9]*[a-z0-9]+)?)'; // domain name + $domain = '([a-z0-9]([-a-z0-9]*[a-z0-9]+)?)'; // domain name $regex = '/^' . $atom . '+' . '(\.' . $atom . '+)*' . '@' . '(' . $domain . '{1,63}\.)+' . $domain . '{2,63}$/i'; if ( !preg_match( $regex, $mail_address ) ) @@ -851,14 +851,7 @@ function get_default_language() */ function get_browser_language(&$lang) { - if (!empty($_SERVER["HTTP_ACCEPT_LANGUAGE"])) - { - $browser_language = substr($_SERVER["HTTP_ACCEPT_LANGUAGE"], 0, 2); - } - else - { - $browser_language = ''; - } + $browser_language = substr(@$_SERVER["HTTP_ACCEPT_LANGUAGE"], 0, 2); foreach (get_languages() as $language_code => $language_name) { if (substr($language_code, 0, 2) == $browser_language) diff --git a/include/ws_functions.inc.php b/include/ws_functions.inc.php index c3372396f..09f6440d4 100644 --- a/include/ws_functions.inc.php +++ b/include/ws_functions.inc.php @@ -29,7 +29,7 @@ */ function ws_isInvokeAllowed($res, $methodName, $params) { - global $conf, $calling_partner_id; + global $conf; if ( strpos($methodName,'reflection.')===0 ) { // OK for reflection @@ -415,7 +415,7 @@ SELECT id, name, permalink, uppercats, global_rank, { $row[$key] = (int)$row[$key]; } - + array_push($cats, $row); } usort($cats, 'global_rank_compare'); diff --git a/picture.php b/picture.php index cb8491cd0..f5e23f687 100644 --- a/picture.php +++ b/picture.php @@ -126,12 +126,10 @@ if ( isset($_GET['metadata']) ) { if ( pwg_get_session_var('show_metadata') == null ) { - pwg_set_session_var('show_metadata', 1, 86400, cookie_path()); + pwg_set_session_var('show_metadata', 1 ); } else { pwg_unset_session_var('show_metadata'); - } - } // add default event handler for rendering element content diff --git a/template/yoga/default-layout.css b/template/yoga/default-layout.css index 29805b4a1..5427271a4 100644 --- a/template/yoga/default-layout.css +++ b/template/yoga/default-layout.css @@ -273,5 +273,5 @@ TABLE.tagLetterContent { font-size:80%; border-collapse : collapse; } + #theHeader {text-align: center;} -#debug { margin: 15px 15px 5px 248px; font-size:12px; clear: both; word-wrap:break-word;}
\ No newline at end of file |