886
$postcontent = preg_replace('#(<a[^>]+href="[^>]+artefact/file/download\.php\?file=\d+)#', '\1&view=' . $view_id , $postcontent);
887
$postcontent = preg_replace('#(<img[^>]+src="[^>]+artefact/file/download\.php\?file=\d+)#', '\1&view=' . $view_id, $postcontent);
888
$postcontent = preg_replace('#(<img[^>]+src="([^>]+artefact/file/download\.php\?file=\d+&view=\d+)"[^>]*>)#', '<a href="\2">\1</a>', $postcontent);
884
893
public static function get_links($id) {
885
894
$wwwroot = get_config('wwwroot');