Rajout du dossier core + MAJ .gitignore

This commit is contained in:
2019-11-21 12:48:42 +01:00
parent f4aabcb9b1
commit 459f8966b0
10448 changed files with 1835600 additions and 1 deletions

View File

@@ -0,0 +1,25 @@
<?php
namespace Thelia\Model;
use Propel\Runtime\ActiveQuery\Criteria;
use Propel\Runtime\Connection\ConnectionInterface;
use Thelia\Model\Base\RewritingUrl as BaseRewritingUrl;
class RewritingUrl extends BaseRewritingUrl
{
public function postInsert(ConnectionInterface $con = null)
{
if (null !== $this->getRedirected()) {
//check if rewriting url alredy exists and put redirect to the new one
RewritingUrlQuery::create()
->filterByView($this->getView())
->filterByViewId($this->getViewId())
->filterByViewLocale($this->getViewLocale())
->filterByRedirected($this->getId(), Criteria::NOT_IN)
->update(array(
"Redirected" => $this->getId()
));
}
}
}