summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7e3bd96)
raw | patch | inline | side by side (parent: 7e3bd96)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 20 Aug 2007 09:21:56 +0000 (09:21 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 20 Aug 2007 09:21:56 +0000 (09:21 +0000) |
No static variables in classes and no static variable calls.
Class names will always be returned as lowercase.
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7072 594d385d-05f5-0310-b6e9-bd551577e9d8
Class names will always be returned as lowercase.
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7072 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/systems/class_dhcpNewSectionDialog.inc | patch | blob | history | |
plugins/admin/systems/class_servDHCP.inc | patch | blob | history |
diff --git a/plugins/admin/systems/class_dhcpNewSectionDialog.inc b/plugins/admin/systems/class_dhcpNewSectionDialog.inc
index 32291f83e451f635e208fbe7cbdcdee942abe71b..e2235d3728924a5cfdb047772a520778ec2baba5 100644 (file)
/* Mapping array */
var $types= array();
var $classtype= "";
- static $sectionMap= array( "dhcpService" => array("dhcpSharedNetwork", "dhcpSubnet", "dhcpGroup", "dhcpHost" /*, "dhcpClass"*/),
+ var $sectionMap= array( "dhcpService" => array("dhcpSharedNetwork", "dhcpSubnet", "dhcpGroup", "dhcpHost" /*, "dhcpClass"*/),
#"dhcpClass" => array("dhcpSubClass"),
"dhcpSubClass" => array(),
"dhcpHost" => array(),
$smarty = get_smarty();
$display= "";
- $sections= dhcpNewSectionDialog::$sectionMap[$this->classtype];
+ $sections= $this->sectionMap[$this->classtype];
$t_sections= array();
foreach ($sections as $section){
$t_sections[$section]= $this->types[$section];
index d9c571f1d752ae83ac09dd9cfc3b7afdd9324832..742ae553962f93849e3d3a44ff277913fd4fc022 100644 (file)
"dhcpFailOverPeer" => _("Failover peer"),
"dhcpSharedNetwork" => _("Shared network"));
+
+ /* Backport: PHP4 compatibility */
+ foreach($this->types as $type => $translation){
+ $this->types[strtolower($type)] = $translation;
+ }
+
/* Load information about available services */
$this->reload();
if (!count($this->dhcpSections)){
/* Section Creation? */
if (isset($_POST['create_section']) && isset($_POST['section'])){
$section= $_POST['section'];
- if (isset(dhcpNewSectionDialog::$sectionMap[$section])){
+ $tmp = new dhcpNewSectionDialog(NULL);
+ if (isset($tmp->sectionMap[$section])){
$this->dialog= new $section($this->current_object);
$this->current_object= "";
} else {
"<input type='image' src='images/edit.png' name='editDhcp_%s' title='"._("Edit DHCP section")."'>";
$editImg = "<input type='image' src='images/edit.png' name='editDhcp_%s' title='"._("Edit DHCP section")."'>".
"<input type='image' src='images/edittrash.png' name='delDhcp_%s' title='"._("Remove DHCP section")."'>";
+
+ $tmp = new dhcpNewSectionDialog(NULL);
foreach($this->dhcpSections as $section => $values ){
- if (count(dhcpNewSectionDialog::$sectionMap[$this->objectType($section)])){
+
+ if (count($tmp->sectionMap[$this->objectType($section)])){
if ($this->objectType($section) == "dhcpService"){
$DhcpList->AddEntry(array(
array("string" => $values),