Skip to content
Snippets Groups Projects
Commit 59a32288 authored by Laurent's avatar Laurent
Browse files

add script to clean articles url

parent 1c93ed00
Branches
Tags
4 merge requests!258Dev/13872 Orphee Allow Hold Available Items,!180Master,!137Master,!127Hotline 6.43
<?php
require('console.php');
$search = 'http://web.afi-sa.net';
$replace = '';
$articles = Class_Article::findAllBy(['where' => 'concat(description,contenu) like "%'.$search.'%"']);
foreach ($articles as $art) {
$art
->setDescription(str_replace($search, $replace, $art->getDescription()))
->setContenu(str_replace($search, $replace, $art->getContenu()))
->save();
}
?>
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment