Show
Ignore:
Timestamp:
08/09/05 22:30:14 (7 years ago)
Author:
alexx
Message:
  • fix last bug in communities (see [14])
  • execute a "conversion smarty style" script ;) : for i in find . -type f | grep "\.php$" | grep -v "\.svn"; do perl -pi -e "s/\\\$smarty->assign\((.*),(.*)\);/\\\$_SMARTY\[\$1\] = \$2;/" $i; done
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/inc/communities/view.inc.php

    r14 r15  
    2525if(is_numeric($token[2]) ) 
    2626{ 
    27         $smarty->assign('Title', 'Community'); 
     27        $_SMARTY['Title'] =  'Community'; 
    2828 
    2929        $community['info'] = $db->getRow('SELECT id_comm, id, community_cat.id_cat as id_cat, community.name as name, community.description as description, moderated, country, date, nb_members, community_cat.name as category FROM community LEFT JOIN community_cat USING(id_cat) WHERE id_comm=?', array($token[2])); 
     
    109109                if($_SESSION['my_communities_id'] && in_array($community['info']['id_comm'], $_SESSION['my_communities_id']) ) 
    110110                { 
    111                         $smarty->assign('is_member', 1); 
     111                        $_SMARTY['is_member'] =  1; 
    112112                        $leftmenu['/communities/unjoin/'.$token[2]] = 'Unjoin'; 
    113113                } 
    114114                else 
    115115                { 
    116                         $smarty->assign('is_member', 0); 
     116                        $_SMARTY['is_member'] =  0; 
    117117                        if($community['info']['moderated'] == 'yes') 
    118118                                $leftmenu['/communities/join/'.$token[2].'/moderated'] = 'Join'; 
     
    122122        else 
    123123        { 
    124                 $smarty->assign('is_member', 1); 
     124                $_SMARTY['is_member'] =  1; 
    125125                $leftmenu["/communities/edit/".$token[2]] = 'Edit';      
    126126        } 
     
    131131        $leftmenu['/communities/invite/'.$token[2]] = 'Invite friends'; 
    132132 
    133         $smarty->assign('leftmenu',$leftmenu); 
     133        $_SMARTY['leftmenu'] = $leftmenu; 
    134134 
    135135 
    136136        /************************************/ 
    137137 
    138         $smarty->assign('related_communities', $related_comm); 
    139         $smarty->assign('community', $community); 
     138        $_SMARTY['related_communities'] =  $related_comm; 
     139        $_SMARTY['community'] =  $community; 
    140140} 
    141141else