<?php return array (
  'cf1ffbc0d08d65667a1338cc666f85b9' => 
  array (
    'criteria' => 
    array (
      'name' => 'upgrademodx',
    ),
    'object' => 
    array (
      'name' => 'upgrademodx',
      'path' => '{core_path}components/upgrademodx/',
      'assets_path' => NULL,
    ),
  ),
  'fa5bf96394c881bfc1d16b348e9ff20d' => 
  array (
    'criteria' => 
    array (
      'key' => 'ugm_verbose',
    ),
    'object' => 
    array (
      'key' => 'ugm_verbose',
      'value' => '0',
      'xtype' => 'combo-boolean',
      'namespace' => 'upgrademodx',
      'area' => 'GitHub',
      'editedon' => '0000-00-00 00:00:00',
    ),
  ),
  'dd58afda7eaddb1778700fadf9ef2ab5' => 
  array (
    'criteria' => 
    array (
      'key' => 'ugm_versionlist_api_url',
    ),
    'object' => 
    array (
      'key' => 'ugm_versionlist_api_url',
      'value' => '//api.github.com/repos/modxcms/revolution/tags',
      'xtype' => 'textfield',
      'namespace' => 'upgrademodx',
      'area' => 'Widget',
      'editedon' => '0000-00-00 00:00:00',
    ),
  ),
  '4796fe12c0192320d81fef3462ae0a8a' => 
  array (
    'criteria' => 
    array (
      'key' => 'ugm_temp_dir',
    ),
    'object' => 
    array (
      'key' => 'ugm_temp_dir',
      'value' => '{base_path}ugmtemp/',
      'xtype' => 'textfield',
      'namespace' => 'upgrademodx',
      'area' => 'Widget',
      'editedon' => '0000-00-00 00:00:00',
    ),
  ),
  '6c48d2b4c21cb2e299dc13819cc62f54' => 
  array (
    'criteria' => 
    array (
      'key' => 'ugm_cert_path',
    ),
    'object' => 
    array (
      'key' => 'ugm_cert_path',
      'value' => '',
      'xtype' => 'textfield',
      'namespace' => 'upgrademodx',
      'area' => 'GitHub',
      'editedon' => '0000-00-00 00:00:00',
    ),
  ),
  'a6aa30ad1045aea4fc1881bf45e85019' => 
  array (
    'criteria' => 
    array (
      'key' => 'ugm_file_version',
    ),
    'object' => 
    array (
      'key' => 'ugm_file_version',
      'value' => '',
      'xtype' => 'textfield',
      'namespace' => 'upgrademodx',
      'area' => 'Widget',
      'editedon' => '2020-03-11 12:54:58',
    ),
  ),
  'ceba60a930ab9b8fa6005ae5080d23f3' => 
  array (
    'criteria' => 
    array (
      'key' => 'ugm_force_pcl_zip',
    ),
    'object' => 
    array (
      'key' => 'ugm_force_pcl_zip',
      'value' => '0',
      'xtype' => 'combo-boolean',
      'namespace' => 'upgrademodx',
      'area' => 'Download',
      'editedon' => '0000-00-00 00:00:00',
    ),
  ),
  '67fbc94224b00bd3e30bed096e2e92dc' => 
  array (
    'criteria' => 
    array (
      'key' => 'ugm_modx_timeout',
    ),
    'object' => 
    array (
      'key' => 'ugm_modx_timeout',
      'value' => '6',
      'xtype' => 'textfield',
      'namespace' => 'upgrademodx',
      'area' => 'Download',
      'editedon' => '0000-00-00 00:00:00',
    ),
  ),
  '5c186deeee7fb6957dd2f5dbb731b2f9' => 
  array (
    'criteria' => 
    array (
      'key' => 'ugm_ssl_verify_peer',
    ),
    'object' => 
    array (
      'key' => 'ugm_ssl_verify_peer',
      'value' => '1',
      'xtype' => 'combo-boolean',
      'namespace' => 'upgrademodx',
      'area' => 'Download',
      'editedon' => '0000-00-00 00:00:00',
    ),
  ),
  'fec373d24443729a5661471e57a58851' => 
  array (
    'criteria' => 
    array (
      'key' => 'ugm_language',
    ),
    'object' => 
    array (
      'key' => 'ugm_language',
      'value' => 'en',
      'xtype' => 'textfield',
      'namespace' => 'upgrademodx',
      'area' => 'Form',
      'editedon' => '0000-00-00 00:00:00',
    ),
  ),
  '837b94550ee6fe63d5e38b0b2486f374' => 
  array (
    'criteria' => 
    array (
      'key' => 'ugm_pl_only',
    ),
    'object' => 
    array (
      'key' => 'ugm_pl_only',
      'value' => '1',
      'xtype' => 'combo-boolean',
      'namespace' => 'upgrademodx',
      'area' => 'Form',
      'editedon' => '0000-00-00 00:00:00',
    ),
  ),
  '66d0c6907c42a6c3d400bd75017d2a35' => 
  array (
    'criteria' => 
    array (
      'key' => 'ugm_github_username',
    ),
    'object' => 
    array (
      'key' => 'ugm_github_username',
      'value' => '',
      'xtype' => 'textfield',
      'namespace' => 'upgrademodx',
      'area' => 'GitHub',
      'editedon' => '0000-00-00 00:00:00',
    ),
  ),
  '873c90b97eec6840ba3bac13fced36fe' => 
  array (
    'criteria' => 
    array (
      'key' => 'ugm_github_token',
    ),
    'object' => 
    array (
      'key' => 'ugm_github_token',
      'value' => '',
      'xtype' => 'textfield',
      'namespace' => 'upgrademodx',
      'area' => 'GitHub',
      'editedon' => '0000-00-00 00:00:00',
    ),
  ),
  'ea24bb9594824c5dc0f2d2ec9d881f39' => 
  array (
    'criteria' => 
    array (
      'key' => 'ugm_github_timeout',
    ),
    'object' => 
    array (
      'key' => 'ugm_github_timeout',
      'value' => '6',
      'xtype' => 'textfield',
      'namespace' => 'upgrademodx',
      'area' => 'GitHub',
      'editedon' => '0000-00-00 00:00:00',
    ),
  ),
  '7044de863da29f9c729548abaf70b3b6' => 
  array (
    'criteria' => 
    array (
      'key' => 'ugm_versions_to_show',
    ),
    'object' => 
    array (
      'key' => 'ugm_versions_to_show',
      'value' => '5',
      'xtype' => 'textfield',
      'namespace' => 'upgrademodx',
      'area' => 'Form',
      'editedon' => '0000-00-00 00:00:00',
    ),
  ),
  '3c9479116c58e5aadcd4eca66259dbca' => 
  array (
    'criteria' => 
    array (
      'key' => 'ugm_groups',
    ),
    'object' => 
    array (
      'key' => 'ugm_groups',
      'value' => 'Administrator',
      'xtype' => 'textfield',
      'namespace' => 'upgrademodx',
      'area' => 'Security',
      'editedon' => '0000-00-00 00:00:00',
    ),
  ),
  '375ee837f936b7b6a0792813ffcba157' => 
  array (
    'criteria' => 
    array (
      'key' => 'ugm_interval',
    ),
    'object' => 
    array (
      'key' => 'ugm_interval',
      'value' => '1 day',
      'xtype' => 'textfield',
      'namespace' => 'upgrademodx',
      'area' => 'Widget',
      'editedon' => '0000-00-00 00:00:00',
    ),
  ),
  '642c901f2aa3a6ee3ef914dbf78e4a63' => 
  array (
    'criteria' => 
    array (
      'key' => 'ugm_last_check',
    ),
    'object' => 
    array (
      'key' => 'ugm_last_check',
      'value' => '',
      'xtype' => 'textfield',
      'namespace' => 'upgrademodx',
      'area' => 'Widget',
      'editedon' => '2020-03-11 12:54:58',
    ),
  ),
  'ad783e06b01c5806537bcd56f4e58cb2' => 
  array (
    'criteria' => 
    array (
      'key' => 'ugm_latest_version',
    ),
    'object' => 
    array (
      'key' => 'ugm_latest_version',
      'value' => '',
      'xtype' => 'textfield',
      'namespace' => 'upgrademodx',
      'area' => 'Widget',
      'editedon' => '2020-03-11 12:54:58',
    ),
  ),
  'b3f83ba974e3e9fc265a41e6ca5f2171' => 
  array (
    'criteria' => 
    array (
      'key' => 'ugm_hide_when_no_upgrade',
    ),
    'object' => 
    array (
      'key' => 'ugm_hide_when_no_upgrade',
      'value' => '0',
      'xtype' => 'combo-boolean',
      'namespace' => 'upgrademodx',
      'area' => 'Widget',
      'editedon' => '0000-00-00 00:00:00',
    ),
  ),
  'e6511b2d991103ccd186bbb3f06b44f1' => 
  array (
    'criteria' => 
    array (
      'key' => 'ugm_version_list_path',
    ),
    'object' => 
    array (
      'key' => 'ugm_version_list_path',
      'value' => '{core_path}cache/upgrademodx/',
      'xtype' => 'textfield',
      'namespace' => 'upgrademodx',
      'area' => 'Widget',
      'editedon' => '0000-00-00 00:00:00',
    ),
  ),
  'be905b2e7814eb80b8bac56f674d1c97' => 
  array (
    'criteria' => 
    array (
      'category' => 'UpgradeMODX',
    ),
    'object' => 
    array (
      'id' => 14,
      'parent' => 0,
      'category' => 'UpgradeMODX',
    ),
  ),
  'e91af180a87f45e65e06191756cd359f' => 
  array (
    'criteria' => 
    array (
      'name' => 'UpgradeMODXTpl',
    ),
    'object' => 
    array (
      'id' => 38,
      'source' => 0,
      'property_preprocess' => 0,
      'name' => 'UpgradeMODXTpl',
      'description' => 'Tpl chunk for alert widget',
      'editor_type' => 0,
      'category' => 14,
      'cache_type' => 0,
      'snippet' => '<div id="Upgrade_modx">
    <h3 style="color:[[+ugm_notice_color]]">[[+ugm_notice]]</h3>
    <br/>[[+ugm_current_version_caption]]: [[+ugm_current_version]]
    <br/>[[+ugm_latest_version_caption]]: [[+ugm_latest_version]]



    [[+ugm_version_form]]
    <div id="ugm_errors">[[+ugm_errors]]</div>
</div>
<script src="[[+ugm_assets_url]]js/classie.js"></script>
<script src="[[+ugm_assets_url]]js/progressButton.js"></script>
<script src="[[+ugm_assets_url]]js/ugm-bottom.js"></script>
<p>&nbsp;</p>


',
      'locked' => 0,
      'properties' => 'a:0:{}',
      'static' => 0,
      'static_file' => '',
      'content' => '<div id="Upgrade_modx">
    <h3 style="color:[[+ugm_notice_color]]">[[+ugm_notice]]</h3>
    <br/>[[+ugm_current_version_caption]]: [[+ugm_current_version]]
    <br/>[[+ugm_latest_version_caption]]: [[+ugm_latest_version]]



    [[+ugm_version_form]]
    <div id="ugm_errors">[[+ugm_errors]]</div>
</div>
<script src="[[+ugm_assets_url]]js/classie.js"></script>
<script src="[[+ugm_assets_url]]js/progressButton.js"></script>
<script src="[[+ugm_assets_url]]js/ugm-bottom.js"></script>
<p>&nbsp;</p>


',
    ),
  ),
  'ed07d9bb8ee2fe68fff664cc91088ceb' => 
  array (
    'criteria' => 
    array (
      'name' => 'UpgradeMODXWidget',
    ),
    'object' => 
    array (
      'id' => 52,
      'source' => 0,
      'property_preprocess' => 0,
      'name' => 'UpgradeMODXWidget',
      'description' => 'Upgrade MODX Dashboard widget',
      'editor_type' => 0,
      'category' => 14,
      'cache_type' => 0,
      'snippet' => '/**
 * UpgradeMODXWidget snippet for UpgradeMODX extra
 *
 * Copyright 2015-2018 Bob Ray <https://bobsguides.com>
 * Created on 08-16-2015
 *
 * UpgradeMODX is free software; you can redistribute it and/or modify it under the
 * terms of the GNU General Public License as published by the Free Software
 * Foundation; either version 2 of the License, or (at your option) any later
 * version.
 *
 * UpgradeMODX is distributed in the hope that it will be useful, but WITHOUT ANY
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
 * A PARTICULAR PURPOSE. See the GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * UpgradeMODX; if not, write to the Free Software Foundation, Inc., 59 Temple
 * Place, Suite 330, Boston, MA 02111-1307 USA
 *
 * @package upgrademodx
 */

/**
 * Description
 * -----------
 * UpgradeMODX Dashboard widget
 * This package was inspired by the work of a number of people and I have borrowed some of their code.
 * Dmytro Lukianenko (dmi3yy) is the original author of the MODX install script. Susan Sottwell, Sharapov,
 * Bumkaka, Inreti, Zaigham Rana, frischnetz, and AgelxNash, also contributed and I\'d like to thank all
 * of them for laying the groundwork.
 *
 * Variables
 * ---------
 * @var $modx modX
 * @var $scriptProperties array
 *
 * @package upgrademodx
 **/

/* Properties

 * @property &groups textfield -- group, or comma-separated list of groups, who will see the widget; Default: (empty)..
 * @property &hideWhenNoUpgrade combo-boolean -- Hide widget when no upgrade is available; Default: No.
 * @property &interval textfield -- Interval between checks -- Examples: 1 week, 3 days, 6 hours; Default: 1 week.
 * @property &language textfield -- Two-letter code of language to user; Default: en.
 * @property &lastCheck textfield -- Date and time of last check -- set automatically; Default: (empty)..
 * @property &latestVersion textfield -- Latest version (at last check) -- set automatically; Default: (empty)..
 * @property &plOnly combo-boolean -- Show only pl (stable) versions; Default: yes.
 * @property &versionsToShow textfield -- Number of versions to show in upgrade form (not widget); Default: 5.
 */


/* Initialize */
/* This will execute when in MODX */
$language = $modx->getOption(\'ugm_language\', null, $modx->getOption(\'manager_language\'), true);
$language = empty($language) ? \'en\' : $language;
$props = $scriptProperties;
$modx->lexicon->load($language . \':upgrademodx:default\');
$devMode = $modx->getOption(\'ugm.devMode\', null, false, true);
$groups = $modx->getOption(\'ugm_groups\', null, \'Administrator\', true);

/* Return empty string if user shouldn\'t see widget */
if (strpos($groups, \',\') !== false) {
    $groups = explode(\',\', $groups);
}
if (! $modx->user->isMember($groups)) {
    return \'\';
}

$corePath = $modx->getOption(\'ugm.core_path\', null, $modx->getOption(\'core_path\', null, MODX_CORE_PATH) . \'components/upgrademodx/\');
$assetsUrl = $modx->getOption(\'ugm.assets_url\', null, $modx->getOption(\'assets_url\', null, MODX_ASSETS_URL) . \'components/upgrademodx/\');
require_once($corePath . \'model/upgrademodx/upgrademodx.class.php\');
$upgrade = new UpgradeMODX($modx);
$upgrade->init();
$props[\'ugm_setup_url\'] = MODX_SITE_URL . \'setup/index.php\';
unset($props[\'controller\']); // remove trash from scriptProperties
$modx->regClientStartupScript(\'<script>
var ugmConnectorUrl = "\' . $assetsUrl . \'connector.php";
var ugm_config = \' . $modx->toJSON($props)  . \';
var ugm_setup_url = "\' . MODX_SITE_URL . \'setup/index.php";
</script>\'
);
$modx->regClientCSS($assetsUrl . \'css/progress.css\');
$modx->regClientStartupScript("//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js");
$modx->regClientStartupScript($assetsUrl . \'js/modernizr.custom.js\');

$hideWhenNoUpgrade = $modx->getOption(\'ugm_hide_when_no_upgrade\', null, false, true);
$settingsVersion = $modx->getOption(\'settings_version\');

/* Set Placeholders */
$placeholders = array();
$placeholders[\'[[+ugm_assets_url]]\'] = $assetsUrl;
$placeholders[\'[[+ugm_current_version]]\'] = $settingsVersion;
$placeholders[\'[[+ugm_current_version_caption]]\'] = $modx->lexicon(\'ugm_current_version_caption\');
$placeholders[\'[[+ugm_latest_version_caption]]\'] = $modx->lexicon(\'ugm_latest_version_caption\');

$upgradeAvailable = $upgrade->upgradeAvailable($settingsVersion);
$placeholders[\'[[+ugm_latest_version]]\'] = $upgrade->getLatestVersion();

if ($devMode) {
    $upgradeAvailable = true;
}

if ($upgradeAvailable) {
    $versionForm = $upgrade->createVersionForm($modx);
}

$errors = $upgrade->getErrors();

if (!empty($errors)) {
    $msg = \'\';
    foreach ($errors as $error) {
        $msg .= \'<br/><span style="color:red">\' . $modx->lexicon(\'ugm_error\') .
            \': \' . $error . \'</span>\';
    }
    return $msg;
}

/* Process */

/* See if there\'s a new version */
if ($upgradeAvailable) {
    $placeholders[\'[[+ugm_notice]]\'] = $modx->lexicon(\'ugm_upgrade_available\');
    $placeholders[\'[[+ugm_notice_color]]\'] = \'green\';
    $placeholders[\'[[+ugm_version_form]]\'] = $versionForm;
} else {
    if ($hideWhenNoUpgrade) {
        return \'\';
    } else {
        $placeholders[\'[[+ugm_notice]]\'] = $modx->lexicon(\'ugm_modx_up_to_date\');
        $placeholders[\'[[+ugm_notice_color]]\'] = \'gray\';
    }
}
/* Get Tpl */
$tpl = $modx->getChunk(\'UpgradeMODXTpl\');

/* Do the replacements */
$tpl = str_replace(array_keys($placeholders), array_values($placeholders), $tpl);

/*if (php_sapi_name() === \'cli\') {
    echo $tpl;
}*/

return $tpl;',
      'locked' => 0,
      'properties' => 'a:0:{}',
      'moduleguid' => '',
      'static' => 0,
      'static_file' => '',
      'content' => '/**
 * UpgradeMODXWidget snippet for UpgradeMODX extra
 *
 * Copyright 2015-2018 Bob Ray <https://bobsguides.com>
 * Created on 08-16-2015
 *
 * UpgradeMODX is free software; you can redistribute it and/or modify it under the
 * terms of the GNU General Public License as published by the Free Software
 * Foundation; either version 2 of the License, or (at your option) any later
 * version.
 *
 * UpgradeMODX is distributed in the hope that it will be useful, but WITHOUT ANY
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
 * A PARTICULAR PURPOSE. See the GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * UpgradeMODX; if not, write to the Free Software Foundation, Inc., 59 Temple
 * Place, Suite 330, Boston, MA 02111-1307 USA
 *
 * @package upgrademodx
 */

/**
 * Description
 * -----------
 * UpgradeMODX Dashboard widget
 * This package was inspired by the work of a number of people and I have borrowed some of their code.
 * Dmytro Lukianenko (dmi3yy) is the original author of the MODX install script. Susan Sottwell, Sharapov,
 * Bumkaka, Inreti, Zaigham Rana, frischnetz, and AgelxNash, also contributed and I\'d like to thank all
 * of them for laying the groundwork.
 *
 * Variables
 * ---------
 * @var $modx modX
 * @var $scriptProperties array
 *
 * @package upgrademodx
 **/

/* Properties

 * @property &groups textfield -- group, or comma-separated list of groups, who will see the widget; Default: (empty)..
 * @property &hideWhenNoUpgrade combo-boolean -- Hide widget when no upgrade is available; Default: No.
 * @property &interval textfield -- Interval between checks -- Examples: 1 week, 3 days, 6 hours; Default: 1 week.
 * @property &language textfield -- Two-letter code of language to user; Default: en.
 * @property &lastCheck textfield -- Date and time of last check -- set automatically; Default: (empty)..
 * @property &latestVersion textfield -- Latest version (at last check) -- set automatically; Default: (empty)..
 * @property &plOnly combo-boolean -- Show only pl (stable) versions; Default: yes.
 * @property &versionsToShow textfield -- Number of versions to show in upgrade form (not widget); Default: 5.
 */


/* Initialize */
/* This will execute when in MODX */
$language = $modx->getOption(\'ugm_language\', null, $modx->getOption(\'manager_language\'), true);
$language = empty($language) ? \'en\' : $language;
$props = $scriptProperties;
$modx->lexicon->load($language . \':upgrademodx:default\');
$devMode = $modx->getOption(\'ugm.devMode\', null, false, true);
$groups = $modx->getOption(\'ugm_groups\', null, \'Administrator\', true);

/* Return empty string if user shouldn\'t see widget */
if (strpos($groups, \',\') !== false) {
    $groups = explode(\',\', $groups);
}
if (! $modx->user->isMember($groups)) {
    return \'\';
}

$corePath = $modx->getOption(\'ugm.core_path\', null, $modx->getOption(\'core_path\', null, MODX_CORE_PATH) . \'components/upgrademodx/\');
$assetsUrl = $modx->getOption(\'ugm.assets_url\', null, $modx->getOption(\'assets_url\', null, MODX_ASSETS_URL) . \'components/upgrademodx/\');
require_once($corePath . \'model/upgrademodx/upgrademodx.class.php\');
$upgrade = new UpgradeMODX($modx);
$upgrade->init();
$props[\'ugm_setup_url\'] = MODX_SITE_URL . \'setup/index.php\';
unset($props[\'controller\']); // remove trash from scriptProperties
$modx->regClientStartupScript(\'<script>
var ugmConnectorUrl = "\' . $assetsUrl . \'connector.php";
var ugm_config = \' . $modx->toJSON($props)  . \';
var ugm_setup_url = "\' . MODX_SITE_URL . \'setup/index.php";
</script>\'
);
$modx->regClientCSS($assetsUrl . \'css/progress.css\');
$modx->regClientStartupScript("//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js");
$modx->regClientStartupScript($assetsUrl . \'js/modernizr.custom.js\');

$hideWhenNoUpgrade = $modx->getOption(\'ugm_hide_when_no_upgrade\', null, false, true);
$settingsVersion = $modx->getOption(\'settings_version\');

/* Set Placeholders */
$placeholders = array();
$placeholders[\'[[+ugm_assets_url]]\'] = $assetsUrl;
$placeholders[\'[[+ugm_current_version]]\'] = $settingsVersion;
$placeholders[\'[[+ugm_current_version_caption]]\'] = $modx->lexicon(\'ugm_current_version_caption\');
$placeholders[\'[[+ugm_latest_version_caption]]\'] = $modx->lexicon(\'ugm_latest_version_caption\');

$upgradeAvailable = $upgrade->upgradeAvailable($settingsVersion);
$placeholders[\'[[+ugm_latest_version]]\'] = $upgrade->getLatestVersion();

if ($devMode) {
    $upgradeAvailable = true;
}

if ($upgradeAvailable) {
    $versionForm = $upgrade->createVersionForm($modx);
}

$errors = $upgrade->getErrors();

if (!empty($errors)) {
    $msg = \'\';
    foreach ($errors as $error) {
        $msg .= \'<br/><span style="color:red">\' . $modx->lexicon(\'ugm_error\') .
            \': \' . $error . \'</span>\';
    }
    return $msg;
}

/* Process */

/* See if there\'s a new version */
if ($upgradeAvailable) {
    $placeholders[\'[[+ugm_notice]]\'] = $modx->lexicon(\'ugm_upgrade_available\');
    $placeholders[\'[[+ugm_notice_color]]\'] = \'green\';
    $placeholders[\'[[+ugm_version_form]]\'] = $versionForm;
} else {
    if ($hideWhenNoUpgrade) {
        return \'\';
    } else {
        $placeholders[\'[[+ugm_notice]]\'] = $modx->lexicon(\'ugm_modx_up_to_date\');
        $placeholders[\'[[+ugm_notice_color]]\'] = \'gray\';
    }
}
/* Get Tpl */
$tpl = $modx->getChunk(\'UpgradeMODXTpl\');

/* Do the replacements */
$tpl = str_replace(array_keys($placeholders), array_values($placeholders), $tpl);

/*if (php_sapi_name() === \'cli\') {
    echo $tpl;
}*/

return $tpl;',
    ),
  ),
);