Code Duplication    Length = 16-16 lines in 2 locations

Sources/CacheAPI-memcache.php 1 location

@@ 128-143 (lines=16) @@
125
	/**
126
	 * {@inheritDoc}
127
	 */
128
	public function cacheSettings(array &$config_vars)
129
	{
130
		global $context, $txt;
131
132
		$config_vars[] = $txt['cache_memcache_settings'];
133
		$config_vars[] = array('cache_memcached', $txt['cache_memcache_servers'], 'file', 'text', 0, 'cache_memcached', 'postinput' => '<br><div class="smalltext"><em>' . $txt['cache_memcache_servers_subtext'] . '</em></div>');
134
135
		if (!isset($context['settings_post_javascript']))
136
			$context['settings_post_javascript'] = '';
137
138
		$context['settings_post_javascript'] .= '
139
			$("#cache_accelerator").change(function (e) {
140
				var cache_type = e.currentTarget.value;
141
				$("#cache_memcached").prop("disabled", cache_type != "memcache");
142
			});';
143
	}
144
145
	/**
146
	 * {@inheritDoc}

Sources/CacheAPI-memcached.php 1 location

@@ 131-146 (lines=16) @@
128
	/**
129
	 * {@inheritDoc}
130
	 */
131
	public function cacheSettings(array &$config_vars)
132
	{
133
		global $context, $txt;
134
135
		$config_vars[] = $txt['cache_memcache_settings'];
136
		$config_vars[] = array('cache_memcached', $txt['cache_memcache_servers'], 'file', 'text', 0, 'cache_memcached', 'postinput' => '<br><div class="smalltext"><em>' . $txt['cache_memcache_servers_subtext'] . '</em></div>');
137
138
		if (!isset($context['settings_post_javascript']))
139
			$context['settings_post_javascript'] = '';
140
141
		$context['settings_post_javascript'] .= '
142
			$("#cache_accelerator").change(function (e) {
143
				var cache_type = e.currentTarget.value;
144
				$("#cache_memcached").prop("disabled", cache_type != "memcached");
145
			});';
146
	}
147
148
	/**
149
	 * {@inheritDoc}