Show
Ignore:
Timestamp:
08/28/06 19:07:33 (5 years ago)
Author:
max-horvath
Message:

"2006-08-28 Benoit Gregoire <bock@…>

Files:
1 modified

Legend:

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

    r1070 r1083  
    810810                $_html_node_information[] = InterfaceElements::generateAdminSectionContainer("node_id", $_title, $_data); 
    811811 
    812                 // Creation date 
    813                 $_title = _("Creation date"); 
    814                 if ($_userIsAdmin) { 
    815             $_data = DateTime::getSelectDateTimeUI(new DateTime($this->getCreationDate()), "node_" . $hashed_node_id . "_creation_date", DateTime::INTERFACE_DATETIME_FIELD, "node_creation_date_input"); 
    816                 } else { 
    817             $_data  = htmlspecialchars($this->getCreationDate(), ENT_QUOTES); 
    818                 $_data .= InterfaceElements::generateInputHidden("node_" . $hashed_node_id . "_creation_date", $this->getCreationDate()); 
    819                 } 
    820                 $_html_node_information[] = InterfaceElements::generateAdminSectionContainer("node_creation_date", $_title, $_data); 
    821  
    822                 // Name 
     812        //Node content 
     813        $_html_content = array(); 
     814        $_title = _("Node content"); 
     815        $_data = Content::getLinkedContentUI("node_" . $hashed_node_id . "_content", "node_has_content", "node_id", $this->id, "portal"); 
     816        $html .= InterfaceElements::generateAdminSectionContainer("node_content", $_title, $_data); 
     817  
     818                // Name 
    823819                $_title = _("Name"); 
    824820                $_data = InterfaceElements::generateInputText("node_" . $hashed_node_id . "_name", $this->getName(), "node_name_input"); 
    825821                $_html_node_information[] = InterfaceElements::generateAdminSectionContainer("node_name", $_title, $_data); 
     822 
     823        // Creation date 
     824        $_title = _("Creation date"); 
     825        if ($_userIsAdmin) { 
     826            $_data = DateTime::getSelectDateTimeUI(new DateTime($this->getCreationDate()), "node_" . $hashed_node_id . "_creation_date", DateTime::INTERFACE_DATETIME_FIELD, "node_creation_date_input"); 
     827        } else { 
     828            $_data  = htmlspecialchars($this->getCreationDate(), ENT_QUOTES); 
     829            $_data .= InterfaceElements::generateInputHidden("node_" . $hashed_node_id . "_creation_date", $this->getCreationDate()); 
     830        } 
     831        $_html_node_information[] = InterfaceElements::generateAdminSectionContainer("node_creation_date", $_title, $_data); 
    826832 
    827833                // Description 
     
    984990                $html .= InterfaceElements::generateAdminSectionContainer("node_access_rights", _("Access rights"), implode(null, $_html_access_rights)); 
    985991 
    986                 /* 
    987                  * Node content 
    988                  */ 
    989                 $_html_content = array(); 
    990  
    991                 // Node content 
    992                 $_title = _("Node content"); 
    993                 $_data = Content::getLinkedContentUI("node_" . $this->id . "_content", "node_has_content", "node_id", $this->id, "portal"); 
    994                 $_html_content[] = InterfaceElements::generateAdminSectionContainer("node_content", $_title, $_data); 
    995  
    996                 // Build section 
    997                 $html .= InterfaceElements::generateAdminSectionContainer("node_content", _("Node content"), implode(null, $_html_content)); 
    998  
    999992                $html .= "</ul>\n"; 
    1000993                $html .= "</fieldset>"; 
     
    10211014                // Hashed node_id (this is a workaround since PHP auto-converts HTTP vars var periods, spaces or underscores ) 
    10221015                $hashed_node_id = md5($this->getId()); 
     1016       // Content processing 
     1017        $name = "node_{$hashed_node_id}_content"; 
     1018        Content::processLinkedContentUI($name, 'node_has_content', 'node_id', $this->id); 
    10231019 
    10241020                // Name 
     
    10301026                } 
    10311027 
    1032                 // Creation date 
     1028                // Creation date 
    10331029                if ($_userIsAdmin) { 
    10341030                $name = "node_".$hashed_node_id."_creation_date"; 
     
    12041200                } 
    12051201 
    1206                 // Content processing 
    1207                 $name = "node_{$this->id}_content"; 
    1208                 Content::processLinkedContentUI($name, 'node_has_content', 'node_id', $this->id); 
    1209  
    1210                 // Name 
     1202                // Id 
    12111203                $name = "node_".$hashed_node_id."_id"; 
    12121204                $this->setId($_REQUEST[$name]);