getName() . $block_id;
$class=$this->getName().'_block';
$title = '';
if ($ctype == "gedcom" && WT_USER_GEDCOM_ADMIN || $ctype == 'user') {
$title .= "";
$title .= "";
}
$title.= /* I18N: title for list of recent changes */ WT_I18N::plural('Changes in the last %d day', 'Changes in the last %d days', $days, $days);
$content = "";
// Print block content
if (count($found_facts) == 0) {
$content .= WT_I18N::translate('There have been no changes within the last %s days.', $days);
} else {
ob_start();
switch ($infoStyle) {
case 'list':
$content .= print_changes_list($found_facts, $sortStyle);
break;
case 'table':
// sortable table
$content .= print_changes_table($found_facts, $sortStyle);
break;
}
$content .= ob_get_clean();
}
if ($template) {
if ($block) {
require WT_THEME_DIR . 'templates/block_small_temp.php';
} else {
require WT_THEME_DIR . 'templates/block_main_temp.php';
}
} else {
return $content;
}
}
// Implement class WT_Module_Block
public function loadAjax() {
return true;
}
// Implement class WT_Module_Block
public function isUserBlock() {
return true;
}
// Implement class WT_Module_Block
public function isGedcomBlock() {
return true;
}
// Implement class WT_Module_Block
public function configureBlock($block_id) {
if (safe_POST_bool('save')) {
set_block_setting($block_id, 'days', safe_POST_integer('days', 1, 30, 7));
set_block_setting($block_id, 'infoStyle', safe_POST('infoStyle', array('list', 'table'), 'table'));
set_block_setting($block_id, 'sortStyle', safe_POST('sortStyle', array('name', 'date_asc', 'date_desc'), 'date_desc'));
set_block_setting($block_id, 'hide_empty', safe_POST_bool('hide_empty'));
set_block_setting($block_id, 'block', safe_POST_bool('block'));
echo WT_JS_START, 'window.opener.location.href=window.opener.location.href;window.close();', WT_JS_END;
exit;
}
require_once WT_ROOT . 'includes/functions/functions_edit.php';
$days = get_block_setting($block_id, 'days', 7);
echo '