CHips L MINI SHELL

CHips L pro

Current Path : /home/thomas/public_html/Fox-C404/root/var/installatron/installers/magento/1.2.0.1/2.1.9/
Upload File :
Current File : /home/thomas/public_html/Fox-C404/root/var/installatron/installers/magento/1.2.0.1/2.1.9/init.xml

<?xml version="1.0"?>
<installer>

	<information>
		<info id="version" value="2.1.9"/>
		<info id="license" value="_apps_opensource"/>
		<info id="date" value="2017-09-30"/>
		<info id="cost" value=""/>
	</information>

	<changelog>
	<![CDATA[
Magento 2.1.9 contains almost 40 security fixes and enhancements.

Highlights
* enhancements that help close cross-site request forgery (CSRF), unauthorized data leak, and authenticated Admin user remote code execution vulnerabilities. See Magento 2.0.16 and 2.1.9 Security Patches for a comprehensive discussion of these issues.
* support for changes to the USPS API that USPS implemented on September 1, 2017
* fixed issue with logging information about exceptions caused by payment failures
* change to how Magento displays status updates during upgrade.

Magento 2.1.8 contains over 100 functional fixes and enhancements as well as pull requests from the community.

Highlights
* multiple enhancements to static content deployment and generation
* improvements to indexing of large catalogs, cache tuning, and **URL re-writes
* reduction in the amount of memory that mass actions require, and performance optimization
* faster deployments for multi-language sites
	]]>
	</changelog>

	<links>
		<link id="admin" value="index.php/[[READ||app/etc/env.php||/['&quot;]frontName['&quot;]\s*=&gt;\s*(['&quot;])(.+?)\1/||2]]"/>
	</links>

	<requirements>
		<requirement id="itron-version" value="5.0.0"/>
		<requirement id="diskspace" value="450"/>
		<requirement id="diskspace-content" value="650"/>
		<requirement id="database" value="1"/>
		<requirement id="db-type" value="mysql"/>
		<requirement id="db-prefix-support" value="1"/>
		<requirement id="db-prefix-underscore" value="1"/>
		<requirement id="php-safe-mode" value="0"/>
		<requirement id="php-memory-limit" value="128"/>
		<requirement id="php-version-minimum" value="5.6.5"/>
		<requirement id="php-version-maximum" value="7.0.99"/>
		<requirement id="mysql-version-minimum" value="5.6"/>
		<requirement id="php-pdo-mysql-version-minimum" value="1"/>
		<requirement id="php-gd-version-minimum" value="1"/>
		<requirement id="php-zip-version-minimum" value="1"/>
		<requirement id="php-simplexml-version-minimum" value="1"/>
		<requirement id="php-curl-version-minimum" value="1"/>
		<requirement id="php-intl-version-minimum" value="1"/>
		<requirement id="php-mcrypt-version-minimum" value="1"/>
	</requirements>

	<skeleton>
		<file id="app/etc/env.php" isconfig="true"/>
		<file id=".gitignore"/>
		<file id=".htaccess"/>
		<file id=".htaccess.sample"/>
		<file id=".htinstall.log"/>
		<file id=".php_cs"/>
		<file id=".travis.yml"/>
		<file id=".user.ini"/>
		<file id="CHANGELOG.md"/>
		<file id="CONTRIBUTING.md"/>
		<file id="COPYING.txt"/>
		<file id="Gruntfile.js.sample"/>
		<file id="ISSUE_TEMPLATE.md"/>
		<file id="LICENSE.txt"/>
		<file id="LICENSE_AFL.txt"/>
		<file id="app"/>
		<file id="bin"/>
		<file id="composer.json"/>
		<file id="composer.lock"/>
		<file id="dev"/>
		<file id="index.php"/>
		<file id="lib"/>
		<file id="nginx.conf.sample"/>
		<file id="package.json.sample"/>
		<file id="php.ini.sample"/>
		<file id="phpserver"/>
		<file id="pub"/>
		<file id="setup"/>
		<file id="update"/>
		<file id="var"/>
		<file id="vendor"/>
		<table id="admin_passwords"/>
		<table id="admin_system_messages"/>
		<table id="admin_user"/>
		<table id="admin_user_session"/>
		<table id="adminnotification_inbox"/>
		<table id="authorization_role"/>
		<table id="authorization_rule"/>
		<table id="cache"/>
		<table id="cache_tag"/>
		<table id="captcha_log"/>
		<table id="catalog_category_entity"/>
		<table id="catalog_category_entity_datetime"/>
		<table id="catalog_category_entity_decimal"/>
		<table id="catalog_category_entity_int"/>
		<table id="catalog_category_entity_text"/>
		<table id="catalog_category_entity_varchar"/>
		<table id="catalog_category_product"/>
		<table id="catalog_category_product_index"/>
		<table id="catalog_category_product_index_tmp"/>
		<table id="catalog_compare_item"/>
		<table id="catalog_eav_attribute"/>
		<table id="catalog_product_bundle_option"/>
		<table id="catalog_product_bundle_option_value"/>
		<table id="catalog_product_bundle_price_index"/>
		<table id="catalog_product_bundle_selection"/>
		<table id="catalog_product_bundle_selection_price"/>
		<table id="catalog_product_bundle_stock_index"/>
		<table id="catalog_product_entity"/>
		<table id="catalog_product_entity_datetime"/>
		<table id="catalog_product_entity_decimal"/>
		<table id="catalog_product_entity_gallery"/>
		<table id="catalog_product_entity_int"/>
		<table id="catalog_product_entity_media_gallery"/>
		<table id="catalog_product_entity_media_gallery_value"/>
		<table id="catalog_product_entity_media_gallery_value_to_entity"/>
		<table id="catalog_product_entity_media_gallery_value_video"/>
		<table id="catalog_product_entity_text"/>
		<table id="catalog_product_entity_tier_price"/>
		<table id="catalog_product_entity_varchar"/>
		<table id="catalog_product_index_eav"/>
		<table id="catalog_product_index_eav_decimal"/>
		<table id="catalog_product_index_eav_decimal_idx"/>
		<table id="catalog_product_index_eav_decimal_tmp"/>
		<table id="catalog_product_index_eav_idx"/>
		<table id="catalog_product_index_eav_tmp"/>
		<table id="catalog_product_index_price"/>
		<table id="catalog_product_index_price_bundle_idx"/>
		<table id="catalog_product_index_price_bundle_opt_idx"/>
		<table id="catalog_product_index_price_bundle_opt_tmp"/>
		<table id="catalog_product_index_price_bundle_sel_idx"/>
		<table id="catalog_product_index_price_bundle_sel_tmp"/>
		<table id="catalog_product_index_price_bundle_tmp"/>
		<table id="catalog_product_index_price_cfg_opt_agr_idx"/>
		<table id="catalog_product_index_price_cfg_opt_agr_tmp"/>
		<table id="catalog_product_index_price_cfg_opt_idx"/>
		<table id="catalog_product_index_price_cfg_opt_tmp"/>
		<table id="catalog_product_index_price_downlod_idx"/>
		<table id="catalog_product_index_price_downlod_tmp"/>
		<table id="catalog_product_index_price_final_idx"/>
		<table id="catalog_product_index_price_final_tmp"/>
		<table id="catalog_product_index_price_idx"/>
		<table id="catalog_product_index_price_opt_agr_idx"/>
		<table id="catalog_product_index_price_opt_agr_tmp"/>
		<table id="catalog_product_index_price_opt_idx"/>
		<table id="catalog_product_index_price_opt_tmp"/>
		<table id="catalog_product_index_price_tmp"/>
		<table id="catalog_product_index_tier_price"/>
		<table id="catalog_product_index_website"/>
		<table id="catalog_product_link"/>
		<table id="catalog_product_link_attribute"/>
		<table id="catalog_product_link_attribute_decimal"/>
		<table id="catalog_product_link_attribute_int"/>
		<table id="catalog_product_link_attribute_varchar"/>
		<table id="catalog_product_link_type"/>
		<table id="catalog_product_option"/>
		<table id="catalog_product_option_price"/>
		<table id="catalog_product_option_title"/>
		<table id="catalog_product_option_type_price"/>
		<table id="catalog_product_option_type_title"/>
		<table id="catalog_product_option_type_value"/>
		<table id="catalog_product_relation"/>
		<table id="catalog_product_super_attribute"/>
		<table id="catalog_product_super_attribute_label"/>
		<table id="catalog_product_super_link"/>
		<table id="catalog_product_website"/>
		<table id="catalog_url_rewrite_product_category"/>
		<table id="cataloginventory_stock"/>
		<table id="cataloginventory_stock_item"/>
		<table id="cataloginventory_stock_status"/>
		<table id="cataloginventory_stock_status_idx"/>
		<table id="cataloginventory_stock_status_tmp"/>
		<table id="catalogrule"/>
		<table id="catalogrule_customer_group"/>
		<table id="catalogrule_group_website"/>
		<table id="catalogrule_product"/>
		<table id="catalogrule_product_price"/>
		<table id="catalogrule_website"/>
		<table id="catalogsearch_fulltext_scope1"/>
		<table id="checkout_agreement"/>
		<table id="checkout_agreement_store"/>
		<table id="cms_block"/>
		<table id="cms_block_store"/>
		<table id="cms_page"/>
		<table id="cms_page_store"/>
		<table id="core_config_data"/>
		<table id="cron_schedule"/>
		<table id="customer_address_entity"/>
		<table id="customer_address_entity_datetime"/>
		<table id="customer_address_entity_decimal"/>
		<table id="customer_address_entity_int"/>
		<table id="customer_address_entity_text"/>
		<table id="customer_address_entity_varchar"/>
		<table id="customer_eav_attribute"/>
		<table id="customer_eav_attribute_website"/>
		<table id="customer_entity"/>
		<table id="customer_entity_datetime"/>
		<table id="customer_entity_decimal"/>
		<table id="customer_entity_int"/>
		<table id="customer_entity_text"/>
		<table id="customer_entity_varchar"/>
		<table id="customer_form_attribute"/>
		<table id="customer_grid_flat"/>
		<table id="customer_group"/>
		<table id="customer_log"/>
		<table id="customer_visitor"/>
		<table id="design_change"/>
		<table id="design_config_grid_flat"/>
		<table id="directory_country"/>
		<table id="directory_country_format"/>
		<table id="directory_country_region"/>
		<table id="directory_country_region_name"/>
		<table id="directory_currency_rate"/>
		<table id="downloadable_link"/>
		<table id="downloadable_link_price"/>
		<table id="downloadable_link_purchased"/>
		<table id="downloadable_link_purchased_item"/>
		<table id="downloadable_link_title"/>
		<table id="downloadable_sample"/>
		<table id="downloadable_sample_title"/>
		<table id="eav_attribute"/>
		<table id="eav_attribute_group"/>
		<table id="eav_attribute_label"/>
		<table id="eav_attribute_option"/>
		<table id="eav_attribute_option_swatch"/>
		<table id="eav_attribute_option_value"/>
		<table id="eav_attribute_set"/>
		<table id="eav_entity"/>
		<table id="eav_entity_attribute"/>
		<table id="eav_entity_datetime"/>
		<table id="eav_entity_decimal"/>
		<table id="eav_entity_int"/>
		<table id="eav_entity_store"/>
		<table id="eav_entity_text"/>
		<table id="eav_entity_type"/>
		<table id="eav_entity_varchar"/>
		<table id="eav_form_element"/>
		<table id="eav_form_fieldset"/>
		<table id="eav_form_fieldset_label"/>
		<table id="eav_form_type"/>
		<table id="eav_form_type_entity"/>
		<table id="email_template"/>
		<table id="flag"/>
		<table id="gift_message"/>
		<table id="googleoptimizer_code"/>
		<table id="import_history"/>
		<table id="importexport_importdata"/>
		<table id="indexer_state"/>
		<table id="integration"/>
		<table id="layout_link"/>
		<table id="layout_update"/>
		<table id="mview_state"/>
		<table id="newsletter_problem"/>
		<table id="newsletter_queue"/>
		<table id="newsletter_queue_link"/>
		<table id="newsletter_queue_store_link"/>
		<table id="newsletter_subscriber"/>
		<table id="newsletter_template"/>
		<table id="oauth_consumer"/>
		<table id="oauth_nonce"/>
		<table id="oauth_token"/>
		<table id="oauth_token_request_log"/>
		<table id="password_reset_request_event"/>
		<table id="paypal_billing_agreement"/>
		<table id="paypal_billing_agreement_order"/>
		<table id="paypal_cert"/>
		<table id="paypal_payment_transaction"/>
		<table id="paypal_settlement_report"/>
		<table id="paypal_settlement_report_row"/>
		<table id="persistent_session"/>
		<table id="product_alert_price"/>
		<table id="product_alert_stock"/>
		<table id="quote"/>
		<table id="quote_address"/>
		<table id="quote_address_item"/>
		<table id="quote_id_mask"/>
		<table id="quote_item"/>
		<table id="quote_item_option"/>
		<table id="quote_payment"/>
		<table id="quote_shipping_rate"/>
		<table id="rating"/>
		<table id="rating_entity"/>
		<table id="rating_option"/>
		<table id="rating_option_vote"/>
		<table id="rating_option_vote_aggregated"/>
		<table id="rating_store"/>
		<table id="rating_title"/>
		<table id="report_compared_product_index"/>
		<table id="report_event"/>
		<table id="report_event_types"/>
		<table id="report_viewed_product_aggregated_daily"/>
		<table id="report_viewed_product_aggregated_monthly"/>
		<table id="report_viewed_product_aggregated_yearly"/>
		<table id="report_viewed_product_index"/>
		<table id="reporting_counts"/>
		<table id="reporting_module_status"/>
		<table id="reporting_orders"/>
		<table id="reporting_system_updates"/>
		<table id="reporting_users"/>
		<table id="review"/>
		<table id="review_detail"/>
		<table id="review_entity"/>
		<table id="review_entity_summary"/>
		<table id="review_status"/>
		<table id="review_store"/>
		<table id="sales_bestsellers_aggregated_daily"/>
		<table id="sales_bestsellers_aggregated_monthly"/>
		<table id="sales_bestsellers_aggregated_yearly"/>
		<table id="sales_creditmemo"/>
		<table id="sales_creditmemo_comment"/>
		<table id="sales_creditmemo_grid"/>
		<table id="sales_creditmemo_item"/>
		<table id="sales_invoice"/>
		<table id="sales_invoice_comment"/>
		<table id="sales_invoice_grid"/>
		<table id="sales_invoice_item"/>
		<table id="sales_invoiced_aggregated"/>
		<table id="sales_invoiced_aggregated_order"/>
		<table id="sales_order"/>
		<table id="sales_order_address"/>
		<table id="sales_order_aggregated_created"/>
		<table id="sales_order_aggregated_updated"/>
		<table id="sales_order_grid"/>
		<table id="sales_order_item"/>
		<table id="sales_order_payment"/>
		<table id="sales_order_status"/>
		<table id="sales_order_status_history"/>
		<table id="sales_order_status_label"/>
		<table id="sales_order_status_state"/>
		<table id="sales_order_tax"/>
		<table id="sales_order_tax_item"/>
		<table id="sales_payment_transaction"/>
		<table id="sales_refunded_aggregated"/>
		<table id="sales_refunded_aggregated_order"/>
		<table id="sales_sequence_meta"/>
		<table id="sales_sequence_profile"/>
		<table id="sales_shipment"/>
		<table id="sales_shipment_comment"/>
		<table id="sales_shipment_grid"/>
		<table id="sales_shipment_item"/>
		<table id="sales_shipment_track"/>
		<table id="sales_shipping_aggregated"/>
		<table id="sales_shipping_aggregated_order"/>
		<table id="salesrule"/>
		<table id="salesrule_coupon"/>
		<table id="salesrule_coupon_aggregated"/>
		<table id="salesrule_coupon_aggregated_order"/>
		<table id="salesrule_coupon_aggregated_updated"/>
		<table id="salesrule_coupon_usage"/>
		<table id="salesrule_customer"/>
		<table id="salesrule_customer_group"/>
		<table id="salesrule_label"/>
		<table id="salesrule_product_attribute"/>
		<table id="salesrule_website"/>
		<table id="search_query"/>
		<table id="search_synonyms"/>
		<table id="sendfriend_log"/>
		<table id="sequence_creditmemo_0"/>
		<table id="sequence_creditmemo_1"/>
		<table id="sequence_invoice_0"/>
		<table id="sequence_invoice_1"/>
		<table id="sequence_order_0"/>
		<table id="sequence_order_1"/>
		<table id="sequence_shipment_0"/>
		<table id="sequence_shipment_1"/>
		<table id="session"/>
		<table id="setup_module"/>
		<table id="shipping_tablerate"/>
		<table id="sitemap"/>
		<table id="store"/>
		<table id="store_group"/>
		<table id="store_website"/>
		<table id="tax_calculation"/>
		<table id="tax_calculation_rate"/>
		<table id="tax_calculation_rate_title"/>
		<table id="tax_calculation_rule"/>
		<table id="tax_class"/>
		<table id="tax_order_aggregated_created"/>
		<table id="tax_order_aggregated_updated"/>
		<table id="theme"/>
		<table id="theme_file"/>
		<table id="translation"/>
		<table id="ui_bookmark"/>
		<table id="url_rewrite"/>
		<table id="variable"/>
		<table id="variable_value"/>
		<table id="vault_payment_token"/>
		<table id="vault_payment_token_order_payment_link"/>
		<table id="weee_tax"/>
		<table id="widget"/>
		<table id="widget_instance"/>
		<table id="widget_instance_page"/>
		<table id="widget_instance_page_layout"/>
		<table id="wishlist"/>
		<table id="wishlist_item"/>
		<table id="wishlist_item_option"/>
	</skeleton>

	<archives>
		<archive id="main" url="http://installatron/archives/magento.2_1_9.main.tar.gz" type="tar.gz" md5="c07beb1f825d9cb9dde18feb786c00aa"/>
		<archive id="demo" url="http://installatron/archives/magento.2_1_9.demo.tar.gz" type="tar.gz" md5="81374769639fa9e7b27d2cf5c3af3799"/>
	</archives>

	<fields>
		<field id="version">
			<get>
				<?php

				$r = $this->read("vendor/magento/magento2-base/composer.json", "/['\"]version['\"]:\s*(['\"])(.+?)\\1/", 2);
				if ( $r !== false ) return $r;

				$r = $this->read("vendor/magento/framework/AppInterface.php", "/const\s+VERSION\s*=\s*(['\"])(.+?)\\1/", 2);
				if ( $r !== false ) return $r;

				$r = $this->read("app/Mage.php");
				if (preg_match("/function\s+getVersionInfo\(\)\s*\{\s*return\s+array\(\s*'major'\s*=>\s*'(\d+)'\s*,\s*'minor'\s*=>\s*'(\d+)'\s*,\s*'revision'\s*=>\s*'(\d+)'\s*,\s*'patch'\s*=>\s*'(\d+)'/sim",$r,$m))
				{
					$v = $m[1].".".$m[2].".".$m[3].".".$m[4];
				}
				else if (preg_match("/function\s+getVersion\(\)\s*{\s*return\s+'([\d\.]+)'/sim",$r,$m))
				{
					$v = $m[1];
				}
				else
				{
					return false;
				}

				// test if 1.9.1.0 hotfix applied
				if ( $v === "1.9.1.0" && strpos($this->read("app/code/core/Mage/Admin/Model/Observer.php"),"getInternallyForwarded") !== false )
				{
					return $v."-2";
				}

				// test if 1.9.1.1 hotfix applied
				if ( $v === "1.9.1.1" && strpos($this->read("app/code/core/Mage/Core/Controller/Varien/Router/Admin.php"),"_validateControllerInstance") !== false )
				{
					return $v."-2";
				}

				return $v;

				?>
			</get>
		</field>
		<field id="language">
			<get>
				<?php
				$r = $this->db_query("SELECT `value` FROM `{$this->db_prefix}core_config_data` WHERE `path`='general/locale/code'",null,"value");
				if ( trim($r) === "" )
				{
					return "en_US";
				}
				return $r;
				?>
			</get>
			<set>
				<?php
/*
				if ( $this->input["field_language"] !== "en" )
				{
					$this->extract("lc_".$this->input["field_language"]);
				}

				$this->db_query("UPDATE `{$this->db_prefix}core_config_data` SET `value`=? WHERE `path`='general/locale/code'",array($this->input["field_language_value"]));
*/
				?>
			</set>
		</field>
		<field id="login">
			<get>
				<?php return $this->db_query("SELECT `username` FROM `{$this->db_prefix}admin_user` WHERE `is_active`='1' ORDER BY `user_id` ASC LIMIT 1", null, "username");?>
			</get>
			<set>
				<?php
				$uid = $this->db_query("SELECT `user_id` FROM `{$this->db_prefix}admin_user` WHERE `is_active`='1' ORDER BY `user_id` ASC LIMIT 1", null, "user_id");
				$this->db_query("UPDATE `{$this->db_prefix}admin_user` SET `username`=? WHERE `user_id`=?", array($this->input["field_login"], $uid));
				?>
			</set>
		</field>
		<field id="passwd">
                       <verify>
                                <?php
                                if ( !isset($this->input["field_passwd"]) || !isset($this->input["field_passwd"][1]) )
                                {
                                        $this->addError("_errors_tooshort", "field_passwd");
                                }
                               /* else if (!preg_match("/[a-z].*\d|\d.*[a-z]/iu", $this->input["field_passwd"]))
                                {
                                        $this->addError("Magento 2 passwords must include both numeric and alphabetic characters.", "field_passwd");
                                }*/
                                ?>
                        </verify>
			<set>
				<?php
				$uid = $this->db_query("SELECT `user_id` FROM `{$this->db_prefix}admin_user` WHERE `is_active`='1' ORDER BY `user_id` ASC LIMIT 1", null, "user_id");
				$salt = i_lib::randstr(2);
				$this->db_query("UPDATE `{$this->db_prefix}admin_user` SET `password`=? WHERE `user_id`=?", array(md5($salt.$this->input["field_passwd"]).":".$salt.":0", $uid) );
				?>
			</set>
		</field>
		<field id="email">
			<get>
				<?php return $this->db_query("SELECT `email` FROM `{$this->db_prefix}admin_user` WHERE `is_active`='1' ORDER BY `user_id` ASC LIMIT 1", null, "email");?>
			</get>
			<set>
				<?php
				$uid = $this->db_query("SELECT `user_id` FROM `{$this->db_prefix}admin_user` WHERE `is_active`='1' ORDER BY `user_id` ASC LIMIT 1", null, "user_id");
				$this->db_query("UPDATE `{$this->db_prefix}admin_user` SET `email`=? WHERE `user_id`=?",array($this->input["field_email"], $uid));
				?>
			</set>
		</field>
		<field id="sitetitle">
			<get>
				<?php return $this->db_query("SELECT `name` FROM `{$this->db_prefix}store_website` WHERE `is_default`='1'", null, "name");?>
			</get>
			<set>
				<?php $this->db_query("UPDATE `{$this->db_prefix}store_website` SET `name`=? WHERE `is_default`='1'",array($this->input["field_sitetitle"]));?>
			</set>
		</field>
		<field id="content" default="no">
		</field>
		<field id="enckey" type="text" readonly="yes">
			<label>_installer_magento_input_enckey_label</label>
			<text>_installer_magento_input_enckey_text</text>
			<value>
				<?php return md5(uniqid(rand(),true));?>
			</value>
			<get>
				<?php return $this->read("app/etc/env.php", "#['\"]key['\"]\s*=>\s*(['\"])(.*?)\\1\s*,#", 2);?>
			</get>
		</field>
	</fields>

	<languages>
		<xx-language id="ar" value="ar_SA"/>
		<xx-language id="bg" value="bg_BG"/>
		<xx-language id="ca" value="ca_ES"/>
		<xx-language id="cs" value="cs_CZ"/>
		<xx-language id="da" value="da_DK"/>
		<xx-language id="de" value="de_DE"/>
		<xx-language id="el" value="el_GR"/>
		<language id="en" value="en_US"/>
		<xx-language id="es" value="es_ES"/>
		<xx-language id="es_mx" value="es_MX"/>
		<xx-language id="fi" value="fi_FI"/>
		<xx-language id="fr" value="fr_FR"/>
		<xx-language id="gl" value="gl_ES"/>
		<xx-language id="he" value="he_IL"/>
		<xx-language id="hr" value="hr_HR"/>
		<xx-language id="hu" value="hu_HU"/>
		<xx-language id="id" value="id_ID"/>
		<xx-language id="it" value="it_IT"/>
		<xx-language id="ja" value="ja_JP"/>
		<xx-language id="km" value="km_KH"/>
		<xx-language id="lt" value="lt_LT"/>
		<xx-language id="nl" value="nl_NL"/>
		<xx-language id="no" value="nb_NO"/>
		<xx-language id="pt" value="pt_PT"/>
		<xx-language id="pt_br" value="pt_BR"/>
		<xx-language id="ru" value="ru_RU"/>
		<xx-language id="sl" value="sl_SI"/>
		<xx-language id="sv" value="sv_SE"/>
		<xx-language id="th" value="th_TH"/>
		<xx-language id="tr" value="tr_TR"/>
		<xx-language id="uk" value="uk_UA"/>
		<xx-language id="zh" value="zh_CN"/>
		<xx-language id="zh_tw" value="zh_TW"/>
	</languages>

	<install>
<?php

// extract the 'main' archive:
$this->extract((($this->input["field_content"] === "yes") ? "demo" : "main"), "upgrtmp");

//@INTERNAL - LEGACY STEP BREAK POINT - DO NOT DISTURB




// @STATUS: 
//
//    rowan is adding the new magento versions now
//
//    2.2.0  - just released, not added to this installer yet (too early to add this new major release)
//    2.1.9  - have not been able to get this to upgrade successfully, and this is holding up release of 2.0.16/1.9.3.6
//           - rowan is going to contact magento's devs
//           - note: doesn't work on cp01; would need MySQL 5.6 to install 2.1.x
//    2.0.16 - added and fully tested on da01
//           - note: doesn't work on cp01; would need MySQL 5.6 to install 2.1.x
//    1.9.3.6 - added and fully tested on da01 (might have tested on cp01, can't remember?)




$this->mv('upgrtmp/*');
$this->rm('upgrtmp');

$this->chmod(array('app/etc', 'var', 'vendor', 'pub/media', 'pub/static'), 0666, 0777, true);

// turn off symlinks for images
$this->sr("app/etc/di.xml", "/Symlink/", "Copy");

// fix for old servers
//@ref ticket #11631600
$this->sr(".htaccess",array(
	"/RewriteCond ..REQUEST_METHOD. .TRAC\[EK\]\s*RewriteRule .. - \[L,R=405\]/sim" => "",
	"/Options \+FollowSymLinks/i" => "Options +SymLinksIfOwnerMatch"
));

// chmod fix - only for non-suexec since Magento's 0770/0660 permissions are fine for suexec
#if ( $this->env["has_php_suexec"] === false ) - IT'S NEEDED ACTUALLY FOR SUPHP.
#{
$this->sr("vendor/magento/framework/Filesystem/DriverInterface.php",array(
	"#WRITEABLE_DIRECTORY_MODE = \d+#" => "WRITEABLE_DIRECTORY_MODE = ".( $this->env["has_php_suexec"] !== false ? "0755" : "0777" ),
	"#WRITEABLE_FILE_MODE = \d+#"      => "WRITEABLE_FILE_MODE = ".( $this->env["has_php_suexec"] !== false ? "0644" : "0666" )
));
/*
// @NOTE: neither of these files exist in 2.1.6
$this->sr(array("lib/internal/Cm/Cache/Backend/File.php","vendor/magento/magento2-base/lib/internal/Cm/Cache/Backend/File.php"),array(
	"#'directory_mode' => \d+#" => "'directory_mode' => ".( $this->env["has_php_suexec"] !== false ? "0755" : "0777" ),
	"#'file_mode' => \d+#"      => "'file_mode' => ".( $this->env["has_php_suexec"] !== false ? "0644" : "0666" )
));
*/
$this->sr("update/cron.php", "#0770#", (($this->env["has_php_suexec"] !== false) ? "0755" : "0777"));

// allow short passwords
$this->sr("vendor/magento/module-user/Model/UserValidationRules.php", "/->addRule\(\s*.passwordChars,\s*'password'\s*\)/sim", "");

// fix litespeed
$this->sr("pub/static/.htaccess", "/php_flag engine 0/", "#php_flag engine 0");
#}

// fix cookie error after installation
$this->sr("vendor/magento/framework/Stdlib/Cookie/PhpCookieManager.php", "#MAX_NUM_COOKIES\s*=\s*50#", "MAX_NUM_COOKIES = 200"); 

$rngadmin = strtolower(i_lib::randstr(8));

$password = "T0".$rngadmin;
//$payload = array(
//	'db' => array(
//		'useExistingDb' => 1,
//		'useAccess' => 1,
//		'host' => $this->db_host,
//		'user' => $this->db_user,
//		'name' => $this->db_name,
//		'password' => $this->db_pass,
//		'tablePrefix' => $this->db_prefix,
//	),
//	'admin' => array(
//		'passwordStatus' => array(
//			'class' => 'strong',
//			'label' => 'Strong',
//		),
//		'username' => "admin",
//		'email' => "devnull@installatron.com",
//		'password' => $password,
//		'confirm' => $password,
//	),
//	'store' => array(
//		'timezone' => 'UTC',
//		'currency' => 'USD',
//		'language' => 'en_US',
//		'useSampleData' => false,
//		'cleanUpDatabase' => false,
//		'loadedAllModules' => true,
//		'showModulesControl' => true,
//		'selectAll' => false,
//	),
//	'config' => array(
//		'encrypt' => array(
//			'type' => 'user',
//			'key' => isset($this->input["field_enckey"]) ? $this->input["field_enckey"] : md5(uniqid(rand(),true)),
//		),
//		'address' => array(
//			'admin' => $rngadmin,
//		),
//		///config.sessionSave.type
//	),
//);

$payload = array(
	'admin' => array(
		'confirm' => $password,
		'email' => "devnull@installatron.com",
		'password' => $password,
		'passwordStatus'  => array(
			//'class' => "fair",
			//'label' => "Fair",
			'class' => 'strong',
			'label' => 'Strong',
		),
		'username' => "admin",
	),
	'config' => array(
		'address' => array(
			'actual_base_url' => $this->url,
			'admin' => $rngadmin,
			'auto_base_url' => $this->url,
			'base_url' => $this->url,
		),
		'advanced' => array(
			'expanded' => false,
		),
		'encrypt' => array(
			//'key' => null,
			//'type' => "magento",
			'type' => 'user',
			'key' => isset($this->input["field_enckey"]) ? $this->input["field_enckey"] : md5(uniqid(rand(),true)),
		),
		'https' => array(
			'admin' => false,
			'front' => false,
			'text' => $this->url,
		),
		'rewrites' => array(
			'allowed' => true,
		),
		'sessionSave' => array(
			'error' => false,
			'type' => "files",
		),
	),
	'db' => array(
		'host' => $this->db_host,
		'name' => $this->db_name,
		'password' => $this->db_pass,
		'tablePrefix' => $this->db_prefix,
		'useAccess' => 1,
		'useExistingDb' => 1,
		'user' => $this->db_user,
	),
	'store' => array(
		'advanced' => array(
			'expanded' => false,
		),
		'cleanUpDatabase' => false,
		'currency' => "USD",
		'errorFlag' => false,
		'errorMessage' => "",
		'force' => false,
		'language' => "en_US",
		'loadedAllModules' => true,
		'selectAll' => true,
		'showError' => false,
		'showModulesControl' => true,
		'timezone' => "UTC",
		'useSampleData' => false,
		//'allModules' => array(
		//'disabledModules' => array(
		//'selectedModules' => array(
	),
);

$r = $this->fetch("setup/index.php/install/start?".i_lib::json_encode($payload), true);
$this->write(".htinstall.log", $r);

// @NOTE: Rowan's experiments to get Magento locale selection working can be found at this spot in 2.1.7	

if ( strpos($r,'"success":true') === false )
{
	$this->addError("_errors_script");
	return;
}

$this->chmod("var/generation", 0666, 0777, true);

#$this->chmod(array('pub/static'), 0666, 0777, true);
$this->chmod(array('app/etc'), 0644, 0755, true);
//$this->chmod('app/etc', 0755);

// run setup
$this->write("itronsetup.php", '<'.'?php

$_SERVER["argv"] = array("setup:static-content:deploy");
$_SERVER["argc"] = count($_SERVER["argv"]);

try
{
    require __DIR__ . "/app/bootstrap.php";
}
catch (\Exception $e)
{
    echo "Autoload error: " . $e->getMessage();
    exit(1);
}

try
{
    $application = new Magento\Framework\Console\Cli("Magento CLI");
    $application->run();
}
catch (\Exception $e)
{
    while ($e)
    {
        echo $e->getMessage();
        echo $e->getTraceAsString();
        $e = $e->getPrevious();
    }
    exit(1);
}

');
$r = $this->fetch("itronsetup.php", null, null, false);
$this->rm("itronsetup.php");


// run cron
$this->write("itroncron.php", '<'.'?php

$_SERVER["argv"] = array("", "cron:run");
$_SERVER["argc"] = count($_SERVER["argv"]);

try
{
    require __DIR__ . "/app/bootstrap.php";
}
catch (\Exception $e)
{
    echo "Autoload error: " . $e->getMessage();
    exit(1);
}

try
{
    $application = new Magento\Framework\Console\Cli("Magento CLI");
    $application->run();
}
catch (\Exception $e)
{
    while ($e)
    {
        echo $e->getMessage();
        echo $e->getTraceAsString();
        $e = $e->getPrevious();
    }
    exit(1);
}

');
$r = $this->fetch("itroncron.php", null, null, false);
$r = $this->fetch("itroncron.php", null, null, false);//second run, apparently needed
$this->rm("itroncron.php");
$this->chmod('bin/magento', 0744);

?>
	</install>

	<upgrade>
		<?php

$this->extract("main", "upgrtmp");

//@INTERNAL - LEGACY STEP BREAK POINT - DO NOT DISTURB

// @WARNING: Saving from [Version] at the moment will ruin this app's administration link.
//           I will remove this warning when the editor problem is resolved.

$this->rm('upgrtmp/.htaccess');
$this->mv('upgrtmp/*');
$this->rm('upgrtmp');

$hasSuexec = ($this->env["has_php_suexec"] !== false);
$dirChmod = ($hasSuexec) ? "0755" : "0777";
$fileChmod = ($hasSuexec) ? "0644" : "0666";

$this->_reclaim(array('var/cache', 'var/page_cache', 'var/generation'));
$this->rm(array('var/cache', 'var/page_cache', 'var/generation'));
$this->mkdir(array('var/cache', 'var/page_cache', 'var/generation'));
$this->chmod(array('app/etc', 'var', 'vendor', 'pub/media', 'pub/static'), 0666, 0777, true);

// turn off symlinks for images
$this->sr("app/etc/di.xml", "/Symlink/", "Copy");

// chmod fix - only for non-suexec since Magento's 0770/0660 permissions are fine for suexec
#if ( $this->env["has_php_suexec"] === false ) - IT'S NEEDED ACTUALLY FOR SUPHP.
#{
$this->sr("vendor/magento/framework/Filesystem/DriverInterface.php",array(
	"#WRITEABLE_DIRECTORY_MODE = \d+#" => "WRITEABLE_DIRECTORY_MODE = $dirChmod",
	"#WRITEABLE_FILE_MODE = \d+#"      => "WRITEABLE_FILE_MODE = $fileChmod"
));
$this->sr("update/cron.php", "#0770#", "$dirChmod");

// allow short passwords
$this->sr("vendor/magento/module-user/Model/UserValidationRules.php", "/->addRule\(\s*.passwordChars,\s*'password'\s*\)/sim", "");

// fix litespeed
$this->sr("pub/static/.htaccess", "/php_flag engine 0/", "#php_flag engine 0");

// fix cookie error when trying to log into administration
$this->sr("vendor/magento/framework/Stdlib/Cookie/PhpCookieManager.php", "#MAX_NUM_COOKIES\s*=\s*50#", "MAX_NUM_COOKIES = 200"); 

// fix styles
$this->db_query("UPDATE `{$this->db_prefix}core_config_data` SET `value` = ? WHERE `path`='design/head/includes'", array('<link  rel="stylesheet" type="text/css"  media="all" href="'.str_replace(array("http://","https://"),"//",$this->url).'/pub/media/styles.css" />'));


$contents_consoleoutput = $this->read("vendor/symfony/console/Symfony/Component/Console/Output/ConsoleOutput.php");
$this->sr("vendor/symfony/console/Symfony/Component/Console/Output/ConsoleOutput.php", array(
	"/function openOutputStream/" => "function openOutputStream() {return @fopen('.htinstall.deleteme.log','w');} private function _openOutputStream",
	"/function openErrorStream/" => "function openErrorStream() {return @fopen('.htinstall.deleteme.log','w');} private function _openErrorStream",
	#"/(function openErrorStream)/" => "{}() {return @fopen('install.log','w');} {}xx",
));
$this->write(".htinstall.deleteme.log","");
$this->chmod(".htinstall.deleteme.log", 0666); // @todo: should this use $fileChmod ?
$this->chmod('bin/magento', 0744);

// run setup
$this->write("itronsetup.php", '<'.'?php

use Magento\Framework\App\Bootstrap;

require __DIR__ . "/app/bootstrap.php";

$bootstrap = Bootstrap::create(BP, $_SERVER);

$obj = $bootstrap->getObjectManager();

$state = $obj->get("Magento\Framework\App\State");
$state->setAreaCode("adminhtml");
$k[0]="bin/magento";
$k[1]="setup:upgrade"; // write your proper command like setup:upgrade,cache:enable etc...
$_SERVER["argv"]=$k;
try {
	$handler = new \Magento\Framework\App\ErrorHandler();
	set_error_handler([$handler, "handler"]);
	$application = new Magento\Framework\Console\Cli("Magento CLI");
	$application->run();
} catch (\Exception $e) {
	while ($e) {
		echo $e->getMessage();
		echo $e->getTraceAsString();
		echo "\n\n";
		$e = $e->getPrevious();
	}
}
');
$r = $this->fetch("itronsetup.php", null, null, false);
//$this->rm("itronsetup.php");

// run compile
$this->write("itroncompile.php", '<'.'?php

use Magento\Framework\App\Bootstrap;

require __DIR__ . "/app/bootstrap.php";

$bootstrap = Bootstrap::create(BP, $_SERVER);

$obj = $bootstrap->getObjectManager();

$state = $obj->get("Magento\Framework\App\State");
$state->setAreaCode("adminhtml");
$k[0]="bin/magento";
$k[1]="setup:di:compile"; // write your proper command like setup:upgrade,cache:enable etc...
$_SERVER["argv"]=$k;
try {
	$handler = new \Magento\Framework\App\ErrorHandler();
	set_error_handler([$handler, "handler"]);
	$application = new Magento\Framework\Console\Cli("Magento CLI");
	$application->run();
} catch (\Exception $e) {
	while ($e) {
		echo $e->getMessage();
		echo $e->getTraceAsString();
		echo "\n\n";
		$e = $e->getPrevious();
	}
}
');
$r = $this->fetch("itroncompile.php", null, null, false);
//$this->rm("itroncompile.php");

//$this->write("itronsetup.php", '<'.'?php
//
//$_SERVER["argv"] = array("setup:upgrade");
//$_SERVER["argc"] = count($_SERVER["argv"]);
//
//try
//{
//    require __DIR__ . "/app/bootstrap.php";
//}
//catch (\Exception $e)
//{
//    echo "Autoload error: " . $e->getMessage();
//    exit(1);
//}
//
//try
//{
//    $application = new Magento\Framework\Console\Cli("Magento CLI");
//    $application->run();
//}
//catch (\Exception $e)
//{
//    while ($e)
//    {
//        echo $e->getMessage();
//        echo $e->getTraceAsString();
//        $e = $e->getPrevious();
//    }
//    exit(1);
//}
//');
//$r = $this->fetch("itronsetup.php", null, null, false);
//$this->rm("itronsetup.php");

?>
	</upgrade>

</installer>

Copyright 2K16 - 2K18 Indonesian Hacker Rulez