<?xml version="1.0" encoding="UTF-8"?>
<modification>
	<name><![CDATA[<i class="fa fa-eye-slash"></i> Скрыть отключенные языки]]></name>
	<code>hidedisabledlangs</code>
	<version>1.0.0</version>
	<author>Pavel Kravchenko</author>
	<link>https://opencartforum.com/profile/711752-paulkravchenko/</link>

	<file path="admin/model/localisation/language.php">
		<operation>
			<search>
				<![CDATA[
					public function getLanguages($data = array()) {
				]]>
			</search>
			<add position="after" trim="true">
				<![CDATA[
		if( !empty( $this->request->get['route'] ) && ( $this->request->get['route'] == 'localisation/language' ) ) {
			$lang_status = '';
		}else{
			$lang_status = ' WHERE status = \'1\'';
		}
		$this->cache->delete( 'language' );
				]]>
			</add>
		</operation>
		<operation>
			<search>
				<![CDATA[
					$sql = "SELECT * FROM " . DB_PREFIX . "language";
				]]>
			</search>
			<add position="replace" trim="true">
				<![CDATA[
					$sql = "SELECT * FROM " . DB_PREFIX . "language" . $lang_status;
				]]>
			</add>
		</operation>
		<operation>
			<search>
				<![CDATA[
					$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "language ORDER BY sort_order, name");
				]]>
			</search>
			<add position="replace">
				<![CDATA[
				if( !empty( $this->request->get['route'] ) && ( $this->request->get['route'] == 'localisation/language' ) ) {
					$lang_status = '';
				}else{
					$lang_status = ' status = \'1\'';
				}

				$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "language WHERE" . $lang_status . " ORDER BY sort_order, name");
				]]>
			</add>
		</operation>
	</file>
</modification>