summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b9d3f22)
raw | patch | inline | side by side (parent: b9d3f22)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 3 Nov 2008 13:22:02 +0000 (13:22 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 3 Nov 2008 13:22:02 +0000 (13:22 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12872 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_ldap.inc | patch | blob | history | |
gosa-core/include/class_plugin.inc | patch | blob | history | |
gosa-core/include/functions_helpviewer.inc | patch | blob | history |
index 8aa793cf1125952f874194a2b039c73393ce72ad..c7fa31f98107ead05b1d608a7788445adb442777 100644 (file)
requests. I.e. member=.... */
static function prepare4filter($dn)
{
- return normalizeLdap(preg_replace('/\\\\/', '\\\\\\', LDAP::fix($dn)));
+ return normalizeLdap(str_replace('\\\\', '\\\\\\', LDAP::fix($dn)));
}
index 4796f86ec06f99da9e6e796a1a5e240568a79c36..dee53fbb0e430cf55c139e40fba865d2404c849c 100644 (file)
/* Additional attributes */
foreach ($tmp as $name => $len){
$value = $add_attrs[$name];
- $command= preg_replace("/%$name/", "$value", $command);
+ $command= str_replace("%$name", "$value", $command);
}
if (check_command($command)){
/* Additional attributes */
foreach ($tmp as $name => $len){
$value = $add_attrs[$name];
- $command= preg_replace("/%$name/", "$value", $command);
+ $command= str_replace("%$name", "$value", $command);
}
if (check_command($command)){
/* Additional attributes */
foreach ($tmp as $name => $len){
$value = $add_attrs[$name];
- $command= preg_replace("/%$name/", "$value", $command);
+ $command= str_replace("%$name", "$value", $command);
}
if (check_command($command)){
* change \2C to , again, else this entry can't be saved ...
*/
if((isset($new['ou'])) &&( preg_match("/\\,/",$new['ou']))){
- $new['ou'] = preg_replace("/\\\\,/",",",$new['ou']);
+ $new['ou'] = str_replace("\\\\,",",",$new['ou']);
}
/* Save copy */
/* Create object */
#$data = preg_replace('/^dn:.*\n/', '', $ldap->gen_ldif($this->dn,"(!(objectClass=gosaDepartment))"));
$data = $ldap->gen_ldif($this->dn,"(&(!(objectClass=gosaDepartment))(!(objectClass=FAIclass)))");
- $newName = preg_replace("/\./", "", $sec."-".$usec);
+ $newName = str_replace(".", "", $sec."-".$usec);
$target= array();
$target['objectClass'] = array("top", "gosaSnapshotObject");
$target['gosaSnapshotData'] = gzcompress($data, 6);
$ldap_to->cat($new_dn);
while($ldap_to->count()){
$ldap_to->cat($new_dn);
- $newName = preg_replace("/\./", "", $sec."-".($usec++));
+ $newName = str_replace(".", "", $sec."-".($usec++));
$new_dn = "gosaSnapshotTimestamp=".$newName.",".$new_base;
$target['gosaSnapshotTimestamp'] = $newName;
}
$this->parent = $parent;
foreach($_POST as $name => $value){
+ $entry = base64_decode(preg_replace("/_[xy]$/","",$name));
/* Create a new snapshot, display a dialog */
if(preg_match("/^CreateSnapShotDialog_/",$name) && $once){
$once = false;
- $entry = preg_replace("/^CreateSnapShotDialog_/","",$name);
- $entry = base64_decode(preg_replace("/_[xy]$/","",$entry));
+ $entry = preg_replace("/^CreateSnapShotDialog_/","",$entry);
if(!empty($entry) && $ui->allow_snapshot_create($entry,$this->parent->acl_module)){
$this->snapDialog = new SnapShotDialog($this->config,$entry,$this);
/* Restore a snapshot, display a dialog with all snapshots of the current object */
if(preg_match("/^RestoreSnapShotDialog_/",$name) && $once){
$once = false;
- $entry = preg_replace("/^RestoreSnapShotDialog_/","",$name);
- $entry = base64_decode(preg_replace("/_[xy]$/","",$entry));
+ $entry = preg_replace("/^RestoreSnapShotDialog_/","",$entry);
if(!empty($entry) && $ui->allow_snapshot_restore($entry,$this->parent->acl_module)){
$this->snapDialog = new SnapShotDialog($this->config,$entry,$this);
$this->snapDialog->display_restore_dialog = true;
/* Restore selected snapshot */
if(preg_match("/^RestoreSnapShot_/",$name) && $once){
$once = false;
- $entry = preg_replace("/^RestoreSnapShot_/","",$name);
- $entry = base64_decode(trim(preg_replace("/_[xy]$/","",$entry)));
+ $entry = preg_replace("/^RestoreSnapShot_/","",$entry);
if(!empty($entry) && $ui->allow_snapshot_restore($entry,$this->parent->acl_module)){
$this->restore_snapshot($entry);
$this->snapDialog = NULL;
diff --git a/gosa-core/include/functions_helpviewer.inc b/gosa-core/include/functions_helpviewer.inc
index 947489171cfa35dc3889781058b96a1d6ddb2d83..1c282794d9f475c0f055ca83a71448273904b09d 100644 (file)
function linkwrapper($str,$link)
{
$str = preg_replace("/HREF=\"http/i","target=\"_blank\" href=\"http",$str);
- $str = preg_replace("/HREF=\"/","href=\"".$link."?pg=",$str);
- $str=str_replace("HREF=\"","href=\"".$link."?pg=",$str);
+ $str = str_replace("HREF=\"","href=\"".$link."?pg=",$str);
return($str);
}