From: cajus Date: Tue, 26 Jan 2010 09:22:13 +0000 (+0000) Subject: split - second flush X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=fd16381bbcb916810fe1c4899ff0fdd52f5e8dd3;p=gosa.git split - second flush git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15299 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/apache2/admin/systems/services/apache2/class_apacheUtils.inc b/gosa-plugins/apache2/admin/systems/services/apache2/class_apacheUtils.inc index 7271ddc1c..a827baacc 100644 --- a/gosa-plugins/apache2/admin/systems/services/apache2/class_apacheUtils.inc +++ b/gosa-plugins/apache2/admin/systems/services/apache2/class_apacheUtils.inc @@ -195,7 +195,7 @@ class apacheUtils extends plugin return($ret); } - $apacheServerNameIndex = split("/",$apacheServerNameMix); + $apacheServerNameIndex = explode("/",$apacheServerNameMix); $apacheServerName = $apacheServerNameIndex[1]; $nameServer = strtolower($apacheServerNameIndex[0]); $ldap = $config->get_ldap_link(); diff --git a/gosa-plugins/apache2/admin/systems/services/apache2/class_servApacheEditVhost.inc b/gosa-plugins/apache2/admin/systems/services/apache2/class_servApacheEditVhost.inc index 19fba7af3..1726c72c7 100644 --- a/gosa-plugins/apache2/admin/systems/services/apache2/class_servApacheEditVhost.inc +++ b/gosa-plugins/apache2/admin/systems/services/apache2/class_servApacheEditVhost.inc @@ -381,7 +381,7 @@ class servapacheVhostEdit extends plugin /* Check server aliases */ foreach($this->apacheServerAlias as $key => $line){ - $apacheServerAlias_ar=split(" ",$line); + $apacheServerAlias_ar=explode(" ",$line); $url=$apacheServerAlias_ar[1]; if(!tests::is_path($url)){ $message[] = msgPool::invalid(_("Server alias")); @@ -391,7 +391,7 @@ class servapacheVhostEdit extends plugin /* Check script aliases */ foreach($this->apacheScriptAlias as $key => $line){ - $apacheScriptAlias_ar=split(" ",$line); + $apacheScriptAlias_ar=explode(" ",$line); $url=$apacheScriptAlias_ar[1]; if(!tests::is_path($url)){ $message[] = msgPool::invalid(_("Script alias")); diff --git a/gosa-plugins/dak/addons/dak/class_DAK.inc b/gosa-plugins/dak/addons/dak/class_DAK.inc index ce41bee46..985dedda5 100644 --- a/gosa-plugins/dak/addons/dak/class_DAK.inc +++ b/gosa-plugins/dak/addons/dak/class_DAK.inc @@ -18,7 +18,7 @@ class DAK while($attrs = $ldap->fetch()){ for($i = 0 ; $i < $attrs['FAIrepository']['count'] ; $i ++){ list($url,$parent,$release,$sections) = explode("|",$attrs['FAIrepository'][$i]); - $repo['SECTIONS'] = split(",",$sections); + $repo['SECTIONS'] = explode(",",$sections); $repo['SERVER'] = $attrs['cn'][0]; $repo['RELEASE'] = $release; $repo['MAC'] = $attrs['macAddress'][0]; @@ -53,7 +53,7 @@ class DAK $serv['REPOSITORIES'] = array(); for($i = 0 ; $i < $attrs['FAIrepository']['count'] ; $i ++){ list($url,$parent,$release,$sections) = explode("|",$attrs['FAIrepository'][$i]); - $repo['SECTIONS'] = split(",",$sections); + $repo['SECTIONS'] = explode(",",$sections); $repo['RELEASE'] = $release; $repo['PARENT'] = $parent; $repo['URL'] = $url; diff --git a/gosa-plugins/dhcp/admin/systems/services/dhcp/class_dhcpNetwork.inc b/gosa-plugins/dhcp/admin/systems/services/dhcp/class_dhcpNetwork.inc index c84b1a1ba..fe9b8f33f 100644 --- a/gosa-plugins/dhcp/admin/systems/services/dhcp/class_dhcpNetwork.inc +++ b/gosa-plugins/dhcp/admin/systems/services/dhcp/class_dhcpNetwork.inc @@ -47,7 +47,7 @@ class dhcpNetwork extends plugin } else { $servers= array(); if($this->options->exists('domain-name-servers')){ - foreach(split(",", $this->options->get('domain-name-servers')) as $val){ + foreach(explode(",", $this->options->get('domain-name-servers')) as $val){ $servers[$val]= $val; } } @@ -94,7 +94,7 @@ class dhcpNetwork extends plugin if($this->options->exists('domain-name-servers')){ $servers= array(); - foreach(split(",", $this->options->get('domain-name-servers')) as $val){ + foreach(explode(",", $this->options->get('domain-name-servers')) as $val){ $servers[$val]= $val; } $smarty->assign("dnsservers", $servers); diff --git a/gosa-plugins/dhcp/admin/systems/services/dhcp/class_servDHCP.inc b/gosa-plugins/dhcp/admin/systems/services/dhcp/class_servDHCP.inc index 891141bf5..a8994c1eb 100644 --- a/gosa-plugins/dhcp/admin/systems/services/dhcp/class_servDHCP.inc +++ b/gosa-plugins/dhcp/admin/systems/services/dhcp/class_servDHCP.inc @@ -621,7 +621,7 @@ class servdhcp extends goService foreach ($list as $value){ /* Set header */ - $sortpart= split(",", $value['dn']); + $sortpart= explode(",", $value['dn']); $sortpart= array_reverse($sortpart); $tmp= implode(",", $sortpart); @@ -670,7 +670,7 @@ class servdhcp extends goService } /* Prepare for sorting... */ - $sortpart= split(",", $ldap->getDN()); + $sortpart= explode(",", $ldap->getDN()); $sortpart= array_reverse($sortpart); $tmp= implode(",", $sortpart); $final[$ldap->getDN()]= $tmp."!".$spaces.$type." '".$attrs['cn'][0]."'"; diff --git a/gosa-plugins/dns/admin/systems/services/dns/class_DNS.inc b/gosa-plugins/dns/admin/systems/services/dns/class_DNS.inc index 996777000..ec5ce83c8 100644 --- a/gosa-plugins/dns/admin/systems/services/dns/class_DNS.inc +++ b/gosa-plugins/dns/admin/systems/services/dns/class_DNS.inc @@ -50,7 +50,7 @@ class DNS */ static function FlipIp($ip) { - $tmp = array_reverse(split("\.",$ip)); + $tmp = array_reverse(explode(".",$ip)); $new = ""; foreach($tmp as $section){ $new .= $section."."; @@ -119,7 +119,7 @@ class DNS /* Generate SOA entry */ if(isset($attrs['sOARecord'][0])){ - $tmp = split("\ ",$attrs['sOARecord'][0]) ; + $tmp = explode(" ",$attrs['sOARecord'][0]) ; $tmp2 = array(); /* Assign soa vars */ @@ -348,7 +348,7 @@ class DNS $zones = DNS::getAvailableZones($config); $zonesArr = array(); foreach($zones as $zoneMix){ - $zoneIndex = split("/",$zoneMix); + $zoneIndex = explode("/",$zoneMix); if(!array_key_exists($zoneIndex[0],$zonesArr)) { $zonesArr[$zoneIndex[0]] = array(); } @@ -617,7 +617,7 @@ class DNS static function getNameFromMix($zoneMix){ $ret = ""; if(!strstr($zoneMix, '/')) return($ret); - $zoneIndex = split("/",$zoneMix); + $zoneIndex = explode("/",$zoneMix); return($zoneIndex[1]); } @@ -631,7 +631,7 @@ class DNS return($ret); } - $zoneNameIndex = split("/",$zoneNameMix); + $zoneNameIndex = explode("/",$zoneNameMix); $zoneName = $zoneNameIndex[1]; $nameServer = strtolower($zoneNameIndex[0]); $ldap = $config->get_ldap_link(); diff --git a/gosa-plugins/dns/admin/systems/services/dns/class_servDNSeditZone.inc b/gosa-plugins/dns/admin/systems/services/dns/class_servDNSeditZone.inc index d31bedd0e..75024f308 100644 --- a/gosa-plugins/dns/admin/systems/services/dns/class_servDNSeditZone.inc +++ b/gosa-plugins/dns/admin/systems/services/dns/class_servDNSeditZone.inc @@ -86,7 +86,7 @@ class servdnseditZone extends plugin $usedPrio = array(); foreach($this->Records as $key => $rec){ if($rec['type'] == "mXRecord"){ - $tmp = split(" ",$rec['value']); + $tmp = explode(" ",$rec['value']); $rec['value'] = $tmp[1]; $tmp2[$tmp[0]] = $rec; unset($this->Records[$key]); @@ -123,7 +123,7 @@ class servdnseditZone extends plugin /* Detect Network class */ if(!empty($this->ReverseZone)){ - $dots = count(split("\.",$this->ReverseZone)); + $dots = count(explode(".",$this->ReverseZone)); if($dots == 1){ $this->NetworkClass = "A"; $this->ReverseZone .= ".0.0.0"; diff --git a/gosa-plugins/dns/admin/systems/services/dns/class_servDNSeditZoneEntries.inc b/gosa-plugins/dns/admin/systems/services/dns/class_servDNSeditZoneEntries.inc index 20d00699e..674ad057f 100644 --- a/gosa-plugins/dns/admin/systems/services/dns/class_servDNSeditZoneEntries.inc +++ b/gosa-plugins/dns/admin/systems/services/dns/class_servDNSeditZoneEntries.inc @@ -93,7 +93,7 @@ class servDNSeditZoneEntries extends plugin /* Add a new Record in given object */ $tmp = preg_replace("/^.*_(.*)_.*$/","\\1",$name); - $tmp2 = split("\|",$tmp); + $tmp2 = explode("|",$tmp); /* Add new host entry */ @@ -147,7 +147,7 @@ class servDNSeditZoneEntries extends plugin /* Extract informations out of post name */ $tmp = preg_replace("/^.*_/","\\1",$name); - $tmp2 = split("\|",$tmp); + $tmp2 = explode("|",$tmp); if(count($tmp2) != 2) continue; @@ -204,7 +204,7 @@ class servDNSeditZoneEntries extends plugin /* Extract informations out of post name */ $tmp = preg_replace("/^.*_/","\\1",$name); - $tmp2 = split("\|",$tmp); + $tmp2 = explode("|",$tmp); if(count($tmp2) != 2) continue; diff --git a/gosa-plugins/fai/admin/fai/class_FAI.inc b/gosa-plugins/fai/admin/fai/class_FAI.inc index 698203dc0..37a06c14f 100644 --- a/gosa-plugins/fai/admin/fai/class_FAI.inc +++ b/gosa-plugins/fai/admin/fai/class_FAI.inc @@ -897,7 +897,7 @@ class FAI $sub_releases = array(); $source_dn = ""; - $tmp = split("\/",$source_release); + $tmp = explode("/",$source_release); foreach($tmp as $part){ if(empty($part)){ continue; @@ -1065,7 +1065,7 @@ class FAI if(preg_match("/^ou=/",$sourcedn)){ echo "

"._("Processing")." ".LDAP::fix($destinationdn)."

"; }else{ - $tmp = split(",",$sourcedn); + $tmp = explode(",",$sourcedn); echo " "._("Object").": "; $deststr = LDAP::fix($destinationdn); if(strlen($deststr) > 96){ diff --git a/gosa-plugins/fai/admin/fai/class_debconfTemplate.inc b/gosa-plugins/fai/admin/fai/class_debconfTemplate.inc index bd0dbf237..6791eaf12 100644 --- a/gosa-plugins/fai/admin/fai/class_debconfTemplate.inc +++ b/gosa-plugins/fai/admin/fai/class_debconfTemplate.inc @@ -20,7 +20,7 @@ class debconf function load_from_string($str) { - $lines = split("\n",$str); + $lines = explode("\n",$str); $this->template = array(); $post_name = 0; $langcode = $this->language.".UTF-8"; @@ -245,7 +245,7 @@ class debconf $result= $this->render_string($data); } else { $choices= ""; - foreach (split(", ", $data['Choices']) as $choice){ + foreach (explode(", ", $data['Choices']) as $choice){ $choices[]= $choice; } @@ -259,7 +259,7 @@ class debconf "; - $defs = split(", ",$data['Default']); + $defs = explode(", ",$data['Default']); foreach($choices as $value){ if(in_array($value,$defs)){ $result.="\n".$value."
"; @@ -305,7 +305,7 @@ class debconf $result = $this->render_multiselect($data); } else { $choices= ""; - foreach (split(", ", $data['Choices']) as $choice){ + foreach (explode(", ", $data['Choices']) as $choice){ $choices[]= $choice; } diff --git a/gosa-plugins/fai/admin/fai/class_faiDiskEntry.inc b/gosa-plugins/fai/admin/fai/class_faiDiskEntry.inc index f5e55d4fa..d0c041fd6 100644 --- a/gosa-plugins/fai/admin/fai/class_faiDiskEntry.inc +++ b/gosa-plugins/fai/admin/fai/class_faiDiskEntry.inc @@ -96,7 +96,7 @@ class faiDiskEntry extends plugin // Load bootable flag for partitions if (preg_match("/^bootable:/", $option)){ - $bootable = split(",", trim(preg_replace("/^bootable:/","",$option),",")); + $bootable = explode(",", trim(preg_replace("/^bootable:/","",$option),",")); foreach($bootable as $bootflag){ if(isset($this->partitions[$bootflag])){ $this->partitions[$bootflag]['bootable'] = TRUE; @@ -107,7 +107,7 @@ class faiDiskEntry extends plugin // Load resize flag for partitions if (preg_match("/^resize:/", $option)){ - $resize = split(",", trim(preg_replace("/^resize:/","",$option),",")); + $resize = explode(",", trim(preg_replace("/^resize:/","",$option),",")); foreach($resize as $id){ if(isset($this->partitions[$id])){ $this->partitions[$id]['resize'] = TRUE; @@ -118,7 +118,7 @@ class faiDiskEntry extends plugin // Load preserve_always flag for partitions if (preg_match("/^preserve_always:/", $option)){ - $preserve = split(",", trim(preg_replace("/^preserve_always:/","",$option),",")); + $preserve = explode(",", trim(preg_replace("/^preserve_always:/","",$option),",")); foreach($preserve as $presflag){ if(isset($this->partitions[$presflag])){ $this->partitions[$presflag]['preserve'] = TRUE; @@ -130,7 +130,7 @@ class faiDiskEntry extends plugin // Load preserve_reinstall flag for partitions if (preg_match("/^preserve_reinstall:/", $option)){ - $preserve = split(",", trim(preg_replace("/^preserve_reinstall:/","",$option),",")); + $preserve = explode(",", trim(preg_replace("/^preserve_reinstall:/","",$option),",")); foreach($preserve as $presflag){ if(isset($this->partitions[$bootflag])){ $this->partitions[$presflag]['preserve'] = TRUE; @@ -182,7 +182,7 @@ class faiDiskEntry extends plugin if((preg_match("/RemovePartition_/",$name)) && $this->acl_is_removeable() && !preg_match("/freeze/i",$this->FAIstate)){ - $tmp = split("_",$name); + $tmp = explode("_",$name); $this->removePartition($tmp[1]); break; } @@ -359,7 +359,7 @@ class faiDiskEntry extends plugin // Add disks of raid arrays, to the used list. if($disk['FAIdiskType'] == "raid"){ - foreach(split(",",$part['FAIpartitionSize']) as $rDevice){ + foreach(explode(",",$part['FAIpartitionSize']) as $rDevice){ $used[] = preg_replace("/:.*$/i","",$rDevice); } } @@ -407,7 +407,7 @@ class faiDiskEntry extends plugin } foreach($disk['partitions'] as $partkey => $part){ if($disk['FAIdiskType'] == "raid"){ - foreach(split(",",$part['FAIpartitionSize']) as $partname){ + foreach(explode(",",$part['FAIpartitionSize']) as $partname){ $list[preg_replace("/:.*$/","",$partname)][] = $disk; } } diff --git a/gosa-plugins/fai/admin/fai/class_faiPackage.inc b/gosa-plugins/fai/admin/fai/class_faiPackage.inc index 88fb15dc0..bbfa30c33 100644 --- a/gosa-plugins/fai/admin/fai/class_faiPackage.inc +++ b/gosa-plugins/fai/admin/fai/class_faiPackage.inc @@ -175,7 +175,7 @@ class faiPackage extends plugin $release = $this->parent->parent->fai_release; $tmp= preg_replace('/[,]*'.preg_quote(get_ou('faiBaseRDN'), '/').'.*$/i', '', $release); $tmp= preg_replace('/ou=/', '', $tmp); - $rev= array_reverse(split(',', $tmp)); + $rev= array_reverse(explode(',', $tmp)); $this->FAIdebianRelease= "/"; foreach ($rev as $part){ $this->FAIdebianRelease.= "/$part"; @@ -573,7 +573,7 @@ class faiPackage extends plugin $current_release = $this->parent->parent->fai_release; $tmp= preg_replace('/,'.preg_quote(get_ou('faiBaseRDN'), '/').'.*$/i', '', $current_release); $tmp= preg_replace('/ou=/', '', $tmp); - $rev= array_reverse(split(',', $tmp)); + $rev= array_reverse(explode(',', $tmp)); $this->FAIdebianRelease= ""; foreach ($rev as $part){ $this->FAIdebianRelease.= "/$part"; @@ -752,9 +752,9 @@ class faiPackage extends plugin if(isset($attrs['FAIrepository'])){ for($i =0 ; $i < $attrs['FAIrepository']['count']; $i++){ $obj = $attrs['FAIrepository'][$i]; - $tmp = split("\|",$obj); + $tmp = explode("|",$obj); if(count($tmp)==4){ - foreach(split(",",$tmp[3]) as $sec){ + foreach(explode(",",$tmp[3]) as $sec){ if(!empty($sec)){ $ret[$tmp[2]][] = $sec; } diff --git a/gosa-plugins/fai/admin/fai/class_faiPartition.inc b/gosa-plugins/fai/admin/fai/class_faiPartition.inc index 275a4a12d..9d83e2bb5 100644 --- a/gosa-plugins/fai/admin/fai/class_faiPartition.inc +++ b/gosa-plugins/fai/admin/fai/class_faiPartition.inc @@ -120,7 +120,7 @@ class faiPartition extends plugin }elseif($type == "raid"){ // Extract raid devices out of the partition size attribute. - $usedDisks = split(",",$this->FAIpartitionSize); + $usedDisks = explode(",",$this->FAIpartitionSize); foreach($usedDisks as $disk){ $name = preg_replace("/:.*$/","",$disk); $spare = preg_match("/:spare/",$disk); @@ -250,7 +250,7 @@ class faiPartition extends plugin // Add disks of raid arrays, to the used list. if($disk['FAIdiskType'] == "raid"){ - foreach(split(",",$part['FAIpartitionSize']) as $rDevice){ + foreach(explode(",",$part['FAIpartitionSize']) as $rDevice){ $used[] = preg_replace("/:.*$/i","",$rDevice); } } diff --git a/gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc b/gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc index ae642c3b9..197e1b2b2 100644 --- a/gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc +++ b/gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc @@ -217,7 +217,7 @@ class faiPartitionTable extends plugin } foreach($disk['partitions'] as $partkey => $part){ if($disk['FAIdiskType'] == "raid"){ - foreach(split(",",$part['FAIpartitionSize']) as $partname){ + foreach(explode(",",$part['FAIpartitionSize']) as $partname){ $list[preg_replace("/:.*$/","",$partname)][] = $disk; } } diff --git a/gosa-plugins/fai/admin/fai/class_faiPartitionTableEntry.inc b/gosa-plugins/fai/admin/fai/class_faiPartitionTableEntry.inc index e84d5f37f..a5adc2f1c 100644 --- a/gosa-plugins/fai/admin/fai/class_faiPartitionTableEntry.inc +++ b/gosa-plugins/fai/admin/fai/class_faiPartitionTableEntry.inc @@ -83,7 +83,7 @@ class faiPartitionTableEntry extends plugin */ foreach($_POST as $name => $value){ if((preg_match("/Delete_.*/",$name)) && $this->acl_is_removeable() && !preg_match("/freeze/i",$this->FAIstate)){ - $tmp = split("_",$name); + $tmp = explode("_",$name); $s_action = "remove"; $s_entry = $tmp[1]; } @@ -373,7 +373,7 @@ class faiPartitionTableEntry extends plugin $message[]=_("Please use 'swap' as mount point, if 'swap' is used as fs-type."); } - $tmp = split("-",$part['FAIpartitionSize']); + $tmp = explode("-",$part['FAIpartitionSize']); switch (count($tmp)){ case 0: $message[]= msgPool::invalid(sprintf(_("partition %s size"),$key)); diff --git a/gosa-plugins/fai/admin/fai/class_faiProfile.inc b/gosa-plugins/fai/admin/fai/class_faiProfile.inc index d92e5178b..018d8c750 100644 --- a/gosa-plugins/fai/admin/fai/class_faiProfile.inc +++ b/gosa-plugins/fai/admin/fai/class_faiProfile.inc @@ -32,7 +32,7 @@ class faiProfile extends plugin $this->ui = get_userinfo(); /* Parse ldap attribute to get all assigned classes */ - $tmp = split(" ",$this->FAIclass); + $tmp = explode(" ",$this->FAIclass); $tmp2 = array(); foreach($tmp as $class){ if(!empty($class)){ @@ -446,7 +446,7 @@ class faiProfile extends plugin plugin::PrepareForCopyPaste($source); /* Parse ldap attribute to get all assigned classes */ - $tmp = split(" ",$this->FAIclass); + $tmp = explode(" ",$this->FAIclass); $tmp2 = array(); foreach($tmp as $class){ if(!empty($class)){ diff --git a/gosa-plugins/fai/admin/fai/class_faiSummaryTab.inc b/gosa-plugins/fai/admin/fai/class_faiSummaryTab.inc index b706bd4d9..5887e932e 100644 --- a/gosa-plugins/fai/admin/fai/class_faiSummaryTab.inc +++ b/gosa-plugins/fai/admin/fai/class_faiSummaryTab.inc @@ -566,7 +566,7 @@ class faiSummaryTab extends plugin{ /* Create a new Profile entry */ function prepare_FAIprofile($data) { - $classes = split("\ ",$data['FAIclass'][0]); + $classes = explode(" ",$data['FAIclass'][0]); foreach($classes as $class){ $class = trim($class); $this->resolveObject($class); diff --git a/gosa-plugins/fai/admin/fai/tabsHook.inc b/gosa-plugins/fai/admin/fai/tabsHook.inc index 2e9e00a87..40c997c76 100644 --- a/gosa-plugins/fai/admin/fai/tabsHook.inc +++ b/gosa-plugins/fai/admin/fai/tabsHook.inc @@ -26,8 +26,8 @@ class tabsHook extends tabs if ($this->dn != $new_dn && $this->dn != "new"){ /* if( new_dn is subtree of this->dn ) */ - $cnt1 = count(split(",",$this->dn)); - $cnt2 = count(split(",",$new_dn)); + $cnt1 = count(explode(",",$this->dn)); + $cnt2 = count(explode(",",$new_dn)); if((strstr($new_dn,$this->dn))&&($cnt1<$cnt2)){ msg_dialog::display(_("Error"), _("Moving the tree failed. Destination tree is subtree of source tree."), ERROR_DIALOG); }else{ diff --git a/gosa-plugins/fai/admin/fai/tabsPackage.inc b/gosa-plugins/fai/admin/fai/tabsPackage.inc index 9f819d48f..835933f79 100644 --- a/gosa-plugins/fai/admin/fai/tabsPackage.inc +++ b/gosa-plugins/fai/admin/fai/tabsPackage.inc @@ -27,8 +27,8 @@ class tabsPackage extends tabs if ($this->dn != $new_dn && $this->dn != "new"){ /* if( new_dn is subtree of this->dn ) */ - $cnt1 = count(split(",",$this->dn)); - $cnt2 = count(split(",",$new_dn)); + $cnt1 = count(explode(",",$this->dn)); + $cnt2 = count(explode(",",$new_dn)); if((strstr($new_dn,$this->dn))&&($cnt1<$cnt2)){ msg_dialog::display(_("Error"), _("Moving the tree failed. Destination tree is subtree of source tree."), ERROR_DIALOG); }else{ diff --git a/gosa-plugins/fai/admin/fai/tabsPartition.inc b/gosa-plugins/fai/admin/fai/tabsPartition.inc index 76ac003f7..3ac0e2257 100644 --- a/gosa-plugins/fai/admin/fai/tabsPartition.inc +++ b/gosa-plugins/fai/admin/fai/tabsPartition.inc @@ -28,8 +28,8 @@ class tabsPartition extends tabs if ($this->dn != $new_dn && $this->dn != "new"){ /* if( new_dn is subtree of this->dn ) */ - $cnt1 = count(split(",",$this->dn)); - $cnt2 = count(split(",",$new_dn)); + $cnt1 = count(explode(",",$this->dn)); + $cnt2 = count(explode(",",$new_dn)); if((strstr($new_dn,$this->dn))&&($cnt1<$cnt2)){ msg_dialog::display(_("Error"), _("Moving the tree failed. Destination tree is subtree of source tree."), ERROR_DIALOG); }else{ diff --git a/gosa-plugins/fai/admin/fai/tabsProfile.inc b/gosa-plugins/fai/admin/fai/tabsProfile.inc index d14029c26..3773637e0 100644 --- a/gosa-plugins/fai/admin/fai/tabsProfile.inc +++ b/gosa-plugins/fai/admin/fai/tabsProfile.inc @@ -27,8 +27,8 @@ class tabsProfile extends tabs if ($this->dn != $new_dn && $this->dn != "new"){ /* if( new_dn is subtree of this->dn ) */ - $cnt1 = count(split(",",$this->dn)); - $cnt2 = count(split(",",$new_dn)); + $cnt1 = count(explode(",",$this->dn)); + $cnt2 = count(explode(",",$new_dn)); if((strstr($new_dn,$this->dn))&&($cnt1<$cnt2)){ msg_dialog::display(_("Error"), _("Moving the tree failed. Destination tree is subtree of source tree."), ERROR_DIALOG); }else{ diff --git a/gosa-plugins/fai/admin/fai/tabsScript.inc b/gosa-plugins/fai/admin/fai/tabsScript.inc index 915fb06c0..7cf0a027e 100644 --- a/gosa-plugins/fai/admin/fai/tabsScript.inc +++ b/gosa-plugins/fai/admin/fai/tabsScript.inc @@ -27,8 +27,8 @@ class tabsScript extends tabs if ($this->dn != $new_dn && $this->dn != "new"){ /* if( new_dn is subtree of this->dn ) */ - $cnt1 = count(split(",",$this->dn)); - $cnt2 = count(split(",",$new_dn)); + $cnt1 = count(explode(",",$this->dn)); + $cnt2 = count(explode(",",$new_dn)); if((strstr($new_dn,$this->dn))&&($cnt1<$cnt2)){ msg_dialog::display(_("Error"), _("Moving the tree failed. Destination tree is subtree of source tree."), ERROR_DIALOG); }else{ diff --git a/gosa-plugins/fai/admin/fai/tabsTemplate.inc b/gosa-plugins/fai/admin/fai/tabsTemplate.inc index 2b8b15f5d..e47096fd3 100644 --- a/gosa-plugins/fai/admin/fai/tabsTemplate.inc +++ b/gosa-plugins/fai/admin/fai/tabsTemplate.inc @@ -27,8 +27,8 @@ class tabsTemplate extends tabs if ($this->dn != $new_dn && $this->dn != "new"){ /* if( new_dn is subtree of this->dn ) */ - $cnt1 = count(split(",",$this->dn)); - $cnt2 = count(split(",",$new_dn)); + $cnt1 = count(explode(",",$this->dn)); + $cnt2 = count(explode(",",$new_dn)); if((strstr($new_dn,$this->dn))&&($cnt1<$cnt2)){ msg_dialog::display(_("Error"), _("Moving the tree failed. Destination tree is subtree of source tree."), ERROR_DIALOG); }else{ diff --git a/gosa-plugins/fai/admin/fai/tabsVariable.inc b/gosa-plugins/fai/admin/fai/tabsVariable.inc index 5b23577d9..5a636be08 100644 --- a/gosa-plugins/fai/admin/fai/tabsVariable.inc +++ b/gosa-plugins/fai/admin/fai/tabsVariable.inc @@ -27,8 +27,8 @@ class tabsVariable extends tabs if ($this->dn != $new_dn && $this->dn != "new"){ /* if( new_dn is subtree of this->dn ) */ - $cnt1 = count(split(",",$this->dn)); - $cnt2 = count(split(",",$new_dn)); + $cnt1 = count(explode(",",$this->dn)); + $cnt2 = count(explode(",",$new_dn)); if((strstr($new_dn,$this->dn))&&($cnt1<$cnt2)){ msg_dialog::display(_("Error"), _("Moving the tree failed. Destination tree is subtree of source tree."), ERROR_DIALOG); }else{ diff --git a/gosa-plugins/fai/admin/systems/services/repository/class_servRepository.inc b/gosa-plugins/fai/admin/systems/services/repository/class_servRepository.inc index f06598c46..4a4d40018 100644 --- a/gosa-plugins/fai/admin/systems/services/repository/class_servRepository.inc +++ b/gosa-plugins/fai/admin/systems/services/repository/class_servRepository.inc @@ -40,7 +40,7 @@ class servrepository extends goService $this->repositories = array(); if(isset($this->attrs['FAIrepository'])){ for($i = 0; $i < $this->attrs['FAIrepository']['count']; $i++){ - $tmp = split("\|",$this->attrs['FAIrepository'][$i]); + $tmp = explode("|",$this->attrs['FAIrepository'][$i]); $tmp2 = array(); $tmp3 = array(); @@ -66,7 +66,7 @@ class servrepository extends goService } if(isset($tmp[3])){ - $tmp3 = split(",",$tmp[3]); + $tmp3 = explode(",",$tmp[3]); foreach($tmp3 as $sec){ $tmp2['Sections'][$sec]=$sec; } diff --git a/gosa-plugins/fai/admin/systems/services/repository/class_servRepositorySetup.inc b/gosa-plugins/fai/admin/systems/services/repository/class_servRepositorySetup.inc index 89594ff5e..61e59d8cb 100644 --- a/gosa-plugins/fai/admin/systems/services/repository/class_servRepositorySetup.inc +++ b/gosa-plugins/fai/admin/systems/services/repository/class_servRepositorySetup.inc @@ -66,7 +66,7 @@ class servRepositorySetup extends plugin if(preg_match("/ /",$val)){ /* Generate list of new section names */ - $vals = split(" ",$val); + $vals = explode(" ",$val); /* Add new entries */ foreach($vals as $entry){ @@ -203,13 +203,13 @@ class servRepositorySetup extends plugin if(!$res || empty($res2)){ msg_dialog::display(_("Error"), msgPool::cmdexecfailed("repositoryBranchHook", $cmd, _("Repository service")), ERROR_DIALOG); }else{ - $tmp = split("\n",$res); + $tmp = preg_split("/\n/",$res); foreach($tmp as $hook){ /* skip empty */ if(empty($hook)) continue; if(preg_match("/;/",$hook)){ - $hookinfo = split(";",$hook); + $hookinfo = explode(";",$hook); $ret[$hookinfo[0]] = $hookinfo[0]; }else{ $ret[$hook] = $hook; diff --git a/gosa-plugins/gofon/gofon/conference/class_phoneConferenceGeneric.inc b/gosa-plugins/gofon/gofon/conference/class_phoneConferenceGeneric.inc index cfa94b4d8..dc5a16bd6 100644 --- a/gosa-plugins/gofon/gofon/conference/class_phoneConferenceGeneric.inc +++ b/gosa-plugins/gofon/gofon/conference/class_phoneConferenceGeneric.inc @@ -128,7 +128,7 @@ class conference extends plugin * Parameter|Lifetime|number */ if($this->dn!="new"){ - $tmp1= split("\|",$this->attrs['goFonConferenceOption'][0]); + $tmp1= explode("|",$this->attrs['goFonConferenceOption'][0]); for($i = 0 ; $i < strlen($tmp1[0]);$i++){ $varname = "goFonConferenceOption_".$tmp1[0][$i]; diff --git a/gosa-plugins/gofon/gofon/macro/class_gofonMacro.inc b/gosa-plugins/gofon/gofon/macro/class_gofonMacro.inc index 44987dde2..d9aa0b78d 100644 --- a/gosa-plugins/gofon/gofon/macro/class_gofonMacro.inc +++ b/gosa-plugins/gofon/gofon/macro/class_gofonMacro.inc @@ -271,7 +271,7 @@ class macro extends plugin " (context,exten,priority,app,appdata) ". " VALUES "; - $a_contentLines = split("\n",$this->goFonMacroContent); + $a_contentLines = preg_split("/\n/",$this->goFonMacroContent); foreach($a_contentLines as $i_linenum => $s_linestr){ /* Remove the 'exten => ' string in front of the macro content line @@ -293,7 +293,7 @@ class macro extends plugin * If there are more or less parts, abort. * The preg_replace exclude parameters from split .. */ - $tmp = split(",", $s_linestr,3); + $tmp = explode(",", $s_linestr,3); /* Check if there is an application given */ if(empty($tmp[1])){ diff --git a/gosa-plugins/gofon/gofon/macro/class_gofonMacroParameters.inc b/gosa-plugins/gofon/gofon/macro/class_gofonMacroParameters.inc index 210038f6f..566fecccf 100644 --- a/gosa-plugins/gofon/gofon/macro/class_gofonMacroParameters.inc +++ b/gosa-plugins/gofon/gofon/macro/class_gofonMacroParameters.inc @@ -82,7 +82,7 @@ class macroParameter extends plugin /* Load parametersettings*/ foreach($this->goFonMacroParameter as $para){ - $tmp = split("!",$para); + $tmp = explode("!",$para); $num = $tmp[0]; $tmp2[$num]['name'] = base64_decode($tmp[1]); $tmp2[$num]['type'] = $tmp[2]; diff --git a/gosa-plugins/gofon/gofon/phoneaccount/class_phoneAccount.inc b/gosa-plugins/gofon/gofon/phoneaccount/class_phoneAccount.inc index fc131d19b..bdebde886 100644 --- a/gosa-plugins/gofon/gofon/phoneaccount/class_phoneAccount.inc +++ b/gosa-plugins/gofon/gofon/phoneaccount/class_phoneAccount.inc @@ -247,7 +247,7 @@ class phoneAccount extends plugin foreach($attrs['goFonMacroParameter'] as $pkey=>$pval){ /* Split Data in readable values, by delimiter ! */ - $data = split("!",$attrs['goFonMacroParameter'][$pkey]); + $data = explode("!",$attrs['goFonMacroParameter'][$pkey]); /* Set all attrs */ $id = $data[0]; @@ -269,7 +269,7 @@ class phoneAccount extends plugin * If we have a macro selected, parse it and set values * in $this->macroarray[$this->macro]. */ - $tmp = split("!",$this->goFonMacro); + $tmp = explode("!",$this->goFonMacro); if(is_array($tmp)){ /* First value is the macroname */ @@ -289,7 +289,7 @@ class phoneAccount extends plugin foreach($tmp as $var){ /* Split this, so we have $varar[0] = parameterID $varar[1] = SelectedValue */ - $varar = split("#",$var); + $varar = explode("#",$var); /* Only insert if the parameter still exists */ if(isset($this->macroarray[$this->macro][$varar[0]])){ @@ -1008,7 +1008,7 @@ class phoneAccount extends plugin if(empty($this->macro)&&(!empty($this->goFonMacro))){ /* Go through already saved values, for a parameter */ - $tmp = split("!",$this->goFonMacro); + $tmp = explode("!",$this->goFonMacro); /* it is possible that nothing has been saved yet */ if(is_array($tmp)){ @@ -1030,7 +1030,7 @@ class phoneAccount extends plugin foreach($tmp as $var){ /* Split this, so we have $varar[0] = parameterID $varar[1] = SelectedValue */ - $varar = split("#",$var); + $varar = explode("#",$var); /* Only insert if the parameter still exists */ if(isset($this->macroarray[$this->macro][$varar[0]])){ @@ -1168,7 +1168,7 @@ class phoneAccount extends plugin case "combo": $str= "