Ejemplo n.º 1
0
/**
 * If we have an update available get the new-features list
 *
 * @author         Jeff Behnke <*****@*****.**>
 * @copyright  (c) 2009-15 ValidWebs.com
 *
 * Created:    12/3/15, 12:38 PM
 *
 * @return bool|mixed|string
 */
function vvv_dash_get_latest_features()
{
    $cache = new vvv_dash_cache();
    if (($new_features = $cache->get('newfeatures-cache', VVV_DASH_THEMES_TTL)) == false) {
        $url = 'https://raw.githubusercontent.com/topdown/VVV-Dashboard/master/new-features.txt';
        $new_features = get_external_data($url);
        // Don't save unless we have data
        if ($new_features && !strstr($new_features, 'Error')) {
            $status = $cache->set('newfeatures-cache', $new_features);
        }
    }
    return $new_features;
}
Ejemplo n.º 2
0
/**
 * Collect the version info from the repo and cache it.
 *
 * @author         Jeff Behnke <*****@*****.**>
 * @copyright  (c) 2009-15 ValidWebs.com
 *
 * Created:    11/20/15, 6:27 PM
 *
 * @return bool|mixed|string
 */
function version_check()
{
    $cache = new vvv_dash_cache();
    if (($version = $cache->get('version-cache', VVV_DASH_THEMES_TTL)) == false) {
        $url = 'https://raw.githubusercontent.com/topdown/VVV-Dashboard/master/version.txt';
        $version = get_version($url);
        // Don't save unless we have data
        if ($version && !strstr($version, 'Error')) {
            $status = $cache->set('version-cache', $version);
        }
    }
    return $version;
}
Ejemplo n.º 3
0
// Settings
$path = '../../';
include_once '../dashboard-custom.php';
include_once 'libs/vvv-dash-cache.php';
include_once 'libs/functions.php';
// Make sure everything is ready
vvv_dash_prep();
$backup_status = false;
$plugins = '';
$themes = '';
$host = '';
$purge_status = '';
$debug_log = '';
$debug_log_lines = '';
$debug_log_path = '';
$cache = new vvv_dash_cache();
if (($hosts = $cache->get('host-sites', VVV_DASH_HOSTS_TTL)) == false) {
    $hosts = get_hosts($path);
    $status = $cache->set('host-sites', serialize($hosts));
}
if (is_string($hosts)) {
    $hosts = unserialize($hosts);
}
if (isset($_GET['host']) && isset($_GET['themes']) || isset($_GET['host']) && isset($_GET['plugins'])) {
    if (isset($_GET['host']) && isset($_GET['themes'])) {
        $type = check_host_type($_GET['host']);
        if (isset($type['key'])) {
            if (isset($type['path'])) {
                $themes = get_themes($type['key'], $type['path']);
            } else {
                $themes = get_themes($type['key'], '/');