Changeset 2572


Ignore:
Timestamp:
Sep 23, 2008, 3:04:41 AM (16 years ago)
Author:
rvelices
Message:
  • 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
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/functions_category.inc.php

    r2521 r2572  
    271271      l10n('Rank'),
    272272      'rank ASC',
    273       ('categories' == @$page['section'] and !isset($page['flat']))
     273      ('categories' == @$page['section'] and !isset($page['flat']) and !isset($page['chronology_field']) )
    274274      )
    275275    ));
  • trunk/include/functions_search.inc.php

    r2521 r2572  
    300300 * @return string
    301301 */
    302 function get_qsearch_like_clause($q, $field)
     302function get_qsearch_like_clause($q, $field, $before='%', $after='%')
    303303{
    304304  $q = stripslashes($q);
     
    394394    if ( strlen($tokens[$i])==0)
    395395      continue;
    396     $clauses[] = $field.' LIKE "%'.addslashes($tokens[$i]).'%"';
     396    $clauses[] = $field.' LIKE "'.$before.addslashes($tokens[$i]).$after.'"';
    397397  }
    398398
  • trunk/include/functions_user.inc.php

    r2537 r2572  
    4343
    4444  $atom   = '[-a-z0-9!#$%&\'*+\\/=?^_`{|}~]';   // before  arobase
    45   $domain = '([a-z0-9]([-a-z0-9]*[a-z0-9]+)?)'; // domain name 
     45  $domain = '([a-z0-9]([-a-z0-9]*[a-z0-9]+)?)'; // domain name
    4646  $regex = '/^' . $atom . '+' . '(\.' . $atom . '+)*' . '@' . '(' . $domain . '{1,63}\.)+' . $domain . '{2,63}$/i';
    4747
     
    852852function get_browser_language(&$lang)
    853853{
    854   if (!empty($_SERVER["HTTP_ACCEPT_LANGUAGE"]))
    855   {
    856     $browser_language = substr($_SERVER["HTTP_ACCEPT_LANGUAGE"], 0, 2);
    857   }
    858   else
    859   {
    860     $browser_language = '';
    861   }
     854  $browser_language = substr(@$_SERVER["HTTP_ACCEPT_LANGUAGE"], 0, 2);
    862855  foreach (get_languages() as $language_code => $language_name)
    863856  {
  • trunk/include/ws_functions.inc.php

    r2569 r2572  
    3030function ws_isInvokeAllowed($res, $methodName, $params)
    3131{
    32   global $conf, $calling_partner_id;
     32  global $conf;
    3333
    3434  if ( strpos($methodName,'reflection.')===0 )
     
    416416      $row[$key] = (int)$row[$key];
    417417    }
    418    
     418
    419419    array_push($cats, $row);
    420420  }
  • trunk/picture.php

    r2549 r2572  
    127127  if ( pwg_get_session_var('show_metadata') == null )
    128128        {
    129                 pwg_set_session_var('show_metadata', 1, 86400, cookie_path());
     129                pwg_set_session_var('show_metadata', 1 );
    130130        } else {
    131131        pwg_unset_session_var('show_metadata');
    132 
    133132        }
    134 
    135133}
    136134
  • trunk/template/yoga/default-layout.css

    r2550 r2572  
    274274        border-collapse : collapse;
    275275}
     276
    276277#theHeader {text-align: center;}
    277 #debug { margin: 15px 15px 5px 248px; font-size:12px; clear: both; word-wrap:break-word;}
Note: See TracChangeset for help on using the changeset viewer.