Commit 9dbae25f authored by Shakarim Sapa's avatar Shakarim Sapa

- Fix

parent a3444914
...@@ -47,6 +47,8 @@ class ReplaceController extends Controller ...@@ -47,6 +47,8 @@ class ReplaceController extends Controller
{ {
foreach($data as $i=>$item) foreach($data as $i=>$item)
{ {
if ($item->text!='')
{
// $item->text = str_replace('http://task-on.com/', 'https://task-on.com/', $item->text); // $item->text = str_replace('http://task-on.com/', 'https://task-on.com/', $item->text);
$item->text = str_replace('https://task-on.com/', '/', $item->text); $item->text = str_replace('https://task-on.com/', '/', $item->text);
if (!$item->save()) if (!$item->save())
...@@ -55,6 +57,7 @@ class ReplaceController extends Controller ...@@ -55,6 +57,7 @@ class ReplaceController extends Controller
} }
echo ($i+1)." of ".count($data)." successfully updated\n"; echo ($i+1)." of ".count($data)." successfully updated\n";
} }
}
$transaction->commit(); $transaction->commit();
} }
catch(\Exception $e) catch(\Exception $e)
......
Markdown is supported
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