Changeset 8116


Ignore:
Timestamp:
12/13/10 23:43:48 (9 years ago)
Author:
ddtddt
Message:

[extensions] - PersoAbout - bug

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/PersoAbout/main.inc.php

    r8115 r8116  
    3232        global $template; 
    3333        $template->set_prefilter('about', 'ppaT'); 
    34  } 
    35  
    36 function ppaT($content, &$smarty) 
    37  { 
    38 $PAED = pwg_db_fetch_assoc(pwg_query("SELECT state FROM " . PLUGINS_TABLE . " WHERE id = 'ExtendedDescription';")); 
     34         
     35        $PAED = pwg_db_fetch_assoc(pwg_query("SELECT state FROM " . PLUGINS_TABLE . " WHERE id = 'ExtendedDescription';")); 
    3936if($PAED['state'] == 'active') add_event_handler('AP_render_content', 'get_user_language_desc'); 
    4037 
     
    4542        ;'; 
    4643$result = pwg_query($query); 
     44$row = mysql_fetch_array($result); 
     45$pat=trigger_event('AP_render_content', $row['value']); 
     46                 if (!empty($pat)) 
     47                        { 
     48                                $template->assign('PERSO_ABOUT', $pat); 
     49                        } 
     50         
     51 } 
    4752 
    48 $row = mysql_fetch_array($result); 
    49  
    50 $pat=trigger_event('AP_render_content', $row['value']); 
     53function ppaT($content, &$smarty) 
     54 { 
    5155  
    5256  $search = '#<div id="piwigoAbout">#'; 
    5357       
    54   $replacement = '<div id="piwigoAbout"><div id="persoabout">'.$pat.'</div>'; 
     58  $replacement = '<div id="piwigoAbout"><div id="persoabout">{$PERSO_ABOUT}</div>'; 
    5559 
    5660  return preg_replace($search, $replacement, $content); 
Note: See TracChangeset for help on using the changeset viewer.