Skip to content
Snippets Groups Projects
Commit e10c99f4 authored by Mark's avatar Mark
Browse files

update the url to the latest one used in the manager

FIX for FS#2463 <https://bugs.dokuwiki.org/index.php?do=details&task_id=2463>
parent d836931d
No related branches found
No related tags found
No related merge requests found
......@@ -141,9 +141,18 @@ class ap_manage {
break;
case 'update' :
$url = $data[0];
$date = date('r');
if (!$fp = @fopen($file, 'a')) return;
fwrite($fp, "updated=$date\n");
if (!$fp = @fopen($file, 'r+')) return;
$buffer = "";
while (($line = fgets($fp)) !== false) {
$urlFound = strpos($line,"url");
if($urlFound !== false) $line="url=$url\n";
$buffer .= $line;
}
$buffer .= "updated=$date\n";
fseek($fp, 0);
fwrite($fp, $buffer);
fclose($fp);
break;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment