Ejemplo n.º 1
0
($hook = SE_Hook::exists('se_admin_sanity')) ? SE_Hook::call($hook, array()) : NULL;
$sanity->execute();
// Generate notifications
$admin_notifications = array();
if (file_exists(SE_ROOT . "/install.php") || file_exists(SE_ROOT . "/installsql.php")) {
    $admin_notifications[] = 1314;
}
if (file_exists(SE_ROOT . "/upgrade.php") || file_exists(SE_ROOT . "/upgradesql.php")) {
    $admin_notifications[] = 1315;
}
$file_version_arr = explode('.', $version);
$file_version = array_shift($file_version_arr) . '.' . join('', $file_version_arr);
$database_version_arr = explode('.', $setting['setting_version']);
$database_version = array_shift($database_version_arr) . '.' . join('', $database_version_arr);
if ($file_version != $database_version) {
    $admin_notifications[] = sprintf(SELanguage::get(1320), $file_version, $database_version);
}
foreach ($sanity->tests as $sanity_test) {
    if ($sanity_test->result || $sanity_test->is_recommendation) {
        continue;
    }
    $admin_notifications[] = $sanity_test->getCategory() . ': ' . $sanity_test->getTitle() . ': ' . $sanity_test->getMessage();
}
($hook = SE_Hook::exists('se_admin_notifications')) ? SE_Hook::call($hook, array()) : NULL;
// ASSIGN VARIABLES AND SHOW ADMIN HOME PAGE
$smarty->assign('admin_notifications', $admin_notifications);
$smarty->assign('task', $task);
$smarty->assign('total_users_num', $total_users['total_users']);
$smarty->assign('total_messages_num', $total_messages['total_messages']);
$smarty->assign('total_comments_num', $total_comments);
$smarty->assign('total_user_levels', $total_user_levels['total_user_levels']);