Show
Ignore:
Timestamp:
05/01/05 20:16:26 (8 years ago)
Author:
fproulx
Message:

2005-04-30 Francois Proulx <francois.proulx@…>

  • Fixed bug that could potentially let non owners add content in /content through content groups
  • Admin menu won't show node selector if the user is not owner of at least one hotspot
  • Added Width, height support for Picture
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/wifidog-auth/wifidog/classes/Node.php

    r601 r608  
    454454        global $db; 
    455455        $retval = array (); 
    456         $sql = "SELECT * FROM content_group JOIN content ON (content.content_id = content_group.content_group_id) WHERE is_persistent = true AND is_artistic_content = true AND is_locative_content = true"; 
     456        $sql = "SELECT * FROM content_group JOIN content ON (content.content_id = content_group.content_group_id) JOIN node_has_content ON (node_has_content.content_id = content_group.content_group_id AND node_has_content.node_id = '{$this->getId()}') WHERE is_persistent = true AND is_artistic_content = true AND is_locative_content = true"; 
    457457        $db->ExecSql($sql, $content_rows, false); 
    458458        if ($content_rows != null) 
     
    464464                if($content_group->getDisplayNumElements() >= 1) 
    465465                { 
    466                     // Disable logging and allow content to expand ( if possible ) 
    467                     $content_group->setExpandStatus(true); 
    468                     $content_group->setLoggingStatus(false); 
    469                     $retval[] = $content_group; 
     466                                if($content_group->isDisplayableAt($this)) 
     467                                { 
     468                                                // Disable logging and allow content to expand ( if possible ) 
     469                                                $content_group->setExpandStatus(true); 
     470                                                $content_group->setLoggingStatus(false); 
     471                                                $retval[] = $content_group; 
     472                                } 
    470473                } 
    471474            }