2015-02-08 08:03:55 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
if(!class_exists('Widget')) return;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @deprecated since version 2.0
|
|
|
|
*/
|
|
|
|
class ArchiveWidget extends BlogArchiveWidget implements MigratableObject {
|
|
|
|
|
|
|
|
private static $db = array(
|
|
|
|
'DisplayMode' => 'Varchar'
|
|
|
|
);
|
|
|
|
|
|
|
|
private static $only_available_in = array('none');
|
|
|
|
|
|
|
|
public function canCreate($member = null) {
|
|
|
|
// Deprecated
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function up() {
|
|
|
|
if($this->DisplayMode) {
|
2015-03-05 22:41:37 +01:00
|
|
|
$this->ArchiveType = ($this->DisplayMode === 'year') ? 'Yearly' : 'Monthly';
|
2015-02-08 08:03:55 +01:00
|
|
|
}
|
|
|
|
$this->ClassName = 'BlogArchiveWidget';
|
|
|
|
$this->write();
|
|
|
|
}
|
|
|
|
}
|