2014-07-24 04:50:14 +02:00
|
|
|
<?php
|
|
|
|
|
2014-07-28 02:39:19 +02:00
|
|
|
class BrokenExternalLink extends DataObject {
|
2014-07-24 04:50:14 +02:00
|
|
|
|
|
|
|
private static $db = array(
|
|
|
|
'Link' => 'Varchar(2083)', // 2083 is the maximum length of a URL in Internet Explorer.
|
|
|
|
'HTTPCode' =>'Int'
|
|
|
|
);
|
|
|
|
|
|
|
|
private static $has_one = array(
|
|
|
|
'Page' => 'Page'
|
|
|
|
);
|
|
|
|
|
|
|
|
public static $summary_fields = array(
|
|
|
|
'Page.Title' => 'Page',
|
|
|
|
'HTTPCode' => 'HTTP Code',
|
|
|
|
'Created' => 'Created'
|
|
|
|
);
|
|
|
|
|
|
|
|
public static $searchable_fields = array(
|
|
|
|
'HTTPCode' => array('title' => 'HTTP Code')
|
|
|
|
);
|
|
|
|
|
|
|
|
function canEdit($member = false) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2014-07-28 02:39:19 +02:00
|
|
|
function canView($member = false) {
|
|
|
|
$member = $member ? $member : Member::currentUser();
|
|
|
|
$codes = array('content-authors', 'administrators');
|
|
|
|
return Permission::checkMember($member, $codes);
|
|
|
|
}
|
2014-07-24 04:50:14 +02:00
|
|
|
}
|
2014-07-30 02:34:39 +02:00
|
|
|
|
2014-07-31 06:49:20 +02:00
|
|
|
class BrokenExternalPageTrackStatus extends DataObject {
|
|
|
|
private static $db = array(
|
|
|
|
'Status' => 'Enum("Completed, Running", "Running")',
|
|
|
|
'TotalPages' => 'Int',
|
|
|
|
'CompletedPages' => 'Int',
|
|
|
|
'JobInfo' => 'Varchar(255)'
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2014-07-30 02:34:39 +02:00
|
|
|
class BrokenExternalPageTrack extends DataObject {
|
|
|
|
private static $db = array(
|
2014-07-31 06:49:20 +02:00
|
|
|
'TrackID' => 'Int',
|
|
|
|
'Processed' => 'Boolean'
|
2014-07-30 02:34:39 +02:00
|
|
|
);
|
|
|
|
|
|
|
|
private static $has_one = array(
|
|
|
|
'Page' => 'Page'
|
|
|
|
);
|
|
|
|
}
|