Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Commit

Permalink
Restore basic entities before auto-generating an alias (see #3767)
Browse files Browse the repository at this point in the history
  • Loading branch information
leofeyer committed Jan 6, 2012
1 parent a14d0a5 commit 21de1c2
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 7 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Expand Up @@ -4,6 +4,9 @@ Contao Open Source CMS Changelog
Version 2.11.0 (XXXX-XX-XX)
---------------------------

### Fixed
Restore basic entities before auto-generating an alias (see #3767).

### Improved
Remove a page from the search index if it does not exist anymore (see #3761).

Expand Down
2 changes: 1 addition & 1 deletion system/modules/backend/dca/tl_article.php
Expand Up @@ -510,7 +510,7 @@ public function generateAlias($varValue, DataContainer $dc)
if ($varValue == '')
{
$autoAlias = true;
$varValue = standardize($dc->activeRecord->title);
$varValue = standardize($this->restoreBasicEntities($dc->activeRecord->title));
}

$objAlias = $this->Database->prepare("SELECT id FROM tl_article WHERE id=? OR alias=?")
Expand Down
2 changes: 1 addition & 1 deletion system/modules/backend/dca/tl_form.php
Expand Up @@ -420,7 +420,7 @@ public function generateAlias($varValue, DataContainer $dc)
if ($varValue == '')
{
$autoAlias = true;
$varValue = standardize($dc->activeRecord->title);
$varValue = standardize($this->restoreBasicEntities($dc->activeRecord->title));
}

$objAlias = $this->Database->prepare("SELECT id FROM tl_form WHERE id=? OR alias=?")
Expand Down
2 changes: 1 addition & 1 deletion system/modules/backend/dca/tl_page.php
Expand Up @@ -956,7 +956,7 @@ public function generateAlias($varValue, DataContainer $dc)
if ($varValue == '')
{
$autoAlias = true;
$varValue = standardize($dc->activeRecord->title);
$varValue = standardize($this->restoreBasicEntities($dc->activeRecord->title));
}

$objAlias = $this->Database->prepare("SELECT id FROM tl_page WHERE id=? OR alias=?")
Expand Down
2 changes: 1 addition & 1 deletion system/modules/calendar/dca/tl_calendar_events.php
Expand Up @@ -603,7 +603,7 @@ public function generateAlias($varValue, DataContainer $dc)
if (!strlen($varValue))
{
$autoAlias = true;
$varValue = standardize($dc->activeRecord->title);
$varValue = standardize($this->restoreBasicEntities($dc->activeRecord->title));
}

$objAlias = $this->Database->prepare("SELECT id FROM tl_calendar_events WHERE alias=?")
Expand Down
2 changes: 1 addition & 1 deletion system/modules/faq/dca/tl_faq.php
Expand Up @@ -344,7 +344,7 @@ public function generateAlias($varValue, DataContainer $dc)
if (!strlen($varValue))
{
$autoAlias = true;
$varValue = standardize($dc->activeRecord->question);
$varValue = standardize($this->restoreBasicEntities($dc->activeRecord->question));
}

$objAlias = $this->Database->prepare("SELECT id FROM tl_faq WHERE alias=?")
Expand Down
2 changes: 1 addition & 1 deletion system/modules/news/dca/tl_news.php
Expand Up @@ -567,7 +567,7 @@ public function generateAlias($varValue, DataContainer $dc)
if (!strlen($varValue))
{
$autoAlias = true;
$varValue = standardize($dc->activeRecord->headline);
$varValue = standardize($this->restoreBasicEntities($dc->activeRecord->headline));
}

$objAlias = $this->Database->prepare("SELECT id FROM tl_news WHERE alias=?")
Expand Down
2 changes: 1 addition & 1 deletion system/modules/newsletter/dca/tl_newsletter.php
Expand Up @@ -434,7 +434,7 @@ public function generateAlias($varValue, DataContainer $dc)
if (!strlen($varValue))
{
$autoAlias = true;
$varValue = standardize($dc->activeRecord->subject);
$varValue = standardize($this->restoreBasicEntities($dc->activeRecord->subject));
}

$objAlias = $this->Database->prepare("SELECT id FROM tl_newsletter WHERE alias=?")
Expand Down

0 comments on commit 21de1c2

Please sign in to comment.