Changeset 29902


Ignore:
Timestamp:
10/06/14 11:28:37 (4 years ago)
Author:
plg
Message:

merge r29901 from trunk to branch 2.7

bug 3156 fixed: avoid warning on PHP 5.2 for nl2br second parameter

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.7/picture.php

    r28993 r29902  
    138138add_event_handler('render_element_content', 'default_picture_content'); 
    139139// add default event handler for rendering element description 
    140 add_event_handler('render_element_description', 'nl2br'); 
     140add_event_handler('render_element_description', 'pwg_nl2br'); 
     141 
     142/** 
     143 * pwg_nl2br is useful for PHP 5.2 which doesn't accept more than 1 
     144 * parameter on nl2br() (and anyway the second parameter of nl2br does not 
     145 * match what Piwigo gives. 
     146 */ 
     147function pwg_nl2br($string) 
     148{ 
     149  return nl2br($string); 
     150} 
    141151 
    142152trigger_notify('loc_begin_picture'); 
Note: See TracChangeset for help on using the changeset viewer.