summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a422f40)
raw | patch | inline | side by side (parent: a422f40)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 26 Jan 2010 09:22:13 +0000 (09:22 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 26 Jan 2010 09:22:13 +0000 (09:22 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15299 594d385d-05f5-0310-b6e9-bd551577e9d8
57 files changed:
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 7271ddc1c23177987fb6f0edf5f6b6476a113041..a827baaccd7f2c07d9e626142bba1a64f9dfae5f 100644 (file)
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 19fba7af31b6d2fae48eec60684bf7679b4ed42b..1726c72c7272aef658060713fe5a85d24ece043f 100644 (file)
/* 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"));
/* 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"));
index ce41bee46b2ee2c77e8707c60408751a93f82292..985dedda5d938c985bb919b9cbcd6f28fa311516 100644 (file)
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];
$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 c84b1a1ba1f364c494e3f77f85ccb3e31f35320e..fe9b8f33f63d7adfc5318399c2797f42aa375420 100644 (file)
} 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;
}
}
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 891141bf54bc4c502974ec4643640afad4217843..a8994c1eb95a3762e97d23e9906f5050222c6dd6 100644 (file)
foreach ($list as $value){
/* Set header */
- $sortpart= split(",", $value['dn']);
+ $sortpart= explode(",", $value['dn']);
$sortpart= array_reverse($sortpart);
$tmp= implode(",", $sortpart);
}
/* 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 99677700002c4edebec5fca7318c89edabdb7b71..ec5ce83c8d2ec963c6d31ad3a5815d534f0b4237 100644 (file)
*/
static function FlipIp($ip)
{
- $tmp = array_reverse(split("\.",$ip));
+ $tmp = array_reverse(explode(".",$ip));
$new = "";
foreach($tmp as $section){
$new .= $section.".";
/* Generate SOA entry
*/
if(isset($attrs['sOARecord'][0])){
- $tmp = split("\ ",$attrs['sOARecord'][0]) ;
+ $tmp = explode(" ",$attrs['sOARecord'][0]) ;
$tmp2 = array();
/* Assign soa vars */
$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();
}
static function getNameFromMix($zoneMix){
$ret = "";
if(!strstr($zoneMix, '/')) return($ret);
- $zoneIndex = split("/",$zoneMix);
+ $zoneIndex = explode("/",$zoneMix);
return($zoneIndex[1]);
}
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 d31bedd0e53a4be734c923e6ba03fa2fcec5f237..75024f308470711ff2e38e792bd4ffcd5c8c8e8c 100644 (file)
$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]);
/* 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 20d00699e4f2934d89df2c29e70b5d751f1a81a1..674ad057f05c912538576030ea35caabe9e05b5b 100644 (file)
/* Add a new Record in given object
*/
$tmp = preg_replace("/^.*_(.*)_.*$/","\\1",$name);
- $tmp2 = split("\|",$tmp);
+ $tmp2 = explode("|",$tmp);
/* Add new host entry
*/
/* Extract informations out of post name
*/
$tmp = preg_replace("/^.*_/","\\1",$name);
- $tmp2 = split("\|",$tmp);
+ $tmp2 = explode("|",$tmp);
if(count($tmp2) != 2) continue;
/* Extract informations out of post name
*/
$tmp = preg_replace("/^.*_/","\\1",$name);
- $tmp2 = split("\|",$tmp);
+ $tmp2 = explode("|",$tmp);
if(count($tmp2) != 2) continue;
index 698203dc0e6aba024ed3a583467a6444eec6d9bc..37a06c14fd4dcb5d9308ba3c1a523ba2431166de 100644 (file)
$sub_releases = array();
$source_dn = "";
- $tmp = split("\/",$source_release);
+ $tmp = explode("/",$source_release);
foreach($tmp as $part){
if(empty($part)){
continue;
if(preg_match("/^ou=/",$sourcedn)){
echo "<h3>"._("Processing")." <i>".LDAP::fix($destinationdn)."</i></h3>";
}else{
- $tmp = split(",",$sourcedn);
+ $tmp = explode(",",$sourcedn);
echo " <b>"._("Object").":</b> ";
$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 bd0dbf2378487cd145e811132d5a08bcccd36a6b..6791eaf12dbebedda38e8d8e40413fb9365f9415 100644 (file)
function load_from_string($str)
{
- $lines = split("\n",$str);
+ $lines = explode("\n",$str);
$this->template = array();
$post_name = 0;
$langcode = $this->language.".UTF-8";
$result= $this->render_string($data);
} else {
$choices= "";
- foreach (split(", ", $data['Choices']) as $choice){
+ foreach (explode(", ", $data['Choices']) as $choice){
$choices[]= $choice;
}
<input type='hidden' name='multi-".$post_name."' value='1'>
";
- $defs = split(", ",$data['Default']);
+ $defs = explode(", ",$data['Default']);
foreach($choices as $value){
if(in_array($value,$defs)){
$result.="\n<input name='".$post_name."-multi-".$value."' type='checkbox' value='".htmlentities($value)."' checked>".$value."<br>";
$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 f5e55d4fa8895403cdafce32fc63f53a513ba751..d0c041fd6ac6e4db8e6c57b4442c0d7f1b8e1482 100644 (file)
// 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;
// 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;
// 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;
// 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;
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;
}
// 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);
}
}
}
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 88fb15dc02268bb1c8cf4c00004457a2dd5380e3..bbfa30c33429b47b331af09abd09e5e89f3e132e 100644 (file)
$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";
$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";
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 275a4a12d026f649d5463797b7b9a115ef956821..9d83e2bb510af0e90310d3aad58bc938d2dde1ee 100644 (file)
}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);
// 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 ae642c3b9b249ce8613e4caeddb0e29fb0fc8975..197e1b2b28cd9591c7eb33e93bed4a994390f205 100644 (file)
}
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 e84d5f37f99b135b22107f28db26b4e4ed86a35b..a5adc2f1c65b6dbe3df9c1e0176be5ebb4387a8c 100644 (file)
*/
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];
}
$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 d92e5178ba23248087e8cdf2bfaed76fe5638642..018d8c750b975abaecefd17b58ccfc1c412fbe8b 100644 (file)
$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)){
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 b706bd4d91114f09b9245d58a530c74c175cd990..5887e932ec98863ab9913bd23d8f32cfc23086ae 100644 (file)
/* 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);
index 2e9e00a8711e15d76c6ebc814eea042f8bd46605..40c997c767e8378f8b81c71c26c294a2683db3dc 100644 (file)
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 9f819d48ff8b0953017986714cdc96a5b73362e5..835933f79a9617d484b2f48688242ebe11274544 100644 (file)
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 76ac003f7f88018511b0773256d813065387f017..3ac0e2257d92261f9e529183851860b777e61893 100644 (file)
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 d14029c267d86d23e3945cab2670cb34687f5709..3773637e0f4079ab251075b79bd2736d106f55d2 100644 (file)
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{
index 915fb06c028683c4eafb939ef297f812ed95968a..7cf0a027e2fd887c1991104ba7e07c49f8c16d4f 100644 (file)
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 2b8b15f5dd8efd854359f2814ad69ddfcdf0ae26..e47096fd32b3782c39e208712faca501967f784a 100644 (file)
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 5b23577d9eabf3d4d74bbe2d9403d9217823db5f..5a636be08f206391d354ba452ea3d9924147e5d9 100644 (file)
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 f06598c46ba714536da52fafe94a77938933039e..4a4d4001899b4ea25d5d15bba8559af32cca3d73 100644 (file)
$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();
}
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 89594ff5e02a9e65acb458472d716d9b4354b9c9..61e59d8cb179057d4ea0db8c031efcf5eaf78c20 100644 (file)
if(preg_match("/ /",$val)){
/* Generate list of new section names */
- $vals = split(" ",$val);
+ $vals = explode(" ",$val);
/* Add new entries */
foreach($vals as $entry){
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 cfa94b4d8b6b969ba73737b8d1fdb4f42f4d6f5a..dc5a16bd67b14f250d42c2ab43b67a7ffd8c3851 100644 (file)
* 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 44987dde2de9419c2349e650519972c5ef214dfb..d9aa0b78d73962435b0dab3811efde277f7ba5a7 100644 (file)
" (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
* 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 210038f6f9f5d0987d44144be9e5d40759eae9f6..566fecccf9120d63901a4c22a32e7d4b6a7badbd 100644 (file)
/* 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 fc131d19b11b3c40cb37dd08b2899e0b9dad13a6..bdebde886231784a85a9a1ac718f5aedf98b79d9 100644 (file)
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];
* 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 */
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]])){
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)){
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]])){
case "combo":
$str= "<select name='".$var."' ".$dis." >";
- foreach(split(":",$default) as $choice){
+ foreach(explode(":",$default) as $choice){
if($choosen==$choice){
$str.= "\n<option value='".$choice."' selected>".$choice." </option>";
}else{
diff --git a/gosa-plugins/goto/addons/goto/class_goto_import_file.inc b/gosa-plugins/goto/addons/goto/class_goto_import_file.inc
index 0b3338505931d32596e737930b50fd3c3ce8552b..7c328d788d6614b450c090fca57451076a5c8bac 100644 (file)
/* Some file checks
*/
- $lines = split("\n",$str);
+ $lines = preg_split("/\n/",$str);
if(empty($str) || !count($lines)){
msg_dialog::display(_("Import"), msgPool::incorrectUpload(_("file is empty")),ERROR_DIALOG);
return;
/* Load values from file
*/
- $fields = split(";",$line);
+ $fields = explode(";",$line);
$event = array();
foreach($this->csv_fields as $key => $val) {
$event[$val] = "";
diff --git a/gosa-plugins/goto/addons/goto/class_gotomasses.inc b/gosa-plugins/goto/addons/goto/class_gotomasses.inc
index 8efbd99df7aa53127a964377038de2bfbf3a87f6..ae0d9470f8833ff72431a6ce9b5fe9d72165ca9f 100644 (file)
// Check whether this is a periodical job or not.
$period = "";
if(isset($task['PERIODIC']) && !preg_match("/none/i",$task['PERIODIC'])){
- $tmp = split("_", $task['PERIODIC']);
+ $tmp = explode("_", $task['PERIODIC']);
if(count($tmp) == 2){
$period= $tmp[0]." "._($tmp[1]);
}
diff --git a/gosa-plugins/goto/addons/goto/events/class_DaemonEvent.inc b/gosa-plugins/goto/addons/goto/events/class_DaemonEvent.inc
index aa4995f4e59fb16326106dd8d1b47156b19655f5..15185ee73be555b859e8c75d7e6a0df692562244 100644 (file)
}
if(isset($data['PERIODIC']) && !preg_match("/none/i",$data['PERIODIC'])){
- $tmp = split("_",$data['PERIODIC']);
+ $tmp = explode("_",$data['PERIODIC']);
if(count($tmp) == 2){
$this->activate_periodical_job = TRUE;
$this->periodValue = $tmp[0];
diff --git a/gosa-plugins/goto/addons/goto/gotomasses.tpl b/gosa-plugins/goto/addons/goto/gotomasses.tpl
index 97b3eff012ff91b797af218141eb00fb728f3e10..b4476a444f9f2fd53c16f823b2de5f1d7dc0ca1a 100644 (file)
/* Get text and split by newline
*/
var text = xmlHttpObject.responseText;
- var data = text.split("\n");
+ var data = text.preg_split("/\n/");
/* Walk through progress images and check if the
progress status has changed
diff --git a/gosa-plugins/goto/admin/groups/apps/class_groupApplication.inc b/gosa-plugins/goto/admin/groups/apps/class_groupApplication.inc
index 9e5b60f79b0962d8426a6e8929d31e9a286c5d9f..a711a7df428cf9e326c4f966a9fc43ad69aa2347 100644 (file)
(ou=1.0.0,ou=halut,ou=apps ==> halue/1.0.0)
*/
$bb = preg_replace("/".preg_quote(get_ou('applicationRDN'), '/').".*/i","",$attrs['dn']);
- $parts = array_reverse(split("ou=",$bb));
+ $parts = array_reverse(explode("ou=",$bb));
$str ="";
foreach($parts as $key => $part){
$cur = &$this->a_Structure[0]['ENTRIES'];
$parent_id = $base['UNIQID'];
$sub_dn = preg_replace("/,".preg_quote($this->dn, '/')."$/","",$attrs['dn']);
- $sub_dn_array = split("\,",$sub_dn);
+ $sub_dn_array = explode(",",$sub_dn);
/* Walk through our menu structure array while we have found
the correct position where to add this object.
if(isset($attrs['gosaApplicationParameter'])){
for($p = 0 ; $p < $attrs['gosaApplicationParameter']['count'] ; $p ++){
if(preg_match("/:/",$attrs['gosaApplicationParameter'][$p])){
- $tmp = split(":",$attrs['gosaApplicationParameter'][$p]);
+ $tmp = explode(":",$attrs['gosaApplicationParameter'][$p]);
$data['PARAMETER'][$tmp[0]] = preg_replace('/^[^:]+:/', '', $attrs['gosaApplicationParameter'][$p]);
}elseif($attrs['gosaApplicationParameter'][$p] == "*separator*"){
$type = "SEPERATOR";
if(isset($app['gosaApplicationParameter'])){
for($i = 0 ; $i < $app['gosaApplicationParameter']['count'] ; $i++) {
$para = $app['gosaApplicationParameter'][$i];
- $tmp = split(":",$para);
+ $tmp = explode(":",$para);
$this->app_parameter[$tmp[0]] = $tmp[1];
}
}
diff --git a/gosa-plugins/goto/admin/mimetypes/class_mimetypeGeneric.inc b/gosa-plugins/goto/admin/mimetypes/class_mimetypeGeneric.inc
index 62d3ff86838edb883c9084e8368c3dd6437417e9..8a4aab7e4b2522834d67097c091727cf3b01a85f 100644 (file)
$tmp = array();
for($i = 0 ; $i < $this->attrs[$attr]['count'] ; $i ++){
$str = $this->attrs[$attr][$i];
- $tmp2= split("\|",$str);
+ $tmp2= explode("|",$str);
if(count($tmp2) == 2){
$name = $tmp2[0];
diff --git a/gosa-plugins/goto/admin/systems/goto/class_gotoLpdEnabled.inc b/gosa-plugins/goto/admin/systems/goto/class_gotoLpdEnabled.inc
index 5738c0ec48ef045182f95755912abe1dabfc2bfa..c327b2b7ac62eafb3612c43ba4c251e3fae85708 100644 (file)
}else{
foreach($data as $dat){
if(substr_count($dat,":") < 8) continue;
- list($s_Type,$s_Device,$i_Port,$s_Speed,$s_FlowControl,$s_Parity,$i_Bit,$s_WriteOnly,$s_Options) = split("\:",$dat);
+ list($s_Type,$s_Device,$i_Port,$s_Speed,$s_FlowControl,$s_Parity,$i_Bit,$s_WriteOnly,$s_Options) = explode(":",$dat);
$entry = array();
foreach($this->attributes as $attr){
$entry[$attr] = $$attr;
diff --git a/gosa-plugins/goto/admin/systems/goto/class_terminalService.inc b/gosa-plugins/goto/admin/systems/goto/class_terminalService.inc
index b78b35c71c56bab7b3aff6bcbbbef752d2550878..c99b83c49e4c13d105e4074e0a7f4129532a54c7 100644 (file)
$file = $this->config->get_cfg_value("resolutions");
if(is_readable($file)){
$str = file_get_contents($file);
- $lines = split("\n",$str);
+ $lines = preg_split("/\n/",$str);
foreach($lines as $line){
$line = trim($line);
if(!empty($line)){
if(file_exists(CONFIG_DIR."/keyboardLayouts")){
if(is_readable(CONFIG_DIR."/keyboardLayouts")){
$str = file_get_contents(CONFIG_DIR."/keyboardLayouts");
- $tmp = split("\n",$str);
+ $tmp = preg_split("/\n/",$str);
foreach($tmp as $entry){
if((!empty($entry)) && (!preg_match("/^#/",$entry))){
$entry = trim($entry);
- $tmp2 = split ("\:",$entry);
+ $tmp2 = explode(":",$entry);
$la = trim($tmp2[0]); // What would be saved to ldap
$da = trim($tmp2[1]); // This wis displayed in the listbox
$this->XKbLayouts [ $la] = $da;
diff --git a/gosa-plugins/goto/admin/systems/goto/class_terminalStartup.inc b/gosa-plugins/goto/admin/systems/goto/class_terminalStartup.inc
index 31c8ea97e1bebe6e7e03854f86f9750b7778f50c..15cd3bdfe762397aeb7844867d1c71e0a2bd3694 100644 (file)
unset($this->attrs['gotoShare']['count']);
foreach($this->attrs['gotoShare'] as $share){
$tmp = $tmp2 = array();
- $tmp = split("\|",$share);
+ $tmp = explode("|",$share);
$tmp2['server'] =$tmp[0];
$tmp2['name'] =$tmp[1];
$tmp2['mountPoint'] =$tmp[2];
/* prepare share settings */
$tmp = array();
foreach($this->gotoShares as $name => $settings){
- $tmp2 = split("\|",$name);
+ $tmp2 = explode("|",$name);
$name = $tmp2[0];
$tmp[] = $settings['server']."|".$name."|".$settings['mountPoint'];
}
diff --git a/gosa-plugins/goto/admin/systems/goto/class_workstationService.inc b/gosa-plugins/goto/admin/systems/goto/class_workstationService.inc
index 5b6329e6d6addc92bc10c91172e27c56a69eca86..9707d85370e53fe181e307d70c29d51209b607c0 100644 (file)
if(is_readable($file)){
$str = file_get_contents($file);
- $lines = split("\n",$str);
+ $lines = preg_split("/\n/",$str);
foreach($lines as $line){
$line = trim($line);
if(!empty($line)){
if(file_exists(CONFIG_DIR."/keyboardLayouts")){
if(is_readable(CONFIG_DIR."/keyboardLayouts")){
$str = file_get_contents(CONFIG_DIR."/keyboardLayouts");
- $tmp = split("\n",$str);
+ $tmp = preg_split("/\n/",$str);
foreach($tmp as $entry){
if((!empty($entry)) && (!preg_match("/^#/",$entry))){
$entry = trim($entry);
- $tmp2 = split ("\:",$entry);
+ $tmp2 = explode(":",$entry);
$la = trim($tmp2[0]); // What would be saved to ldap
$da = trim($tmp2[1]); // This wis displayed in the listbox
$this->XKbLayouts [ $la] = $da;
diff --git a/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc b/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc
index be726ecb4b9f7695ad93bc0b60c1eac33d431499..99ccc4ba640c8de212a84c235fa77b9fbf678539 100644 (file)
*/
$this->FAIclass =array();
if(isset($this->attrs['FAIclass'][0])){
- $tmp = split(" ",$this->attrs['FAIclass'][0]);
+ $tmp = explode(" ",$this->attrs['FAIclass'][0]);
$tmp2 =array();
foreach($tmp as $class){
unset($this->attrs['gotoShare']['count']);
foreach($this->attrs['gotoShare'] as $share){
$tmp = $tmp2 = array();
- $tmp = split("\|",$share);
+ $tmp = explode("|",$share);
$tmp2['server'] =$tmp[0];
$tmp2['name'] =$tmp[1];
$tmp2['mountPoint'] =$tmp[2];
break;
case 'FAIclass':
- $str = split(":",$attrs[$name][0]);
- $this->InheritedFAIclass = split("\ ",trim($str[0]));
+ $str = explode(":",$attrs[$name][0]);
+ $this->InheritedFAIclass = explode(" ",trim($str[0]));
$this->InheritedFAIrelease = trim($str[1]);
break;
/* prepare share settings */
$tmp = array();
foreach($this->gotoShares as $name => $settings){
- $tmp2= split("\|",$name);
+ $tmp2= explode("|",$name);
$name = $tmp2[0];
$tmp[] = $settings['server']."|".$name."|".$settings['mountPoint'];
}
*/
$lines= $this->GetHookElements();
foreach ($lines as $hline){
- $entries= split(";", $hline);
+ $entries= explode(";", $hline);
$server = $entries['0'];
$url = $entries['1'];
if (!empty($url)){
/* Split releases */
if (isset($entries[2])){
- $releases= split(",", $entries[2]);
+ $releases= explode(",", $entries[2]);
foreach ($releases as $release_data){
$release_c = preg_replace('/:.*$/', '', $release_data);
- $sections_c = split(':', preg_replace('/^[^:]+:([^|]+)|.*$/', '\1', $release_data));
- $classes_c = split('\|', preg_replace('/^[^|]+\|(.*)$/', '\1', $release_data));
+ $sections_c = explode(':', preg_replace('/^[^:]+:([^|]+)|.*$/', '\1', $release_data));
+ $classes_c = explode('|', preg_replace('/^[^|]+\|(.*)$/', '\1', $release_data));
if($release_c == $release){
$this->cache['SERVERS'][$url][$release_c]=$release_c;
}elseif(empty($res2)){
msg_dialog::display(_("Configuration error"), _("'repositoryBranchHook' returned no result!"), ERROR_DIALOG);
}else{
- $tmp = split("\n",$res);
+ $tmp = preg_split("/\n/",$res);
foreach($tmp as $line){
if(empty($line)) continue;
$ret[]= $line;
function dn_to_release_name($dn)
{
$relevant = preg_replace("/,".preg_quote(get_ou("faiBaseRDN"), '/').".*$/i","",$dn);
- $parts = array_reverse(split("\,",$relevant));
+ $parts = array_reverse(explode(",",$relevant));
$str ="";
foreach($parts as $part){
$str .= preg_replace("/^ou=/","",$part)."/";
diff --git a/gosa-plugins/goto/admin/systems/services/nfs/class_servNfs.inc b/gosa-plugins/goto/admin/systems/services/nfs/class_servNfs.inc
index 105d9565db00261eca8d23d45608b98ad50171e0..e8203e52bbcb48ff8750fc2e89d7f25bb8a9c897 100644 (file)
/* Skip comments */
if(!preg_match("/^#/",$str)){
- $arr = split("\=",$str);
+ $arr = explode("=",$str);
if(count($arr)==2){
$this->charsets[$arr[0]]=$arr[1];
}
if($entry){
list($this->name, $this->description, $this->type, $this->charset,
- $this->path, $this->option, $this->volume)= split("\|",$entry."|");
+ $this->path, $this->option, $this->volume)= explode("|",$entry."|");
$this->is_edit = true;
}else{
if ($this->create_mount_init) {
$smarty->assign("mount_checked", "checked");
} else {
- $tmp = split(",", $this->dn);
+ $tmp = explode(",", $this->dn);
$clip = $tmp[0] . ",".get_ou('serverRDN');
$mountsdn = "cn=mounts," . substr($this->dn, strlen($clip));
switch ($this->type) {
continue;
if(isset($test['goExportEntry'])){
foreach($test['goExportEntry'] as $entry){
- $tmp = split("\|",$entry);
+ $tmp = explode("|",$entry);
if($tmp[0] == $this->name){
$message[]= msgPool::duplicated(_("Name"));
}
diff --git a/gosa-plugins/goto/admin/systems/services/shares/class_goShareServer.inc b/gosa-plugins/goto/admin/systems/services/shares/class_goShareServer.inc
index c85f79c9321f31f2d02b7feadc7f8fbf3964bce2..4c41ba6a42108298333843a100431d39dbb024bd 100644 (file)
$tellSmarty= array();
ksort($this->goExportEntryList);
foreach($this->goExportEntryList as $name=>$values){
- $tmp = split("\|",$values);
+ $tmp = explode("|",$values);
$tellSmarty[$name] = $tmp[0]." ".$tmp[4]." (".$tmp[2].")";
}
$smarty->assign("goExportEntry",array_keys($tellSmarty));
function get_share_type($share)
{
- $tmp = split("\|", $share);
+ $tmp = explode("|", $share);
return $tmp[2];
}
function returnMountEntry($entry)
{
- $item = split("\|", $entry);
+ $item = explode("|", $entry);
$name = $item[0];
$description = $item[1];
$type = $item[2];
diff --git a/gosa-plugins/goto/personal/environment/class_environment.inc b/gosa-plugins/goto/personal/environment/class_environment.inc
index c7befa3ce85d78d4f2bcf1bae7727005be865175..b72ced3ce70b2584673ccef8f447eb45cba48c2d 100644 (file)
unset($this->attrs['gotoLogonScript']['count']);
foreach($this->attrs['gotoLogonScript'] as $device){
$tmp = $tmp2 = array();
- $tmp = split("\|",$device);
+ $tmp = explode("|",$device);
$tmp2['LogonName'] = $tmp[0];
$tmp2['LogonPriority'] = $tmp[2];
if(preg_match("/O/i",$tmp[1])){
unset($this->attrs['gotoShare']['count']);
foreach($this->attrs['gotoShare'] as $share){
$tmp = $tmp2 = array();
- $tmp = split("\|",$share);
+ $tmp = explode("|",$share);
$tmp2['server'] =$tmp[0];
$tmp2['name'] =$tmp[1];
if(is_readable($file)){
$str = file_get_contents($file);
- $lines = split("\n",$str);
+ $lines = preg_split("/\n/",$str);
foreach($lines as $line){
$line = trim($line);
if(!empty($line)){
unset($this->multi_attrs_all['gotoShare']['count']);
foreach($this->multi_attrs_all['gotoShare'] as $share){
$tmp = $tmp2 = array();
- $tmp = split("\|",$share);
+ $tmp = explode("|",$share);
$tmp2['server'] =$tmp[0];
$tmp2['name'] =$tmp[1];
unset($this->multi_attrs['gotoShare']['count']);
foreach($this->multi_attrs['gotoShare'] as $share){
$tmp = $tmp2 = array();
- $tmp = split("\|",$share);
+ $tmp = explode("|",$share);
$tmp2['server'] =$tmp[0];
$tmp2['name'] =$tmp[1];
unset($this->multi_attrs_all['gotoLogonScript']['count']);
foreach($this->multi_attrs_all['gotoLogonScript'] as $device){
$tmp = $tmp2 = array();
- $tmp = split("\|",$device);
+ $tmp = explode("|",$device);
$tmp2['LogonName'] = $tmp[0];
$tmp2['LogonPriority'] = $tmp[2];
if(preg_match("/O/i",$tmp[1])){
unset($this->multi_attrs['gotoLogonScript']['count']);
foreach($this->multi_attrs['gotoLogonScript'] as $device){
$tmp = $tmp2 = array();
- $tmp = split("\|",$device);
+ $tmp = explode("|",$device);
$tmp2['LogonName'] = $tmp[0];
$tmp2['LogonPriority'] = $tmp[2];
if(preg_match("/O/i",$tmp[1])){
diff --git a/gosa-plugins/kolab/personal/mail/kolab/class_mail-methods-kolab.inc b/gosa-plugins/kolab/personal/mail/kolab/class_mail-methods-kolab.inc
index d0374ee4f16901ca68556beda8d5e6b330ba3128..d70d1d62816f04310c70596067a2eb76b927fc68 100644 (file)
if($this->enableFolderTypes && isset($this->parent->attrs['kolabFolderType'][0])){
$type = $this->parent->attrs['kolabFolderType'][0];
if(strpos($type,".")){
- list($cat,$sub) = split("\.",$this->parent->attrs['kolabFolderType'][0]);
+ list($cat,$sub) = explode(".",$this->parent->attrs['kolabFolderType'][0]);
}else{
$sub = "";
$cat = $type;
diff --git a/gosa-plugins/ldapmanager/addons/ldapmanager/class_csvimport.inc b/gosa-plugins/ldapmanager/addons/ldapmanager/class_csvimport.inc
index aba310f90cb213ff46de04bb671160d7948d4905..4fac56880775c94670261cc793d1dab2d17ebe2e 100644 (file)
$str .= fread($handle,1024);
}
- $lines = split("\n",$str);
+ $lines = preg_split("/\n/",$str);
$anz = 0;
$rest = 0;
$data = array();
}
$line= str_replace ("\t","",$line);
- $cells = split(",",$line ) ;
+ $cells = explode(",",$line ) ;
if(count($cells)> $anz ){
$anz = count($cells);
$line= str_replace ("\t" ,"" ,$line);
/* get all elements */
- $cells = split(",",$line ) ;
+ $cells = explode(",",$line ) ;
/* attach all elements to data array */
if(is_array($cells))
diff --git a/gosa-plugins/mail/admin/systems/services/mail/class_goMailServer.inc b/gosa-plugins/mail/admin/systems/services/mail/class_goMailServer.inc
index 210d8cfddc45175b56ed7944254a56fcfb345ee4..45dcee06c30a09c0d736273ca1a36554a7993586 100644 (file)
$file = $this->config->get_cfg_value($file);
if((isset($file)) && is_readable($file)){
$tmp = file_get_contents($file);
- $tmp2= split("\n",$tmp);
+ $tmp2= preg_split("/\n/",$tmp);
foreach($tmp2 as $entry){
if(empty($entry)) continue;
if(preg_match("/:/",$entry)){
- $tmp3 = split(":",$entry);
+ $tmp3 = explode(":",$entry);
$r = $this->$var;
$r[$tmp3[0]]=$tmp3[1];
$this->$var = $r;
$this->postfixMyNetworks = array();
$tmp = array();
if(isset($this->attrs['postfixMyNetworks'][0])){
- $tmp = split(",",$this->attrs['postfixMyNetworks'][0]);
+ $tmp = explode(",",$this->attrs['postfixMyNetworks'][0]);
foreach($tmp as $str){
if(!empty($str)){
$this->postfixMyNetworks[base64_encode($str)] = $str;
if((!empty($src)) && (!empty($dst))){
if(preg_match("/:/",$dst)){
- $tmp = split("\:",$dst);
+ $tmp = explode(":",$dst);
$port = trim($tmp[1]);
$ip = trim($tmp[0]);
diff --git a/gosa-plugins/mail/personal/mail/class_mail-methods.inc b/gosa-plugins/mail/personal/mail/class_mail-methods.inc
index 30d31cecf675c0d6f7eeafb6af647885ba03801f..a17d77e4a0462d88de166d22461705d524590a50 100644 (file)
$domain = $mailpart = "";
$mail = $this->parent->mail;
if(preg_match("/\@/",$mail)){
- list($mailpart,$domain) = split("\@",$mail);
+ list($mailpart,$domain) = explode("@",$mail);
}
/* Create account_id
$domain = $mailpart = "";
$mail = $this->parent->mail;
if(preg_match("/\@/",$mail)){
- list($mailpart,$domain) = split("\@",$mail);
+ list($mailpart,$domain) = explode("@",$mail);
}
/* Create account_id
}
if(preg_match("/\@/",$acc_id)){
- list($mail,$domain) = split("\@",$acc_id);
+ list($mail,$domain) = explode("@",$acc_id);
$str = trim($mail . $folder . "@" . $domain);
}else{
$str = trim($acc_id . $folder);
diff --git a/gosa-plugins/mail/personal/mail/class_mailAccount.inc b/gosa-plugins/mail/personal/mail/class_mailAccount.inc
index 7972652379c962ac629f30ff38d15f8fcc87f0c5..2462014f77ea7f21ed6e3a02627628db39e66eed 100644 (file)
unset($this->attrs['gosaVacationStop']);
} else {
/* Adapt values to be timestamps */
- list($day, $month, $year)= split('\.', $this->gosaVacationStart);
+ list($day, $month, $year)= explode('.', $this->gosaVacationStart);
$this->attrs['gosaVacationStart']= mktime(0,0,0,$month, $day, $year);
- list($day, $month, $year)= split('\.', $this->gosaVacationStop);
+ list($day, $month, $year)= explode('.', $this->gosaVacationStop);
$this->attrs['gosaVacationStop']= mktime(0,0,0,$month, $day, $year);
}
#TODO: take care of date format
if ($state) {
- list($day, $month, $year)= split('\.', $this->gosaVacationStart);
+ list($day, $month, $year)= explode('.', $this->gosaVacationStart);
$start= mktime(0,0,0,$month, $day, $year);
- list($day, $month, $year)= split('\.', $this->gosaVacationStop);
+ list($day, $month, $year)= explode('.', $this->gosaVacationStop);
$stop= mktime(0,0,0,$month, $day, $year);
if($start > $stop){
$message[]= msgPool::invalid(_("Vacation interval"));
#TODO: take care of date format
if ($state) {
- list($day, $month, $year)= split('\.', $this->gosaVacationStart);
+ list($day, $month, $year)= explode('.', $this->gosaVacationStart);
$start= mktime(0,0,0,$month, $day, $year);
- list($day, $month, $year)= split('\.', $this->gosaVacationStop);
+ list($day, $month, $year)= explode('.', $this->gosaVacationStop);
$stop= mktime(0,0,0,$month, $day, $year);
if($start > $stop){
$message[]= msgPool::invalid(_("Vacation interval"));
diff --git a/gosa-plugins/mail/personal/mail/sieve/class_My_Tree.inc b/gosa-plugins/mail/personal/mail/sieve/class_My_Tree.inc
index b1b061e39a95a707d5c508b9a39f55e2fa9bb9e5..0f18cecc74f9638480f0f31b6466f6ed4ae3085e 100644 (file)
}
$tmp2 = $part->get_sieve_script_part();
- $tmp3 = split("\n",$tmp2);
+ $tmp3 = preg_split("/\n/",$tmp2);
foreach($tmp3 as $str){
$str2 = trim($str);
diff --git a/gosa-plugins/mail/personal/mail/sieve/class_sieve.inc b/gosa-plugins/mail/personal/mail/sieve/class_sieve.inc
index ed3eafd096e73338f13f5c8be5a165f9d7436fe4..22b02e48aa231a0dd0e09e8905f69ca3d4f581a1 100644 (file)
unset($this->error_raw);
$this->line=fgets($this->fp,1024);
- $this->token = split(" ", $this->line, 2);
+ $this->token = explode(" ", $this->line, 2);
if($this->token[0] == "NO"){
/* we need to try and extract the error code from here. There are two possibilites: one, that it will take the form of:
NO ("yyyyy") "zzzzzzz" or, two, NO {yyyyy} "zzzzzzzzzzz" */
$this->x = 0;
- list($this->ltoken, $this->mtoken, $this->rtoken) = split(" ", $this->line." ", 3);
+ list($this->ltoken, $this->mtoken, $this->rtoken) = explode(" ", $this->line." ", 3);
if($this->mtoken[0] == "{"){
while($this->mtoken[$this->x] != "}" or $this->err_len < 1){
$this->err_len = substr($this->mtoken, 1, $this->x);
$this->cap_type="auth";
}
- $this->modules = split(" ", $this->item[1]);
+ $this->modules = explode(" ", $this->item[1]);
if(is_array($this->modules)){
foreach($this->modules as $this->module)
$this->capabilities[$this->cap_type][$this->module]=true;
$this->modules = substr($this->item[1], strpos($this->item[1], "{"),strlen($this->item[1])-1);
//then split again at the ", " stuff.
- $this->modules = split($this->modules, ", ");
+ $this->modules = explode(", ", $this->modules);
//fill up our $this->modules property
if(is_array($this->modules)){
}
/* Loop through each allowed authentication type and see if the server allows the type */
- foreach(split(" ",$this->auth_types) as $auth_type)
+ foreach(explode(" ",$this->auth_types) as $auth_type)
{
if (isset($this->capabilities["auth"][$auth_type]))
{
diff --git a/gosa-plugins/mail/personal/mail/sieve/class_sieveElement_If.inc b/gosa-plugins/mail/personal/mail/sieve/class_sieveElement_If.inc
index 8098eaf6a795fdb9984aae733b0f5fce3abda05a..19dc0fb4fcde584ec4c4e06c3919127203454c1f 100644 (file)
$vls = stripslashes($_POST['keys_'.$element_id]);
$tmp = array();
- $tmp2 = split(",",$vls);
+ $tmp2 = explode(",",$vls);
foreach($tmp2 as $val){
$tmp[] = trim($val);
$vls = stripslashes($_POST['values_'.$element_id]);
$tmp = array();
- $tmp2 = split(",",$vls);
+ $tmp2 = explode(",",$vls);
foreach($tmp2 as $val){
$tmp[] = trim($val);
if(preg_match("/\"/",$val)){
$vls = stripslashes($_POST['Values_'.$element_id]);
$tmp = array();
- $tmp2 = split(",",$vls);
+ $tmp2 = explode(",",$vls);
foreach($tmp2 as $val){
$tmp[] = "\"".trim(preg_replace("/\"/","",$val))."\"";
}
diff --git a/gosa-plugins/mail/personal/mail/sieve/class_sieveElement_Require.inc b/gosa-plugins/mail/personal/mail/sieve/class_sieveElement_Require.inc
index a9b68903439c090bafe1459c80d575df01d269b3..bd8fe9ae9cb43a992fa0809bdf45fbd1daad8207 100644 (file)
$vls = stripslashes($_POST['require_'.$this->object_id]);
$tmp = array();
- $tmp2 = split(",",$vls);
+ $tmp2 = explode(",",$vls);
foreach($tmp2 as $val){
$val = trim($val);
diff --git a/gosa-plugins/mail/personal/mail/sieve/class_sieveElement_Vacation.inc b/gosa-plugins/mail/personal/mail/sieve/class_sieveElement_Vacation.inc
index 1af166e9d9ed73b34fbac46bb496fbdeab0a003e..a8ba251c6946cae21d13cca0b88db3f48c1b7b16 100644 (file)
if(isset($_POST['vacation_receiver_'.$this->object_id])){
$vr = stripslashes ($_POST['vacation_receiver_'.$this->object_id]);
$tmp = array();
- $tmp2 = split(",",$vr);
+ $tmp2 = explode(",",$vr);
foreach($tmp2 as $val){
$ad = trim($val);
if(!empty($ad)){
diff --git a/gosa-plugins/netatalk/personal/netatalk/class_netatalk.inc b/gosa-plugins/netatalk/personal/netatalk/class_netatalk.inc
index 4a74b7451a0cc8872d4fbedc9c5ec04adf146b60..d828ecf0dbb129ce2510d0b0e0f94dfe9450e1f7 100644 (file)
$ldap->search ("(&(objectClass=mount)(|(mountType=url)(mountType=nfs))(cn=*))");
while ($attrs = $ldap->fetch()){
- $tmp = split(":", $attrs["cn"][0]);
+ $tmp = explode(":", $attrs["cn"][0]);
$host = trim($tmp[0]);
$dir = trim($tmp[1]);
$mountType = trim($attrs["mountType"][0]);
diff --git a/gosa-plugins/rsyslog/addons/rsyslog/class_rsyslog.inc b/gosa-plugins/rsyslog/addons/rsyslog/class_rsyslog.inc
index 9596f934105f3a58f9a89a4031341f07c04b928f..6d469d22292539c4547976eaf9839d218318f386 100644 (file)
function time2local($str)
{
- list($date, $time)= split(" ", $str);
- list($y, $m, $d)= split("-", $date);
+ list($date, $time)= explode(" ", $str);
+ list($y, $m, $d)= explode("-", $date);
return "$d.$m.$y $time";
}
diff --git a/gosa-plugins/samba/personal/samba/class_sambaAccount.inc b/gosa-plugins/samba/personal/samba/class_sambaAccount.inc
index 757def0ebcf42ed7695896aa0cda1f87834462de..5ce50b655bc252246f643c7c24449ac090323af0 100644 (file)
}
}
}else{
- foreach(split(',', $this->sambaUserWorkstations) as $ws){
+ foreach(explode(',', $this->sambaUserWorkstations) as $ws){
$exclude.= "(cn=$ws$)";
}
}
/* Fill sambaUserWorkstations */
- $ws= split(",", $this->sambaUserWorkstations);
+ $ws= explode(",", $this->sambaUserWorkstations);
sort($ws);
/* Tidy checks for empty option, and smarty will produce one if array[0]="" */
if ($this->attrs['sambaPwdMustChange'] == ""){
$this->attrs['sambaPwdMustChange']= 0;
} else {
- list($day, $month, $year)= split('\.', $this->sambaPwdMustChange);
+ list($day, $month, $year)= explode('.', $this->sambaPwdMustChange);
$this->attrs['sambaPwdMustChange']= mktime(0,0,0,$month, $day, $year);
}
} else {
if ($this->attrs['sambaKickoffTime'] == ""){
$this->attrs['sambaKickoffTime']= 2147483647;
} else {
- list($day, $month, $year)= split('\.', $this->sambaKickoffTime);
+ list($day, $month, $year)= explode('.', $this->sambaKickoffTime);
$this->attrs['sambaKickoffTime']= mktime(0,0,0,$month, $day, $year);
}
} else {
* Those workstations will be displayed in light grey.
*/
$tmp2 = array("count" => 0);
- $tmp = split(",", $this->sambaUserWorkstations);
+ $tmp = explode(",", $this->sambaUserWorkstations);
foreach($tmp as $station){
$station = trim($station);
if(!empty($station)){
/* Prepare current settings to be merged */
if(isset($this->sambaUserWorkstations)){
- $ttmp = split(",",$this->sambaUserWorkstations);
+ $ttmp = explode(",",$this->sambaUserWorkstations);
foreach($ttmp as $station){
$station = trim($station);
if(!empty($station)){