if ($core->auth->check('usage,contentadmin', $core->blog->id)) { $post_format = $core->auth->getOption('post_format'); $post_editor = $core->auth->getOption('editor'); if ($post_editor && !empty($post_editor[$post_format])) { // context is not post because of tags not available $admin_post_behavior = $core->callBehavior('adminPostEditor', $post_editor[$post_format], 'quickentry', array('#post_content'), $post_format); } } } /* DISPLAY -------------------------------------------------------- */ dcPage::open(__('Dashboard'), dcPage::jsLoad('js/_index.js') . $admin_post_behavior . $core->callBehavior('adminDashboardHeaders'), dcPage::breadcrumb(array(__('Dashboard') . ' : ' . html::escapeHTML($core->blog->name) => ''), array('home_link' => false))); # Dotclear updates notifications if ($core->auth->isSuperAdmin() && is_readable(DC_DIGESTS)) { $updater = new dcUpdate(DC_UPDATE_URL, 'dotclear', DC_UPDATE_VERSION, DC_TPL_CACHE . '/versions'); $new_v = $updater->check(DC_VERSION); $version_info = $new_v ? $updater->getInfoURL() : ''; if ($updater->getNotify() && $new_v) { echo '<div class="dc-update"><h3>' . sprintf(__('Dotclear %s is available!'), $new_v) . '</h3> ' . '<p><a class="button submit" href="' . $core->adminurl->get("admin.update") . '">' . sprintf(__('Upgrade now'), $new_v) . '</a> ' . '<a class="button" href="' . $core->adminurl->get("admin.update", array('hide_msg' => 1)) . '">' . __('Remind me later') . '</a>' . ($version_info ? ' </p>' . '<p class="updt-info"><a href="' . $version_info . '">' . __('Information about this version') . '</a>' : '') . '</p>' . '</div>'; } } if ($core->auth->getInfo('user_default_blog') != $core->blog->id && $core->auth->getBlogCount() > 1) { echo '<p><a href="' . $core->adminurl->get("admin.home", array('default_blog' => 1)) . '" class="button">' . __('Make this blog my default blog') . '</a></p>'; } if ($core->blog->status == 0) { echo '<p class="static-msg">' . __('This blog is offline') . '.</p>'; } elseif ($core->blog->status == -1) { echo '<p class="static-msg">' . __('This blog is removed') . '.</p>'; } if (!defined('DC_ADMIN_URL') || !DC_ADMIN_URL) { echo '<p class="static-msg">' . sprintf(__('%s is not defined, you should edit your configuration file.'), 'DC_ADMIN_URL') . ' ' . __('See <a href="http://dotclear.org/documentation/2.0/admin/config">documentation</a> for more information.') . '</p>';
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html # # -- END LICENSE BLOCK ----------------------------------------- require dirname(__FILE__) . '/../inc/admin/prepend.php'; if (!defined('DC_BACKUP_PATH')) { define('DC_BACKUP_PATH', DC_ROOT); } dcPage::checkSuper(); if (!is_readable(DC_DIGESTS)) { dcPage::open(__('Dotclear update')); echo '<h2>Access denied</h2>'; dcPage::close(); exit; } $updater = new dcUpdate(DC_UPDATE_URL, 'dotclear', DC_UPDATE_VERSION, DC_TPL_CACHE . '/versions'); $new_v = $updater->check(DC_VERSION, !empty($_GET['nocache'])); $zip_file = $new_v ? DC_BACKUP_PATH . '/' . basename($updater->getFileURL()) : ''; $version_info = $new_v ? $updater->getInfoURL() : ''; # Hide "update me" message if (!empty($_GET['hide_msg'])) { $updater->setNotify(false); http::redirect('index.php'); } $p_url = 'update.php'; $step = isset($_GET['step']) ? $_GET['step'] : ''; $step = in_array($step, array('check', 'download', 'backup', 'unzip')) ? $step : ''; $default_tab = !empty($_GET['tab']) ? html::escapeHTML($_GET['tab']) : 'update'; if (!empty($_POST['backup_file'])) { $default_tab = 'files'; } $archives = array();