X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=functions%2Fabook_local_file.php;h=26588d117801eeea8cae662b9c7f49d72f26384b;hb=eeb44e402b11bd6d31865c963bbca5efab9b6278;hp=7699c74eb861dd6569d8f388a26efff9631bd8dc;hpb=146e0c45c0e39b83611399805b1f7f1489a53b97;p=squirrelmail.git diff --git a/functions/abook_local_file.php b/functions/abook_local_file.php index 7699c74e..26588d11 100644 --- a/functions/abook_local_file.php +++ b/functions/abook_local_file.php @@ -125,7 +125,7 @@ // Overwrite the file with data from $rows // NOTE! Previous locks are broken by this function - function overwrite($rows) { + function overwrite(&$rows) { $newfh = @fopen($this->filename, 'w'); if(!$newfh) return $this->set_error("$file: " . _("Open failed")); @@ -151,8 +151,8 @@ // Make regexp from glob'ed expression // May want to quote other special characters like (, ), -, [, ], etc. - $expr = ereg_replace('\\?', '.', $expr); - $expr = ereg_replace('\\*', '.*', $expr); + $expr = str_replace('?', '.', $expr); + $expr = str_replace('*', '.*', $expr); $res = array(); if(!$this->open()) @@ -286,7 +286,7 @@ } // Write data back - if(!$this->overwrite(&$rows)) { + if(!$this->overwrite($rows)) { $this->unlock(); return false; } @@ -330,7 +330,7 @@ } // Write data back - if(!$this->overwrite(&$rows)) { + if(!$this->overwrite($rows)) { $this->unlock(); return false; }