[-] PROJECT : Moving xml files to xml directory

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@11438 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
fSerny
2011-12-20 17:37:14 +00:00
parent 6ef2e2cc50
commit 0b1e2ba0a3
9 changed files with 53 additions and 14 deletions
+2 -2
View File
@@ -1000,7 +1000,7 @@ abstract class ModuleCore
// Get Default Country Modules and customer module
if ($loggedOnAddons)
{
$filesList = array(_PS_ROOT_DIR_.'/config/default_country_modules_list.xml', _PS_ROOT_DIR_.'/config/customer_modules_list.xml');
$filesList = array(_PS_ROOT_DIR_.'/config/xml/default_country_modules_list.xml', _PS_ROOT_DIR_.'/config/xml/customer_modules_list.xml');
foreach ($filesList as $file)
if (file_exists($file))
{
@@ -1091,7 +1091,7 @@ abstract class ModuleCore
{
$db = Db::getInstance();
$module_list_xml = _PS_ROOT_DIR_.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'modules_list.xml';
$module_list_xml = _PS_ROOT_DIR_.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'xml'.DIRECTORY_SEPARATOR.'modules_list.xml';
$nativeModules = simplexml_load_file($module_list_xml);
$nativeModules = $nativeModules->modules;
foreach ($nativeModules as $nativeModulesType)
+2
View File
@@ -0,0 +1,2 @@
Order deny,allow
Deny from all
+37
View File
@@ -0,0 +1,37 @@
<?php
/*
* 2007-2011 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2011 PrestaShop SA
* @version Release: $Revision: 6844 $
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;
?>
+8 -8
View File
@@ -41,8 +41,6 @@ class AdminModulesControllerCore extends AdminController
private $list_modules_categories = array();
private $list_partners_modules = array();
private $list_natives_modules = array();
private $cache_file_modules_list = '/config/modules_list.xml';
private $xml_modules_list = 'http://api.prestashop.com/xml/modules_list.xml';
private $nb_modules_total = 0;
private $nb_modules_installed = 0;
@@ -55,10 +53,12 @@ class AdminModulesControllerCore extends AdminController
private $iso_default_country;
private $filter_configuration = array();
private $addons_url = 'https://addons.prestashop.com/webservice/151/';
private $xml_modules_list = 'http://api.prestashop.com/xml/modules_list.xml';
private $addons_url = 'http://api.addons.prestashop.com/151/';
private $logged_on_addons = false;
private $cache_file_default_country_modules_list = '/config/default_country_modules_list.xml';
private $cache_file_customer_modules_list = '/config/customer_modules_list.xml';
private $cache_file_modules_list = '/config/xml/modules_list.xml';
private $cache_file_default_country_modules_list = '/config/xml/default_country_modules_list.xml';
private $cache_file_customer_modules_list = '/config/xml/customer_modules_list.xml';
/*
** Admin Modules Controller Constructor
@@ -167,12 +167,12 @@ class AdminModulesControllerCore extends AdminController
$this->status = 'cache';
// If logged to Addons Webservices, refresh default country modules list every day
// If logged to Addons Webservices, refresh default country native modules list every day
if ($this->logged_on_addons && $this->status != 'error')
{
if (!$this->isFresh($this->cache_file_default_country_modules_list, 86400))
{
if ($this->refresh($this->cache_file_default_country_modules_list, $this->addons_url.'listing/'.strtolower(Configuration::get('PS_LOCALE_COUNTRY'))))
if ($this->refresh($this->cache_file_default_country_modules_list, $this->addons_url.'listing/native/'.strtolower(Configuration::get('PS_LOCALE_COUNTRY'))))
$this->status = 'refresh';
else
$this->status = 'error';
@@ -208,7 +208,7 @@ class AdminModulesControllerCore extends AdminController
$xml = @simplexml_load_string($content, NULL, LIBXML_NOCDATA);
if (!$xml)
die('KO');
$result = strtoupper((string)$xml->msg);
$result = strtoupper((string)$xml->success);
if (!in_array($result, array('OK', 'KO')))
die ('KO');
if ($result == 'OK')
+1 -1
View File
@@ -608,7 +608,7 @@ abstract class Module
{
$db = Db::getInstance();
$module_list_xml = _PS_ROOT_DIR_.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'modules_list.xml';
$module_list_xml = _PS_ROOT_DIR_.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'xml'.DIRECTORY_SEPARATOR.'modules_list.xml';
$nativeModules = simplexml_load_file($module_list_xml);
$nativeModules = $nativeModules->modules;
foreach ($nativeModules as $nativeModulesType)
+1 -1
View File
@@ -30,7 +30,7 @@ function desactivate_custom_modules()
$db = Db::getInstance();
$modulesDirOnDisk = Module::getModulesDirOnDisk();
$module_list_xml = _PS_ROOT_DIR_.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'modules_list.xml';
$module_list_xml = _PS_ROOT_DIR_.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'xml'.DIRECTORY_SEPARATOR.'modules_list.xml';
$nativeModules = simplexml_load_file($module_list_xml);
$nativeModules = $nativeModules->modules;
foreach ($nativeModules as $nativeModulesType)
+1 -1
View File
@@ -608,7 +608,7 @@ abstract class Module
{
$db = Db::getInstance();
$module_list_xml = _PS_ROOT_DIR_.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'modules_list.xml';
$module_list_xml = _PS_ROOT_DIR_.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'xml'.DIRECTORY_SEPARATOR.'modules_list.xml';
$nativeModules = simplexml_load_file($module_list_xml);
$nativeModules = $nativeModules->modules;
foreach ($nativeModules as $nativeModulesType)
@@ -30,7 +30,7 @@ function desactivate_custom_modules()
$db = Db::getInstance();
$modulesDirOnDisk = Module::getModulesDirOnDisk();
$module_list_xml = _PS_ROOT_DIR_.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'modules_list.xml';
$module_list_xml = _PS_ROOT_DIR_.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'xml'.DIRECTORY_SEPARATOR.'modules_list.xml';
$nativeModules = simplexml_load_file($module_list_xml);
$nativeModules = $nativeModules->modules;
foreach ($nativeModules as $nativeModulesType)