Changeset 8247 for trunk/include


Ignore:
Timestamp:
Dec 23, 2010, 6:22:19 AM (13 years ago)
Author:
rvelices
Message:

removed unused files / code / css; shorter code

Location:
trunk/include
Files:
3 edited

Legend:

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

    r8126 r8247  
    234234  add_event_handler('render_category_description', 'nl2br');
    235235}
    236 add_event_handler('render_comment_content', 'htmlspecialchars');
    237 add_event_handler('render_comment_content', 'parse_comment_content');
     236add_event_handler('render_comment_content', 'render_comment_content');
    238237add_event_handler('render_comment_author', 'strip_tags');
    239238add_event_handler('blockmanager_register_blocks', 'register_default_menubar_blocks', EVENT_HANDLER_PRIORITY_NEUTRAL-1);
  • trunk/include/functions_html.inc.php

    r6993 r8247  
    4444  $output = '';
    4545  $is_first=true;
    46  
     46
    4747  foreach ($cat_informations as $cat)
    4848  {
     
    186186 * @return string
    187187 */
    188 function parse_comment_content($content)
    189 {
     188function render_comment_content($content)
     189{
     190  $content = htmlspecialchars($content);
    190191  $pattern = '/(https?:\/\/\S*)/';
    191192  $replacement = '<a href="$1" rel="nofollow">$1</a>';
     
    368369    $title = 'Piwigo encountered a non recoverable error';
    369370  }
    370  
     371
    371372  $btrace_msg = '';
    372373  if ($show_trace and function_exists('debug_backtrace'))
     
    441442        );
    442443    }
    443    
     444
    444445    $title.=
    445446      '<a href="'.$remove_url.'" style="border:none;" title="'
     
    479480    $protocol = 'HTTP/1.0';
    480481
    481   if ( version_compare( phpversion(), '4.3.0', '>=' ) )
    482   {
    483     header( "$protocol $code $text", true, $code );
    484   }
    485   else
    486   {
    487     header( "$protocol $code $text" );
    488   }
     482  header( "$protocol $code $text", true, $code );
    489483  trigger_action('set_status_header', $code, $text);
    490484}
     
    496490{
    497491  return strip_tags($desc, '<span><p><a><br><b><i><small><big><strong><em>');
    498 }
    499 
    500 /** returns the argument_ids array with new sequenced keys based on related
    501  * names. Sequence is not case sensitive.
    502  * Warning: By definition, this function breaks original keys
    503  */
    504 function order_by_name($element_ids,$name)
    505 {
    506   $ordered_element_ids = array();
    507   foreach ($element_ids as $k_id => $element_id)
    508   {
    509     $key = strtolower($name[$element_id]) .'-'. $name[$element_id] .'-'. $k_id;
    510     $ordered_element_ids[$key] = $element_id;
    511   }
    512   ksort($ordered_element_ids);
    513   return $ordered_element_ids;
    514492}
    515493
  • trunk/include/functions_url.inc.php

    r8079 r8247  
    736736  if (!empty($conf['gallery_url']))
    737737  {
    738     if (url_is_remote($conf['gallery_url']) or strncmp($conf['gallery_url'], '/', 1)==0)
     738    if (url_is_remote($conf['gallery_url']) or $conf['gallery_url'][0]=='/' )
    739739    {
    740740      return $conf['gallery_url'];
Note: See TracChangeset for help on using the changeset viewer.