Skip to content

Commit

Permalink
BUGFIX: re-enable broken link notification using BackLinkTracking() (…
Browse files Browse the repository at this point in the history
…this was broken since r101127 (from r106360)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@112580 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information
chillu committed Oct 15, 2010
1 parent 1cc5c5e commit 1a80b91
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion code/AssetTableField.php
Expand Up @@ -281,11 +281,13 @@ public function deletemarked($request) {
sprintf("\"File\".\"ID\" IN (%s)", Convert::raw2sql(implode(',', $fileIDs)))
);
if($files) {
$brokenPages = array();
foreach($files as $file) {
$brokenPages = array_merge($brokenPages, $file->BackLinkTracking()->toArray());
$file->delete();
$numFiles++;
}
if($brokenPages = Notifications::getItems('BrokenLink')) {
if($brokenPages) {
$brokenPageList = " ". _t('AssetAdmin.NOWBROKEN', 'These pages now have broken links:') . '<ul>';
foreach($brokenPages as $brokenPage) {
$brokenPageList .= "<li style=&quot;font-size: 65%&quot;>" . $brokenPage->Breadcrumbs(3, true) . '</li>';
Expand Down

0 comments on commit 1a80b91

Please sign in to comment.