Changeset 1083
- Timestamp:
- 08/28/06 19:07:33 (7 years ago)
- Location:
- trunk/wifidog-auth
- Files:
-
- 2 added
- 5 modified
-
CHANGELOG (modified) (1 diff)
-
wifidog/classes/Content/Langstring/Langstring.php (modified) (1 diff)
-
wifidog/classes/Content/SimplePicture (added)
-
wifidog/classes/Content/SimplePicture/SimplePicture.php (added)
-
wifidog/classes/Content/TrivialLangstring/TrivialLangstring.php (modified) (1 diff)
-
wifidog/classes/Network.php (modified) (6 diffs)
-
wifidog/classes/Node.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wifidog-auth/CHANGELOG
r1082 r1083 1 2006-08-28 Benoit Grégoire <bock@step.polymtl.ca> 2 * Add SimplePicture content type 3 * Fix #225 (For both nodes and networks) 4 1 5 2006-08-28 Max Horváth <max.horvath@maxspot.de> 2 6 * Integrated KML node list export -
trunk/wifidog-auth/wifidog/classes/Content/Langstring/Langstring.php
r1080 r1083 129 129 130 130 if ($row == null) { 131 $retval = sprintf(_("(Empty $s)"), get_class($this));131 $retval = sprintf(_("(Empty %s)"), get_class($this)); 132 132 } else { 133 133 $retval = $row['value']; -
trunk/wifidog-auth/wifidog/classes/Content/TrivialLangstring/TrivialLangstring.php
r1031 r1083 50 50 51 51 /** 52 * Represents a trivialLangstring (no title, description, etc.)52 * Represents a simple Langstring (no title, description, etc.) 53 53 * 54 54 * @package WiFiDogAuthServer -
trunk/wifidog-auth/wifidog/classes/Network.php
r1070 r1083 1237 1237 $html .= "<legend>"._("Network management")."</legend>\n"; 1238 1238 $html .= "<ul class='admin_element_list'>\n"; 1239 1240 // Content management 1241 $title = _("Network content"); 1242 $name = "network_".$this->id."_content"; 1243 $data = Content :: getLinkedContentUI($name, "network_has_content", "network_id", $this->id, $display_page = "portal"); 1244 $html .= InterfaceElements :: generateAdminSectionContainer("network_content", $title, $data); 1245 1239 1246 // network_id 1240 1247 $html .= "<li class='admin_element_item_container'>\n"; … … 1243 1250 $value = htmlspecialchars($this->getId(), ENT_QUOTES); 1244 1251 $html .= $value; 1245 $html .= "</div>\n";1246 $html .= "</li>\n";1247 1248 // creation_date1249 $name = "network_".$this->getId()."_creation_date";1250 $value = htmlspecialchars($this->getCreationDate(), ENT_QUOTES);1251 1252 $html .= "<li class='admin_element_item_container'>\n";1253 $html .= "<div class='admin_element_label'>"._("Network creation date").":</div>\n";1254 $html .= "<div class='admin_element_data'>\n";1255 $html .= "<input type='text' size ='50' value='$value' name='$name'>\n";1256 1252 $html .= "</div>\n"; 1257 1253 $html .= "</li>\n"; … … 1267 1263 $html .= "</li>\n"; 1268 1264 1265 // creation_date 1266 $name = "network_".$this->getId()."_creation_date"; 1267 $value = htmlspecialchars($this->getCreationDate(), ENT_QUOTES); 1268 1269 $html .= "<li class='admin_element_item_container'>\n"; 1270 $html .= "<div class='admin_element_label'>"._("Network creation date").":</div>\n"; 1271 $html .= "<div class='admin_element_data'>\n"; 1272 $html .= "<input type='text' size ='50' value='$value' name='$name'>\n"; 1273 $html .= "</div>\n"; 1274 $html .= "</li>\n"; 1275 1269 1276 // homepage_url 1270 1277 $html .= "<li class='admin_element_item_container'>\n"; … … 1440 1447 $html .= "</li>\n"; 1441 1448 1442 // Content management1443 $title = _("Network content");1444 $name = "network_".$this->id."_content";1445 $data = Content :: getLinkedContentUI($name, "network_has_content", "network_id", $this->id, $display_page = "portal");1446 $html .= InterfaceElements :: generateAdminSectionContainer("network_content", $title, $data);1447 1449 $html .= "</ul>\n"; 1448 1450 $html .= "</fieldset>\n"; … … 1458 1460 throw new Exception(_('Access denied!')); 1459 1461 } 1460 1462 1463 // Content management 1464 $name = "network_".$this->id."_content"; 1465 Content :: processLinkedContentUI($name, 'network_has_content', 'network_id', $this->id); 1466 1467 // name 1468 $name = "network_".$this->getId()."_name"; 1469 $this->setName($_REQUEST[$name]); 1470 1461 1471 // creation_date 1462 1472 $name = "network_".$this->getId()."_creation_date"; 1463 1473 $this->setCreationDate($_REQUEST[$name]); 1464 1465 // name1466 $name = "network_".$this->getId()."_name";1467 $this->setName($_REQUEST[$name]);1468 1474 1469 1475 // homepage_url … … 1535 1541 header("Location: {$url}"); 1536 1542 } 1537 // Content management1538 $name = "network_".$this->id."_content";1539 Content :: processLinkedContentUI($name, 'network_has_content', 'network_id', $this->id);1540 1543 } 1541 1544 -
trunk/wifidog-auth/wifidog/classes/Node.php
r1070 r1083 810 810 $_html_node_information[] = InterfaceElements::generateAdminSectionContainer("node_id", $_title, $_data); 811 811 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 823 819 $_title = _("Name"); 824 820 $_data = InterfaceElements::generateInputText("node_" . $hashed_node_id . "_name", $this->getName(), "node_name_input"); 825 821 $_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); 826 832 827 833 // Description … … 984 990 $html .= InterfaceElements::generateAdminSectionContainer("node_access_rights", _("Access rights"), implode(null, $_html_access_rights)); 985 991 986 /*987 * Node content988 */989 $_html_content = array();990 991 // Node content992 $_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 section997 $html .= InterfaceElements::generateAdminSectionContainer("node_content", _("Node content"), implode(null, $_html_content));998 999 992 $html .= "</ul>\n"; 1000 993 $html .= "</fieldset>"; … … 1021 1014 // Hashed node_id (this is a workaround since PHP auto-converts HTTP vars var periods, spaces or underscores ) 1022 1015 $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); 1023 1019 1024 1020 // Name … … 1030 1026 } 1031 1027 1032 // Creation date1028 // Creation date 1033 1029 if ($_userIsAdmin) { 1034 1030 $name = "node_".$hashed_node_id."_creation_date"; … … 1204 1200 } 1205 1201 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 1211 1203 $name = "node_".$hashed_node_id."_id"; 1212 1204 $this->setId($_REQUEST[$name]);
