<?xml version="1.0" encoding="utf-8"?>	
<modification>
	<name>DearSoft Smart Sitemap</name>
	<code>DearSoft_sitemap_ac</code>
	<version>1.0</version>
	<author>DearSoft</author>
	<link>https://www.dearsoft.bd</link>

	<!-- OpenCart 2.0 compatibility -->
					
	<file path="system/engine/action.php">
		<operation error="skip">
			<search><![CDATA[is_dir(DIR_APPLICATION . 'controller/' . $path)]]></search>
			<add position="replace"><![CDATA[!in_array($path, array('extension/feed')) && is_dir(DIR_APPLICATION . 'controller/' . $path)]]></add>
		</operation>
	</file>

	<!-- OpenCart 2.3 compatibility -->
					
	<file path="admin/controller/extension/extension/feed.php">
		<operation error="skip">
			<search><![CDATA[$this->load->model('user/user_group');]]></search>
			<add position="after"><![CDATA[
			
			$this->model_user_user_group->addPermission($this->user->getGroupId(), 'access', 'feed/sitemaps');
			$this->model_user_user_group->addPermission($this->user->getGroupId(), 'modify', 'feed/sitemaps');
						
			]]></add>
		</operation>	
		<operation error="skip">
			<search><![CDATA[$data['extensions'][] = array(]]></search>
			<add position="before"><![CDATA[
			
			if (in_array($this->language->get('heading_title'), array_column($data['extensions'], 'name'))) continue;
			
			]]></add>
		</operation>
	</file>
	
	<file path="catalog/controller/event/compatibility.php">
		<operation error="skip">
			<search><![CDATA[&& is_file(DIR_APPLICATION]]></search>
			<add position="replace"><![CDATA[&& !preg_match('/\/sitemaps/', $route) && is_file(DIR_APPLICATION]]></add>
		</operation>
	</file>
				
</modification>