Show
Ignore:
Timestamp:
08/09/05 21:14:53 (7 years ago)
Author:
alexx
Message:

* fix #16 (add include of country list)
* fux bug in owned communities ("New Topic/event" not displayed)
* fix sample db data
* change strstr to strpos in includes/functions.inc.php (strpos is faster)

Files:
1 modified

Legend:

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

    r1 r14  
    3939        if($_SESSION['my_id'] != $community['info']['id']) 
    4040                if(in_array($community['info']['id_comm'], $_SESSION['my_communities_id']) ) 
     41                { 
    4142                        $leftmenu["/communities/unjoin/".$token[2]] = 'Unjoin'; 
     43                        $_SMARTY['is_member'] = 1; 
     44                } 
    4245                else 
     46                { 
    4347                        $leftmenu["/communities/join/".$token[2]] = 'Join'; 
     48                        $_SMARTY['is_member'] = 0; 
     49                } 
    4450        else 
     51        { 
    4552                $leftmenu["/communities/edit/".$token[2]] = 'Edit';      
    46  
     53                $_SMARTY['is_member'] = 1; 
     54        } 
    4755 
    4856        $leftmenu["/communities/events/".$token[2]] = 'View events'; 
    4957        $leftmenu["/communities/invite/".$token[2]] = 'Invite friends'; 
    5058 
    51         $smarty->assign('leftmenu',$leftmenu); 
     59        $_SMARTY['leftmenu'] = $leftmenu; 
    5260 
    5361 
     
    5664 
    5765 
    58         $smarty->assign('Title', 'Community'); 
     66        $_SMARTY['Title'] = 'Community'; 
     67         
    5968 
    60         if($_SESSION['my_communities_id']) 
    61         { 
    62                 if( in_array($community['info']['id_comm'], $_SESSION['my_communities_id']) ) 
    63                 { 
    64                         $db->query('UPDATE user_comm SET last_visit=? WHERE id=? AND id_comm=?', array(time(), $_SESSION['my_id'], $community['info']['id_comm'])); 
    65                         $smarty->assign('member', true); 
    66                 } 
    67         } 
     69        if($_SMARTY['is_member']) 
     70                $db->query('UPDATE user_comm SET last_visit=? WHERE id=? AND id_comm=?', array(time(), $_SESSION['my_id'], $community['info']['id_comm'])); 
    6871 
    69  
    70         $smarty->assign('community', $community); 
     72        $_SMARTY['community'] = $community; 
    7173} 
    7274else