Index: admin/blog_theme.php
===================================================================
--- admin/blog_theme.php	(revision 2215)
+++ admin/blog_theme.php	(revision 2216)
@@ -16,7 +16,7 @@
 
 # -- "First time" settings setup --
-if ($core->blog->settings->system->repository_theme_url === null) {
+if ($core->blog->settings->system->store_theme_url === null) {
 	$core->blog->settings->system->put(
-		'repository_theme_url', 'http://update.dotaddict.org/dc2/themes.xml', 'string', 'Themes XML feed location', true, true
+		'store_theme_url', 'http://update.dotaddict.org/dc2/themes.xml', 'string', 'Themes XML feed location', true, true
 	);
 }
@@ -30,5 +30,5 @@
 	$core->themes, 
 	$core->blog->themes_path,
-	$core->blog->settings->system->repository_theme_url
+	$core->blog->settings->system->store_theme_url
 );
 $list::$distributed_modules = array(
@@ -132,5 +132,5 @@
 
 	# Updated modules from repo
-	$modules = $list->repository->get(true);
+	$modules = $list->store->get(true);
 	if (!empty($modules)) {
 		echo 
@@ -202,5 +202,5 @@
 	# New modules from repo
 	$search = $list->getSearchQuery();
-	$modules = $search ? $list->repository->search($search) : $list->repository->get();
+	$modules = $search ? $list->store->search($search) : $list->store->get();
 
 	if (!empty($search) || !empty($modules)) {
Index: admin/index.php
===================================================================
--- admin/index.php	(revision 2215)
+++ admin/index.php	(revision 2216)
@@ -126,7 +126,7 @@
 
 # Check plugins and themes update from repository
-function dc_check_repository_update($mod, $url, $img, $icon)
-{
-	$repo = new dcRepository($mod, $url);
+function dc_check_store_update($mod, $url, $img, $icon)
+{
+	$repo = new dcStore($mod, $url);
 	$upd = $repo->get(true);
 	if (!empty($upd)) {
@@ -137,10 +137,10 @@
 }
 if (isset($__dashboard_icons['plugins'])) {
-	dc_check_repository_update($core->plugins, $core->blog->settings->system->repository_plugin_url, 'plugins', $__dashboard_icons['plugins']);
+	dc_check_store_update($core->plugins, $core->blog->settings->system->store_plugin_url, 'plugins', $__dashboard_icons['plugins']);
 }
 if (isset($__dashboard_icons['blog_theme'])) {
 	$themes = new dcThemes($core);
 	$themes->loadModules($core->blog->themes_path, null);
-	dc_check_repository_update($themes, $core->blog->settings->system->repository_theme_url, 'blog-theme', $__dashboard_icons['blog_theme']);
+	dc_check_store_update($themes, $core->blog->settings->system->store_theme_url, 'blog-theme', $__dashboard_icons['blog_theme']);
 }
 
Index: admin/plugins.php
===================================================================
--- admin/plugins.php	(revision 2215)
+++ admin/plugins.php	(revision 2216)
@@ -21,7 +21,7 @@
 	);
 }
-if ($core->blog->settings->system->repository_plugin_url === null) {
+if ($core->blog->settings->system->store_plugin_url === null) {
 	$core->blog->settings->system->put(
-		'repository_plugin_url', 'http://update.dotaddict.org/dc2/plugins.xml', 'string', 'Plugins XML feed location', true, true
+		'store_plugin_url', 'http://update.dotaddict.org/dc2/plugins.xml', 'string', 'Plugins XML feed location', true, true
 	);
 }
@@ -31,5 +31,5 @@
 	$core->plugins, 
 	DC_PLUGINS_ROOT, 
-	$core->blog->settings->system->repository_plugin_url
+	$core->blog->settings->system->store_plugin_url
 );
 
@@ -156,5 +156,5 @@
 
 	# Updated modules from repo
-	$modules = $list->repository->get(true);
+	$modules = $list->store->get(true);
 	if (!empty($modules)) {
 		echo 
@@ -225,5 +225,5 @@
 	# New modules from repo
 	$search = $list->getSearchQuery();
-	$modules = $search ? $list->repository->search($search) : $list->repository->get();
+	$modules = $search ? $list->store->search($search) : $list->store->get();
 
 	if (!empty($search) || !empty($modules)) {
Index: admin/services.php
===================================================================
--- admin/services.php	(revision 2215)
+++ admin/services.php	(revision 2216)
@@ -465,11 +465,11 @@
 		}
 		elseif ($list == 'plugin-new') {
-			$repository = new dcRepository(
+			$store = new dcStore(
 				$core->plugins, 
-				$core->blog->settings->system->repository_plugin_url
+				$core->blog->settings->system->store_plugin_url
 			);
-			$repository->check();
-
-			$modules = $repository->get();
+			$store->check();
+
+			$modules = $store->get();
 			if (empty($modules) || !isset($modules[$id])) {
 				throw new Exception('Unknow module ID');
Index: inc/admin/lib.moduleslist.php
===================================================================
--- inc/admin/lib.moduleslist.php	(revision 2215)
+++ inc/admin/lib.moduleslist.php	(revision 2216)
@@ -16,5 +16,5 @@
 	public $core;
 	public $modules;
-	public $repository;
+	public $store;
 
 	public static $allow_multi_install = false;
@@ -47,5 +47,5 @@
 		$this->core = $modules->core;
 		$this->modules = $modules;
-		$this->repository = new dcRepository($modules, $xml_url);
+		$this->store = new dcStore($modules, $xml_url);
 
 		$this->setPathInfo($modules_root);
@@ -231,4 +231,5 @@
 	}
 
+	/** @todo Use new mesasge system **/
 	public function displayMessage($action)
 	{
@@ -487,5 +488,5 @@
 				} break;
 
-				# Install (from repository)
+				# Install (from store)
 				case 'install': if ($this->path_writable) {
 					$submits[] = 
@@ -493,5 +494,5 @@
 				} break;
 
-				# Update (from repository)
+				# Update (from store)
 				case 'update': if ($this->path_writable) {
 					$submits[] = 
@@ -591,5 +592,5 @@
 			elseif (!empty($_POST['install'])) {
 
-				$updated = $this->repository->get();
+				$updated = $this->store->get();
 				if (!isset($updated[$id])) {
 					throw new Exception(__('No such module.'));
@@ -604,5 +605,5 @@
 				$this->core->callBehavior($prefix.'BeforeAdd', $module);
 
-				$ret_code = $this->repository->process($module['file'], $dest);
+				$ret_code = $this->store->process($module['file'], $dest);
 
 				# --BEHAVIOR-- moduleAfterAdd
@@ -614,5 +615,5 @@
 			elseif (!empty($_POST['update'])) {
 
-				$updated = $repository->get();
+				$updated = $store->get();
 				if (!isset($updated[$id])) {
 					throw new Exception(__('No such module.'));
@@ -639,5 +640,5 @@
 				$this->core->callBehavior($prefix.'BeforeUpdate', $module);
 
-				$this->repository->process($module['file'], $dest);
+				$this->store->process($module['file'], $dest);
 
 				# --BEHAVIOR-- moduleAfterUpdate
@@ -666,5 +667,5 @@
 				$url = urldecode($_POST['pkg_url']);
 				$dest = $this->getPath().'/'.basename($url);
-				$this->repository->download($url, $dest);
+				$this->store->download($url, $dest);
 			}
 
@@ -672,5 +673,5 @@
 			$this->core->callBehavior($prefix.'BeforeAdd', null);
 
-			$ret_code = $this->repository->install($dest);
+			$ret_code = $this->store->install($dest);
 
 			# --BEHAVIOR-- moduleAfterAdd
@@ -861,5 +862,5 @@
 			$has_parent = !empty($module['parent']);
 			if ($has_parent) {
-				$is_parent_present = $this->core->themes->moduleExists($parent);
+				$is_parent_present = $this->modules->moduleExists($parent);
 			}
 
Index: nc/core/class.dc.repository.parser.php
===================================================================
--- inc/core/class.dc.repository.parser.php	(revision 2214)
+++ 	(revision )
@@ -1,105 +1,0 @@
-<?php
-# -- BEGIN LICENSE BLOCK ---------------------------------------
-#
-# This file is part of Dotclear 2.
-#
-# Copyright (c) 2003-2013 Olivier Meunier & Association Dotclear
-# Licensed under the GPL version 2.0 license.
-# See LICENSE file or
-# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
-#
-# -- END LICENSE BLOCK -----------------------------------------
-if (!defined('DC_RC_PATH')) { return; }
-
-/**
-@ingroup DC_CORE
-@brief Repository modules XML feed parser
-
-Provides an object to parse XML feed of modules from a repository.
-*/
-class dcRepositoryParser
-{
-	/** @var	object	XML object of feed contents */
-	protected $xml;
-	/** @var	array	Array of feed contents */
-	protected $items;
-	/** @var	string	XML bloc tag */
-	protected static $bloc = 'http://dotaddict.org/da/';
-
-	/**
-	 * Constructor.
-	 *
-	 * @param	string		Feed content
-	 */
-	public function __construct($data)
-	{
-		if (!is_string($data)) {
-			throw new Exception(__('Failed to read data feed'));
-		}
-
-		$this->xml = simplexml_load_string($data);
-		$this->items = array();
-
-		if ($this->xml === false) {
-			throw new Exception(__('Wrong data feed'));
-		}
-
-		$this->_parse();
-
-		unset($data);
-		unset($this->xml);
-	}
-
-	/**
-	 * Parse XML into array
-	 */
-	protected function _parse()
-	{
-		if (empty($this->xml->module)) {
-			return;
-		}
-
-		foreach ($this->xml->module as $i) {
-			$attrs = $i->attributes();
-
-			$item = array();
-
-			# DC/DA shared markers
-			$item['id']		= (string) $attrs['id'];
-			$item['file']		= (string) $i->file;
-			$item['label']		= (string) $i->name; // deprecated
-			$item['name']		= (string) $i->name;
-			$item['version']	= (string) $i->version;
-			$item['author']	= (string) $i->author;
-			$item['desc']		= (string) $i->desc;
-
-			# DA specific markers
-			$item['dc_min'] 	= (string) $i->children(self::$bloc)->dcmin;
-			$item['details'] 	= (string) $i->children(self::$bloc)->details;
-			$item['section'] 	= (string) $i->children(self::$bloc)->section;
-			$item['support'] 	= (string) $i->children(self::$bloc)->support;
-			$item['sshot']		= (string) $i->children(self::$bloc)->sshot;
-
-			$tags = array();
-			foreach($i->children(self::$bloc)->tags as $t) {
-				$tags[] = (string) $t->tag;
-			}
-			$item['tags']		= implode(', ',$tags);
-			
-			# First filter right now. If DC_DEV is set all modules are parse
-			if (defined('DC_DEV') && DC_DEV === true || version_compare(DC_VERSION,$item['dc_min'],'>=')) {
-				$this->items[$item['id']] = $item;
-			}
-		}
-	}
-
-	/**
-	 * Get modules.
-	 *
-	 * @return	array		Modules list
-	 */
-	public function getModules()
-	{
-		return $this->items;
-	}
-}
Index: nc/core/class.dc.repository.php
===================================================================
--- inc/core/class.dc.repository.php	(revision 2215)
+++ 	(revision )
@@ -1,262 +1,0 @@
-<?php
-# -- BEGIN LICENSE BLOCK ---------------------------------------
-#
-# This file is part of Dotclear 2.
-#
-# Copyright (c) 2003-2013 Olivier Meunier & Association Dotclear
-# Licensed under the GPL version 2.0 license.
-# See LICENSE file or
-# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
-#
-# -- END LICENSE BLOCK -----------------------------------------
-if (!defined('DC_RC_PATH')) { return; }
-
-/**
-@ingroup DC_CORE
-@brief Repository modules XML feed reader
-
-Provides an object to parse XML feed of modules from repository.
-*/
-class dcRepository
-{
-	/** @var	object	dcCore instance */
-	public $core;
-	/** @var	object	dcModules instance */
-	public $modules;
-
-	/** @var	string	User agent used to query repository */
-	protected $user_agent = 'DotClear.org RepoBrowser/0.1';
-	/** @var	string	XML feed URL */
-	protected $xml_url;
-	/** @var	array	Array of new/update modules from repository */
-	protected $data;
-
-	/**
-	 * Constructor.
-	 *
-	 * @param	object	$modules		dcModules instance
-	 * @param	string	$xml_url		XML feed URL
-	 */
-	public function __construct(dcModules $modules, $xml_url)
-	{
-		$this->core = $modules->core;
-		$this->modules = $modules;
-		$this->xml_url = $xml_url;
-		$this->user_agent = sprintf('Dotclear/%s)', DC_VERSION);
-
-		$this->check();
-	}
-
-	/**
-	 * Check repository.
-	 *
-	 * @param	boolean	$force		Force query repository
-	 * @return	boolean	True if get feed or cache
-	 */
-	public function check($force=false)
-	{
-		if (!$this->xml_url) {
-			return false;
-		}
-		if (($parser = dcRepositoryReader::quickParse($this->xml_url, DC_TPL_CACHE, $force)) === false) {
-			return false;
-		}
-
-		$raw_datas = $parser->getModules();
-
-		uasort($raw_datas, array('self','sort'));
-
-		$skipped = array_keys($this->modules->getDisabledModules());
-		foreach ($skipped as $p_id) {
-			if (isset($raw_datas[$p_id])) {
-				unset($raw_datas[$p_id]);
-			}
-		}
-
-		$updates = array();
-		$current = $this->modules->getModules();
-		foreach ($current as $p_id => $p_infos) {
-			if (isset($raw_datas[$p_id])) {
-				if (self::compare($raw_datas[$p_id]['version'],$p_infos['version'],'>')) {
-					$updates[$p_id] = $raw_datas[$p_id];
-					$updates[$p_id]['root'] = $p_infos['root'];
-					$updates[$p_id]['root_writable'] = $p_infos['root_writable'];
-					$updates[$p_id]['current_version'] = $p_infos['version'];
-				}
-				unset($raw_datas[$p_id]);
-			}
-		}
-
-		$this->data = array(
-			'new'	=> $raw_datas,
-			'update'	=> $updates
-		);
-
-		return true;
-	}
-
-	/**
-	 * Get a list of modules.
-	 *
-	 * @param	boolean	$update	True to get update modules, false for new ones
-	 * @return	array	List of update/new modules
-	 */
-	public function get($update=false)
-	{
-		return $this->data[$update ? 'update' : 'new'];
-	}
-
-	/**
-	 * Search a module.
-	 *
-	 * Search string is cleaned, split and compare to split:
-	 * - module id and clean id,
-	 * - module name, clean name,
-	 * - module desccription.
-	 *
-	 * Every time a part of query is find on module,
-	 * result accuracy grow. Result is sorted by acuracy.
-	 *
-	 * @param	string	$pattern	String to search
-	 * @return	array	Match modules
-	 */
-	public function search($pattern)
-	{
-		$result = array();
-
-		# Split query into small clean words
-		$patterns = explode(' ', $pattern);
-		array_walk($patterns, array('dcRepository','sanitize'));
-
-		# For each modules
-		foreach ($this->data['new'] as $id => $module) {
-
-			# Split modules infos into small clean word
-			$subjects = explode(' ', $id.' '.$module['name'].' '.$module['desc']);
-			array_walk($subjects, array('dcRepository','sanitize'));
-
-			# Check contents
-			if (!($nb = preg_match_all('/('.implode('|', $patterns).')/', implode(' ', $subjects), $_))) {
-				continue;
-			}
-
-			# Add module to result
-			if (!isset($sorter[$id])) {
-				$sorter[$id] = 0;
-				$result[$id] = $module;
-			}
-
-			# Increment matches count
-			$sorter[$id] += $nb;
-			$result[$id]['accuracy'] = $sorter[$id];
-		}
-		# Sort response by matches count
-		if (!empty($result)) {
-			array_multisort($sorter, SORT_DESC, $result);
-		}
-		return $result;
-	}
-
-	/**
-	 * Quick download and install module.
-	 *
-	 * @param	string	$url	Module package URL
-	 * @param	string	$dest	Path to install module
-	 * @return	integer		1 = installed, 2 = update
-	 */
-	public function process($url, $dest)
-	{
-		$this->download($url, $dest);
-		return $this->install($dest);
-	}
-
-	/**
-	 * Download a module.
-	 *
-	 * @param	string	$url	Module package URL
-	 * @param	string	$dest	Path to put module package
-	 */
-	public function download($url, $dest)
-	{
-		try {
-			$client = netHttp::initClient($url, $path);
-			$client->setUserAgent(self::agent());
-			$client->useGzip(false);
-			$client->setPersistReferers(false);
-			$client->setOutput($dest);
-			$client->get($path);
-			unset($client);
-		}
-		catch (Exception $e) {
-			unset($client);
-			throw new Exception(__('An error occurred while downloading the file.'));
-		}
-	}
-
-	/**
-	 * Install a previously downloaded module.
-	 *
-	 * @param	string	$path	Module package URL
-	 * @param	string	$path	Path to module package
-	 * @return	integer		1 = installed, 2 = update
-	 */
-	public function install($path)
-	{
-		return dcModules::installPackage($path, $this->modules);
-	}
-
-	/**
-	 * User Agent String.
-	 *
-	 * @param	string	$str		User agent string
-	 */
-	public function agent($str)
-	{
-		$this->user_agent = $str;
-	}
-
-	/**
-	 * Sanitize string.
-	 *
-	 * @param	string	$str		String to sanitize
-	 * @param	null	$_		Unused	param
-	 */
-	public static function sanitize(&$str, $_)
-	{
-		$str = strtolower(preg_replace('/[^A-Za-z0-9]/', '', $str));
-	}
-
-	/**
-	 * Compare version.
-	 *
-	 * @param	string	$v1		Version
-	 * @param	string	$v2		Version
-	 * @param	string	$op		Comparison operator
-	 * @return	boolean	True is comparison is true, dude!
-	 */
-	private static function compare($v1, $v2, $op)
-	{
-		return version_compare(
-			preg_replace('!-r(\d+)$!', '-p$1', $v1), 
-			preg_replace('!-r(\d+)$!', '-p$1', $v2), 
-			$op
-		);
-	}
-
-	/** 
-	 * Sort modules list.
-	 *
-	 * @param	array	$a		A module
-	 * @param	array	$b		A module
-	 * @return	integer
-	 */
-	private static function sort($a,$b)
-	{
-		$c = strtolower($a['id']); 
-		$d = strtolower($b['id']); 
-		if ($c == $d) { 
-			return 0; 
-		} 
-		return ($c < $d) ? -1 : 1; 
-	}
-}
Index: nc/core/class.dc.repository.reader.php
===================================================================
--- inc/core/class.dc.repository.reader.php	(revision 2214)
+++ 	(revision )
@@ -1,266 +1,0 @@
-<?php
-# -- BEGIN LICENSE BLOCK ---------------------------------------
-#
-# This file is part of Dotclear 2.
-#
-# Copyright (c) 2003-2013 Olivier Meunier & Association Dotclear
-# Licensed under the GPL version 2.0 license.
-# See LICENSE file or
-# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
-#
-# -- END LICENSE BLOCK -----------------------------------------
-if (!defined('DC_RC_PATH')) { return; }
-
-/**
-@ingroup DC_CORE
-@brief Repository modules XML feed reader
-
-Provides an object to parse XML feed of modules from repository.
-This class extends clearbricks netHttp class.
-*/
-class dcRepositoryReader extends netHttp
-{
-	/** @var	string	User agent used to query repository */
-	protected $user_agent = 'DotClear.org RepoBrowser/0.1';
-	/** @var	integer	User agent used to query repository */
-	protected $timeout = 5;
-	/** @var	array	 HTTP Cache validators */
-	protected $validators = null;
-	/** @var	string	Cache temporary directory */
-	protected $cache_dir = null;
-	/** @var	string	Cache file prefix */
-	protected $cache_file_prefix = 'dcrepo';
-	/** @var	integer	Cache TTL */
-	protected $cache_ttl = '-30 minutes';
-	/** @var	boolean	'Cache' TTL on server failed */
-	protected $cache_touch_on_fail = true;
-	/** @var	boolean	Force query server */
-	protected $force = false;
-
-	/**
-	 * Constructor.
-	 *
-	 * Bypass first argument of clearbricks netHttp constructor.
-	 */
-	public function __construct()
-	{
-		parent::__construct('');
-		$this->setUserAgent(sprintf('Dotclear/%s)', DC_VERSION));
-	}
-
-	/**
-	 * Parse modules feed.
-	 *
-	 * @param	string	$url		XML feed URL
-	 * @return	object	dcRepository instance
-	 */
-	public function parse($url)
-	{
-		$this->validators = array();
-
-		if ($this->cache_dir) {
-			return $this->withCache($url);
-		}
-		elseif (!$this->getModulesXML($url) || $this->getStatus() != '200') {
-			return false;
-		}
-
-		return new dcRepositoryParser($this->getContent());
-	}
-
-	/**
-	 * Quick parse modules feed.
-	 *
-	 * @param	string	$url		XML feed URL
-	 * @param	string	$cache_dir	Cache directoy or null for no cache
-	 * @param	boolean	$force		Force query repository
-	 * @return	object	Self instance
-	 */
-	public static function quickParse($url, $cache_dir=null, $force=false)
-	{
-		$parser = new self();
-		if ($cache_dir) {
-			$parser->setCacheDir($cache_dir);
-		}
-		if ($force) {
-			$parser->setForce($force);
-		}
-
-		return $parser->parse($url);
-	}
-
-	/**
-	 * Set cache directory.
-	 *
-	 * @param	string	$dir		Cache directory
-	 * @return	boolean	True if cache dierctory is useable
-	 */
-	public function setCacheDir($dir)
-	{
-		$this->cache_dir = null;
-
-		if (!empty($dir) && is_dir($dir) && is_writeable($dir)) {
-			$this->cache_dir = $dir;
-			return true;
-		}
-
-		return false;
-	}
-
-	/**
-	 * Set cache TTL.
-	 *
-	 * @param	string	$str		Cache TTL
-	 */
-	public function setCacheTTL($str)
-	{
-		$str = trim($str);
-
-		if (!empty($str)) {
-			$this->cache_ttl = substr($str, 0, 1) == '-' ? $str : '-'.$str;
-		}
-	}
-
-	/**
-	 * Set force query reposiory.
-	 *
-	 * @param	boolean	$force	True to force query
-	 */
-	public function setForce($force)
-	{
-		$this->force = $force;
-	}
-
-	/**
-	 * Get repository XML feed URL content.
-	 *
-	 * @param	string	$url		XML feed URL
-	 * @return	string	Feed content
-	 */
-	protected function getModulesXML($url)
-	{
-		if (!self::readURL($url, $ssl, $host, $port, $path, $user, $pass)) {
-			return false;
-		}
-		$this->setHost($host, $port);
-		$this->useSSL($ssl);
-		$this->setAuthorization($user, $pass);
-
-		return $this->get($path);
-	}
-
-	/**
-	 * Get repository modules list using cache.
-	 *
-	 * @param	string	$url		XML feed URL
-	 * @return	array	Feed content or False on fail
-	 */
-	protected function withCache($url)
-	{
-		$url_md5 = md5($url);
-		$cached_file = sprintf('%s/%s/%s/%s/%s.ser',
-			$this->cache_dir,
-			$this->cache_file_prefix,
-			substr($url_md5,0,2),
-			substr($url_md5,2,2),
-			$url_md5
-		);
-
-		$may_use_cached = false;
-
-		# Use cache file ?
-		if (@file_exists($cached_file) && !$this->force) {
-			$may_use_cached = true;
-			$ts = @filemtime($cached_file);
-			if ($ts > strtotime($this->cache_ttl)) {
-				# Direct cache
-				return unserialize(file_get_contents($cached_file));
-			}
-			$this->setValidator('IfModifiedSince', $ts);
-		}
-
-		# Query repository
-		if (!$this->getModulesXML($url)) {
-			if ($may_use_cached) {
-				# Touch cache TTL even if query failed ?
-				if ($this->cache_touch_on_fail) {
-					@files::touch($cached_file);
-				}
-				# Connection failed - fetched from cache
-				return unserialize(file_get_contents($cached_file));
-			}
-			return false;
-		}
-
-		# Parse response
-		switch ($this->getStatus())
-		{
-			# Not modified, use cache
-			case '304':
-				@files::touch($cached_file);
-				return unserialize(file_get_contents($cached_file));
-			# Ok, parse feed
-			case '200':
-				if ($modules = new dcRepositoryParser($this->getContent())) {
-					try {
-						files::makeDir(dirname($cached_file), true);
-					}
-					catch (Exception $e) {
-						return $modules;
-					}
-
-					if (($fp = @fopen($cached_file, 'wb'))) {
-						fwrite($fp, serialize($modules));
-						fclose($fp);
-						files::inheritChmod($cached_file);
-					}
-					return $modules;
-				}
-		}
-
-		return false;
-	}
-
-	/**
-	 * Prepare query.
-	 *
-	 * @return	array	Query headers
-	 */
-	protected function buildRequest()
-	{
-		$headers = parent::buildRequest();
-
-		# Cache validators
-		if (!empty($this->validators)) {
-			if (isset($this->validators['IfModifiedSince'])) {
-				$headers[] = 'If-Modified-Since: '.$this->validators['IfModifiedSince'];
-			}
-			if (isset($this->validators['IfNoneMatch'])) {
-				if (is_array($this->validators['IfNoneMatch'])) {
-					$etags = implode(',', $this->validators['IfNoneMatch']);
-				}
-				else {
-					$etags = $this->validators['IfNoneMatch'];
-				}
-				$headers[] = '';
-			}
-		}
-
-		return $headers;
-	}
-
-	/**
-	 * Tweak query cache validator.
-	 *
-	 * @param	string	$key		Validator key
-	 * @param	string	$value		Validator value
-	 */
-	private function setValidator($key, $value)
-	{
-		if ($key == 'IfModifiedSince') {
-			$value = gmdate('D, d M Y H:i:s', $value).' GMT';
-		}
-
-		$this->validators[$key] = $value;
-	}
-}
Index: inc/core/class.dc.store.parser.php
===================================================================
--- inc/core/class.dc.store.parser.php	(revision 2216)
+++ inc/core/class.dc.store.parser.php	(revision 2216)
@@ -0,0 +1,105 @@
+<?php
+# -- BEGIN LICENSE BLOCK ---------------------------------------
+#
+# This file is part of Dotclear 2.
+#
+# Copyright (c) 2003-2013 Olivier Meunier & Association Dotclear
+# Licensed under the GPL version 2.0 license.
+# See LICENSE file or
+# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
+#
+# -- END LICENSE BLOCK -----------------------------------------
+if (!defined('DC_RC_PATH')) { return; }
+
+/**
+@ingroup DC_CORE
+@brief Repository modules XML feed parser
+
+Provides an object to parse XML feed of modules from a repository.
+*/
+class dcStoreParser
+{
+	/** @var	object	XML object of feed contents */
+	protected $xml;
+	/** @var	array	Array of feed contents */
+	protected $items;
+	/** @var	string	XML bloc tag */
+	protected static $bloc = 'http://dotaddict.org/da/';
+
+	/**
+	 * Constructor.
+	 *
+	 * @param	string	$data		Feed content
+	 */
+	public function __construct($data)
+	{
+		if (!is_string($data)) {
+			throw new Exception(__('Failed to read data feed'));
+		}
+
+		$this->xml = simplexml_load_string($data);
+		$this->items = array();
+
+		if ($this->xml === false) {
+			throw new Exception(__('Wrong data feed'));
+		}
+
+		$this->_parse();
+
+		unset($data);
+		unset($this->xml);
+	}
+
+	/**
+	 * Parse XML into array
+	 */
+	protected function _parse()
+	{
+		if (empty($this->xml->module)) {
+			return;
+		}
+
+		foreach ($this->xml->module as $i) {
+			$attrs = $i->attributes();
+
+			$item = array();
+
+			# DC/DA shared markers
+			$item['id']		= (string) $attrs['id'];
+			$item['file']		= (string) $i->file;
+			$item['label']		= (string) $i->name; // deprecated
+			$item['name']		= (string) $i->name;
+			$item['version']	= (string) $i->version;
+			$item['author']	= (string) $i->author;
+			$item['desc']		= (string) $i->desc;
+
+			# DA specific markers
+			$item['dc_min'] 	= (string) $i->children(self::$bloc)->dcmin;
+			$item['details'] 	= (string) $i->children(self::$bloc)->details;
+			$item['section'] 	= (string) $i->children(self::$bloc)->section;
+			$item['support'] 	= (string) $i->children(self::$bloc)->support;
+			$item['sshot']		= (string) $i->children(self::$bloc)->sshot;
+
+			$tags = array();
+			foreach($i->children(self::$bloc)->tags as $t) {
+				$tags[] = (string) $t->tag;
+			}
+			$item['tags']		= implode(', ',$tags);
+			
+			# First filter right now. If DC_DEV is set all modules are parse
+			if (defined('DC_DEV') && DC_DEV === true || version_compare(DC_VERSION,$item['dc_min'],'>=')) {
+				$this->items[$item['id']] = $item;
+			}
+		}
+	}
+
+	/**
+	 * Get modules.
+	 *
+	 * @return	array		Modules list
+	 */
+	public function getModules()
+	{
+		return $this->items;
+	}
+}
Index: inc/core/class.dc.store.php
===================================================================
--- inc/core/class.dc.store.php	(revision 2216)
+++ inc/core/class.dc.store.php	(revision 2216)
@@ -0,0 +1,262 @@
+<?php
+# -- BEGIN LICENSE BLOCK ---------------------------------------
+#
+# This file is part of Dotclear 2.
+#
+# Copyright (c) 2003-2013 Olivier Meunier & Association Dotclear
+# Licensed under the GPL version 2.0 license.
+# See LICENSE file or
+# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
+#
+# -- END LICENSE BLOCK -----------------------------------------
+if (!defined('DC_RC_PATH')) { return; }
+
+/**
+@ingroup DC_CORE
+@brief Repository modules XML feed reader
+
+Provides an object to parse XML feed of modules from repository.
+*/
+class dcStore
+{
+	/** @var	object	dcCore instance */
+	public $core;
+	/** @var	object	dcModules instance */
+	public $modules;
+
+	/** @var	string	User agent used to query repository */
+	protected $user_agent = 'DotClear.org RepoBrowser/0.1';
+	/** @var	string	XML feed URL */
+	protected $xml_url;
+	/** @var	array	Array of new/update modules from repository */
+	protected $data;
+
+	/**
+	 * Constructor.
+	 *
+	 * @param	object	$modules		dcModules instance
+	 * @param	string	$xml_url		XML feed URL
+	 */
+	public function __construct(dcModules $modules, $xml_url)
+	{
+		$this->core = $modules->core;
+		$this->modules = $modules;
+		$this->xml_url = $xml_url;
+		$this->user_agent = sprintf('Dotclear/%s)', DC_VERSION);
+
+		$this->check();
+	}
+
+	/**
+	 * Check repository.
+	 *
+	 * @param	boolean	$force		Force query repository
+	 * @return	boolean	True if get feed or cache
+	 */
+	public function check($force=false)
+	{
+		if (!$this->xml_url) {
+			return false;
+		}
+		if (($parser = dcStoreReader::quickParse($this->xml_url, DC_TPL_CACHE, $force)) === false) {
+			return false;
+		}
+
+		$raw_datas = $parser->getModules();
+
+		uasort($raw_datas, array('self','sort'));
+
+		$skipped = array_keys($this->modules->getDisabledModules());
+		foreach ($skipped as $p_id) {
+			if (isset($raw_datas[$p_id])) {
+				unset($raw_datas[$p_id]);
+			}
+		}
+
+		$updates = array();
+		$current = $this->modules->getModules();
+		foreach ($current as $p_id => $p_infos) {
+			if (isset($raw_datas[$p_id])) {
+				if (self::compare($raw_datas[$p_id]['version'],$p_infos['version'],'>')) {
+					$updates[$p_id] = $raw_datas[$p_id];
+					$updates[$p_id]['root'] = $p_infos['root'];
+					$updates[$p_id]['root_writable'] = $p_infos['root_writable'];
+					$updates[$p_id]['current_version'] = $p_infos['version'];
+				}
+				unset($raw_datas[$p_id]);
+			}
+		}
+
+		$this->data = array(
+			'new'	=> $raw_datas,
+			'update'	=> $updates
+		);
+
+		return true;
+	}
+
+	/**
+	 * Get a list of modules.
+	 *
+	 * @param	boolean	$update	True to get update modules, false for new ones
+	 * @return	array	List of update/new modules
+	 */
+	public function get($update=false)
+	{
+		return $this->data[$update ? 'update' : 'new'];
+	}
+
+	/**
+	 * Search a module.
+	 *
+	 * Search string is cleaned, split and compare to split:
+	 * - module id and clean id,
+	 * - module name, clean name,
+	 * - module desccription.
+	 *
+	 * Every time a part of query is find on module,
+	 * result accuracy grow. Result is sorted by accuracy.
+	 *
+	 * @param	string	$pattern	String to search
+	 * @return	array	Match modules
+	 */
+	public function search($pattern)
+	{
+		$result = array();
+
+		# Split query into small clean words
+		$patterns = explode(' ', $pattern);
+		array_walk($patterns, array('dcStore','sanitize'));
+
+		# For each modules
+		foreach ($this->data['new'] as $id => $module) {
+
+			# Split modules infos into small clean word
+			$subjects = explode(' ', $id.' '.$module['name'].' '.$module['desc']);
+			array_walk($subjects, array('dcStore','sanitize'));
+
+			# Check contents
+			if (!($nb = preg_match_all('/('.implode('|', $patterns).')/', implode(' ', $subjects), $_))) {
+				continue;
+			}
+
+			# Add module to result
+			if (!isset($sorter[$id])) {
+				$sorter[$id] = 0;
+				$result[$id] = $module;
+			}
+
+			# Increment matches count
+			$sorter[$id] += $nb;
+			$result[$id]['accuracy'] = $sorter[$id];
+		}
+		# Sort response by matches count
+		if (!empty($result)) {
+			array_multisort($sorter, SORT_DESC, $result);
+		}
+		return $result;
+	}
+
+	/**
+	 * Quick download and install module.
+	 *
+	 * @param	string	$url	Module package URL
+	 * @param	string	$dest	Path to install module
+	 * @return	integer		1 = installed, 2 = update
+	 */
+	public function process($url, $dest)
+	{
+		$this->download($url, $dest);
+		return $this->install($dest);
+	}
+
+	/**
+	 * Download a module.
+	 *
+	 * @param	string	$url	Module package URL
+	 * @param	string	$dest	Path to put module package
+	 */
+	public function download($url, $dest)
+	{
+		try {
+			$client = netHttp::initClient($url, $path);
+			$client->setUserAgent(self::agent());
+			$client->useGzip(false);
+			$client->setPersistReferers(false);
+			$client->setOutput($dest);
+			$client->get($path);
+			unset($client);
+		}
+		catch (Exception $e) {
+			unset($client);
+			throw new Exception(__('An error occurred while downloading the file.'));
+		}
+	}
+
+	/**
+	 * Install a previously downloaded module.
+	 *
+	 * @param	string	$path	Module package URL
+	 * @param	string	$path	Path to module package
+	 * @return	integer		1 = installed, 2 = update
+	 */
+	public function install($path)
+	{
+		return dcModules::installPackage($path, $this->modules);
+	}
+
+	/**
+	 * User Agent String.
+	 *
+	 * @param	string	$str		User agent string
+	 */
+	public function agent($str)
+	{
+		$this->user_agent = $str;
+	}
+
+	/**
+	 * Sanitize string.
+	 *
+	 * @param	string	$str		String to sanitize
+	 * @param	null	$_		Unused	param
+	 */
+	public static function sanitize(&$str, $_)
+	{
+		$str = strtolower(preg_replace('/[^A-Za-z0-9]/', '', $str));
+	}
+
+	/**
+	 * Compare version.
+	 *
+	 * @param	string	$v1		Version
+	 * @param	string	$v2		Version
+	 * @param	string	$op		Comparison operator
+	 * @return	boolean	True is comparison is true, dude!
+	 */
+	private static function compare($v1, $v2, $op)
+	{
+		return version_compare(
+			preg_replace('!-r(\d+)$!', '-p$1', $v1), 
+			preg_replace('!-r(\d+)$!', '-p$1', $v2), 
+			$op
+		);
+	}
+
+	/** 
+	 * Sort modules list.
+	 *
+	 * @param	array	$a		A module
+	 * @param	array	$b		A module
+	 * @return	integer
+	 */
+	private static function sort($a,$b)
+	{
+		$c = strtolower($a['id']); 
+		$d = strtolower($b['id']); 
+		if ($c == $d) { 
+			return 0; 
+		} 
+		return ($c < $d) ? -1 : 1; 
+	}
+}
Index: inc/core/class.dc.store.reader.php
===================================================================
--- inc/core/class.dc.store.reader.php	(revision 2216)
+++ inc/core/class.dc.store.reader.php	(revision 2216)
@@ -0,0 +1,266 @@
+<?php
+# -- BEGIN LICENSE BLOCK ---------------------------------------
+#
+# This file is part of Dotclear 2.
+#
+# Copyright (c) 2003-2013 Olivier Meunier & Association Dotclear
+# Licensed under the GPL version 2.0 license.
+# See LICENSE file or
+# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
+#
+# -- END LICENSE BLOCK -----------------------------------------
+if (!defined('DC_RC_PATH')) { return; }
+
+/**
+@ingroup DC_CORE
+@brief Repository modules XML feed reader
+
+Provides an object to parse XML feed of modules from repository.
+This class extends clearbricks netHttp class.
+*/
+class dcStoreReader extends netHttp
+{
+	/** @var	string	User agent used to query repository */
+	protected $user_agent = 'DotClear.org RepoBrowser/0.1';
+	/** @var	integer	User agent used to query repository */
+	protected $timeout = 5;
+	/** @var	array	 HTTP Cache validators */
+	protected $validators = null;
+	/** @var	string	Cache temporary directory */
+	protected $cache_dir = null;
+	/** @var	string	Cache file prefix */
+	protected $cache_file_prefix = 'dcrepo';
+	/** @var	integer	Cache TTL */
+	protected $cache_ttl = '-30 minutes';
+	/** @var	boolean	'Cache' TTL on server failed */
+	protected $cache_touch_on_fail = true;
+	/** @var	boolean	Force query server */
+	protected $force = false;
+
+	/**
+	 * Constructor.
+	 *
+	 * Bypass first argument of clearbricks netHttp constructor.
+	 */
+	public function __construct()
+	{
+		parent::__construct('');
+		$this->setUserAgent(sprintf('Dotclear/%s)', DC_VERSION));
+	}
+
+	/**
+	 * Parse modules feed.
+	 *
+	 * @param	string	$url		XML feed URL
+	 * @return	object	dcStore instance
+	 */
+	public function parse($url)
+	{
+		$this->validators = array();
+
+		if ($this->cache_dir) {
+			return $this->withCache($url);
+		}
+		elseif (!$this->getModulesXML($url) || $this->getStatus() != '200') {
+			return false;
+		}
+
+		return new dcStoreParser($this->getContent());
+	}
+
+	/**
+	 * Quick parse modules feed.
+	 *
+	 * @param	string	$url		XML feed URL
+	 * @param	string	$cache_dir	Cache directoy or null for no cache
+	 * @param	boolean	$force		Force query repository
+	 * @return	object	Self instance
+	 */
+	public static function quickParse($url, $cache_dir=null, $force=false)
+	{
+		$parser = new self();
+		if ($cache_dir) {
+			$parser->setCacheDir($cache_dir);
+		}
+		if ($force) {
+			$parser->setForce($force);
+		}
+
+		return $parser->parse($url);
+	}
+
+	/**
+	 * Set cache directory.
+	 *
+	 * @param	string	$dir		Cache directory
+	 * @return	boolean	True if cache dierctory is useable
+	 */
+	public function setCacheDir($dir)
+	{
+		$this->cache_dir = null;
+
+		if (!empty($dir) && is_dir($dir) && is_writeable($dir)) {
+			$this->cache_dir = $dir;
+			return true;
+		}
+
+		return false;
+	}
+
+	/**
+	 * Set cache TTL.
+	 *
+	 * @param	string	$str		Cache TTL
+	 */
+	public function setCacheTTL($str)
+	{
+		$str = trim($str);
+
+		if (!empty($str)) {
+			$this->cache_ttl = substr($str, 0, 1) == '-' ? $str : '-'.$str;
+		}
+	}
+
+	/**
+	 * Set force query repository.
+	 *
+	 * @param	boolean	$force	True to force query
+	 */
+	public function setForce($force)
+	{
+		$this->force = $force;
+	}
+
+	/**
+	 * Get repository XML feed URL content.
+	 *
+	 * @param	string	$url		XML feed URL
+	 * @return	string	Feed content
+	 */
+	protected function getModulesXML($url)
+	{
+		if (!self::readURL($url, $ssl, $host, $port, $path, $user, $pass)) {
+			return false;
+		}
+		$this->setHost($host, $port);
+		$this->useSSL($ssl);
+		$this->setAuthorization($user, $pass);
+
+		return $this->get($path);
+	}
+
+	/**
+	 * Get repository modules list using cache.
+	 *
+	 * @param	string	$url		XML feed URL
+	 * @return	array	Feed content or False on fail
+	 */
+	protected function withCache($url)
+	{
+		$url_md5 = md5($url);
+		$cached_file = sprintf('%s/%s/%s/%s/%s.ser',
+			$this->cache_dir,
+			$this->cache_file_prefix,
+			substr($url_md5,0,2),
+			substr($url_md5,2,2),
+			$url_md5
+		);
+
+		$may_use_cached = false;
+
+		# Use cache file ?
+		if (@file_exists($cached_file) && !$this->force) {
+			$may_use_cached = true;
+			$ts = @filemtime($cached_file);
+			if ($ts > strtotime($this->cache_ttl)) {
+				# Direct cache
+				return unserialize(file_get_contents($cached_file));
+			}
+			$this->setValidator('IfModifiedSince', $ts);
+		}
+
+		# Query repository
+		if (!$this->getModulesXML($url)) {
+			if ($may_use_cached) {
+				# Touch cache TTL even if query failed ?
+				if ($this->cache_touch_on_fail) {
+					@files::touch($cached_file);
+				}
+				# Connection failed - fetched from cache
+				return unserialize(file_get_contents($cached_file));
+			}
+			return false;
+		}
+
+		# Parse response
+		switch ($this->getStatus())
+		{
+			# Not modified, use cache
+			case '304':
+				@files::touch($cached_file);
+				return unserialize(file_get_contents($cached_file));
+			# Ok, parse feed
+			case '200':
+				if ($modules = new dcStoreParser($this->getContent())) {
+					try {
+						files::makeDir(dirname($cached_file), true);
+					}
+					catch (Exception $e) {
+						return $modules;
+					}
+
+					if (($fp = @fopen($cached_file, 'wb'))) {
+						fwrite($fp, serialize($modules));
+						fclose($fp);
+						files::inheritChmod($cached_file);
+					}
+					return $modules;
+				}
+		}
+
+		return false;
+	}
+
+	/**
+	 * Prepare query.
+	 *
+	 * @return	array	Query headers
+	 */
+	protected function buildRequest()
+	{
+		$headers = parent::buildRequest();
+
+		# Cache validators
+		if (!empty($this->validators)) {
+			if (isset($this->validators['IfModifiedSince'])) {
+				$headers[] = 'If-Modified-Since: '.$this->validators['IfModifiedSince'];
+			}
+			if (isset($this->validators['IfNoneMatch'])) {
+				if (is_array($this->validators['IfNoneMatch'])) {
+					$etags = implode(',', $this->validators['IfNoneMatch']);
+				}
+				else {
+					$etags = $this->validators['IfNoneMatch'];
+				}
+				$headers[] = '';
+			}
+		}
+
+		return $headers;
+	}
+
+	/**
+	 * Tweak query cache validator.
+	 *
+	 * @param	string	$key		Validator key
+	 * @param	string	$value		Validator value
+	 */
+	private function setValidator($key, $value)
+	{
+		if ($key == 'IfModifiedSince') {
+			$value = gmdate('D, d M Y H:i:s', $value).' GMT';
+		}
+
+		$this->validators[$key] = $value;
+	}
+}
Index: inc/prepend.php
===================================================================
--- inc/prepend.php	(revision 2147)
+++ inc/prepend.php	(revision 2216)
@@ -46,7 +46,7 @@
 $__autoload['dcWorkspace']			= dirname(__FILE__).'/core/class.dc.workspace.php';
 $__autoload['dcPrefs']				= dirname(__FILE__).'/core/class.dc.prefs.php';
-$__autoload['dcRepository']			= dirname(__FILE__).'/core/class.dc.repository.php';
-$__autoload['dcRepositoryReader']		= dirname(__FILE__).'/core/class.dc.repository.reader.php';
-$__autoload['dcRepositoryParser']		= dirname(__FILE__).'/core/class.dc.repository.parser.php';
+$__autoload['dcStore']			= dirname(__FILE__).'/core/class.dc.store.php';
+$__autoload['dcStoreReader']		= dirname(__FILE__).'/core/class.dc.store.reader.php';
+$__autoload['dcStoreParser']		= dirname(__FILE__).'/core/class.dc.store.parser.php';
 
 $__autoload['rsExtPost']				= dirname(__FILE__).'/core/class.dc.rs.extensions.php';
