mirror of
https://github.com/Piwigo/Piwigo.git
synced 2025-04-29 20:59:59 +03:00
- removed #debug css rule (why would we need that in default-layout?)
- order by rank is not available in calendar/chronology mode - small non-functional change in functions_search.inc.php (handy for plugin) - unused variables/smaller code/unused params in func call git-svn-id: http://piwigo.org/svn/trunk@2572 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
cde8cefaf2
commit
dda9f5db66
6 changed files with 9 additions and 18 deletions
|
@ -270,7 +270,7 @@ function get_category_preferred_image_orders()
|
||||||
array(
|
array(
|
||||||
l10n('Rank'),
|
l10n('Rank'),
|
||||||
'rank ASC',
|
'rank ASC',
|
||||||
('categories' == @$page['section'] and !isset($page['flat']))
|
('categories' == @$page['section'] and !isset($page['flat']) and !isset($page['chronology_field']) )
|
||||||
)
|
)
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
|
@ -299,7 +299,7 @@ SELECT DISTINCT(id)
|
||||||
* @param string field
|
* @param string field
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function get_qsearch_like_clause($q, $field)
|
function get_qsearch_like_clause($q, $field, $before='%', $after='%')
|
||||||
{
|
{
|
||||||
$q = stripslashes($q);
|
$q = stripslashes($q);
|
||||||
$tokens = array();
|
$tokens = array();
|
||||||
|
@ -393,7 +393,7 @@ function get_qsearch_like_clause($q, $field)
|
||||||
continue;
|
continue;
|
||||||
if ( strlen($tokens[$i])==0)
|
if ( strlen($tokens[$i])==0)
|
||||||
continue;
|
continue;
|
||||||
$clauses[] = $field.' LIKE "%'.addslashes($tokens[$i]).'%"';
|
$clauses[] = $field.' LIKE "'.$before.addslashes($tokens[$i]).$after.'"';
|
||||||
}
|
}
|
||||||
|
|
||||||
return count($clauses) ? '('.implode(' OR ', $clauses).')' : null;
|
return count($clauses) ? '('.implode(' OR ', $clauses).')' : null;
|
||||||
|
|
|
@ -851,14 +851,7 @@ function get_default_language()
|
||||||
*/
|
*/
|
||||||
function get_browser_language(&$lang)
|
function get_browser_language(&$lang)
|
||||||
{
|
{
|
||||||
if (!empty($_SERVER["HTTP_ACCEPT_LANGUAGE"]))
|
$browser_language = substr(@$_SERVER["HTTP_ACCEPT_LANGUAGE"], 0, 2);
|
||||||
{
|
|
||||||
$browser_language = substr($_SERVER["HTTP_ACCEPT_LANGUAGE"], 0, 2);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$browser_language = '';
|
|
||||||
}
|
|
||||||
foreach (get_languages() as $language_code => $language_name)
|
foreach (get_languages() as $language_code => $language_name)
|
||||||
{
|
{
|
||||||
if (substr($language_code, 0, 2) == $browser_language)
|
if (substr($language_code, 0, 2) == $browser_language)
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
*/
|
*/
|
||||||
function ws_isInvokeAllowed($res, $methodName, $params)
|
function ws_isInvokeAllowed($res, $methodName, $params)
|
||||||
{
|
{
|
||||||
global $conf, $calling_partner_id;
|
global $conf;
|
||||||
|
|
||||||
if ( strpos($methodName,'reflection.')===0 )
|
if ( strpos($methodName,'reflection.')===0 )
|
||||||
{ // OK for reflection
|
{ // OK for reflection
|
||||||
|
|
|
@ -126,12 +126,10 @@ if ( isset($_GET['metadata']) )
|
||||||
{
|
{
|
||||||
if ( pwg_get_session_var('show_metadata') == null )
|
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 {
|
} else {
|
||||||
pwg_unset_session_var('show_metadata');
|
pwg_unset_session_var('show_metadata');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// add default event handler for rendering element content
|
// add default event handler for rendering element content
|
||||||
|
|
|
@ -273,5 +273,5 @@ TABLE.tagLetterContent {
|
||||||
font-size:80%;
|
font-size:80%;
|
||||||
border-collapse : collapse;
|
border-collapse : collapse;
|
||||||
}
|
}
|
||||||
|
|
||||||
#theHeader {text-align: center;}
|
#theHeader {text-align: center;}
|
||||||
#debug { margin: 15px 15px 5px 248px; font-size:12px; clear: both; word-wrap:break-word;}
|
|
Loading…
Add table
Add a link
Reference in a new issue