Merge branch 'master' of https://github.com/thelia/thelia into coupon
# By Etienne Roudeix (1) and others # Via Etienne Roudeix (2) and Manuel Raynaud (2) * 'master' of https://github.com/thelia/thelia: clean some code fix phpdoc Added windows version of reset_install script
This commit is contained in:
@@ -293,13 +293,11 @@ class TheliaLoop extends AbstractSmartyPlugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @param $smartyParams
|
||||||
*
|
*
|
||||||
* find the loop class with his name and construct an instance of this class
|
* @return object
|
||||||
*
|
* @throws \Thelia\Core\Template\Element\Exception\InvalidElementException
|
||||||
* @param string $name
|
* @throws \Thelia\Core\Template\Element\Exception\ElementNotFoundException
|
||||||
* @return \Thelia\Core\Template\Element\BaseLoop
|
|
||||||
* @throws InvalidElementException
|
|
||||||
* @throws ElementNotFoundException
|
|
||||||
*/
|
*/
|
||||||
protected function createLoopInstance($smartyParams)
|
protected function createLoopInstance($smartyParams)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -76,7 +76,6 @@ class Thelia extends Kernel
|
|||||||
|
|
||||||
$definePropel = new DefinePropel(new DatabaseConfiguration(),
|
$definePropel = new DefinePropel(new DatabaseConfiguration(),
|
||||||
Yaml::parse(THELIA_ROOT . '/local/config/database.yml'));
|
Yaml::parse(THELIA_ROOT . '/local/config/database.yml'));
|
||||||
$propelConfig = $definePropel->getConfig();
|
|
||||||
$serviceContainer = Propel::getServiceContainer();
|
$serviceContainer = Propel::getServiceContainer();
|
||||||
$serviceContainer->setAdapterClass('thelia', 'mysql');
|
$serviceContainer->setAdapterClass('thelia', 'mysql');
|
||||||
$manager = new ConnectionManagerSingle();
|
$manager = new ConnectionManagerSingle();
|
||||||
@@ -84,7 +83,6 @@ class Thelia extends Kernel
|
|||||||
$serviceContainer->setConnectionManager('thelia', $manager);
|
$serviceContainer->setConnectionManager('thelia', $manager);
|
||||||
|
|
||||||
if ($this->isDebug()) {
|
if ($this->isDebug()) {
|
||||||
//$serviceContainer->setLogger('defaultLogger', Tlog::getInstance());
|
|
||||||
$con = Propel::getConnection(\Thelia\Model\Map\ProductTableMap::DATABASE_NAME);
|
$con = Propel::getConnection(\Thelia\Model\Map\ProductTableMap::DATABASE_NAME);
|
||||||
$con->useDebug(true);
|
$con->useDebug(true);
|
||||||
}
|
}
|
||||||
|
|||||||
35
reset_install.bat
Normal file
35
reset_install.bat
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
echo off
|
||||||
|
REM @author Guillaume MOREL
|
||||||
|
REM v0.1
|
||||||
|
|
||||||
|
echo [WARN] This script will reset this Thelia2 install
|
||||||
|
|
||||||
|
if exist local\config\database.yml (
|
||||||
|
echo [INFO] Downloading vendors
|
||||||
|
composer install --prefer-dist
|
||||||
|
|
||||||
|
cd local\config\
|
||||||
|
|
||||||
|
echo [INFO] Building Models file
|
||||||
|
..\..\bin\propel build -v --output-dir=../../core/lib/
|
||||||
|
|
||||||
|
echo [INFO] Building SQL CREATE file
|
||||||
|
..\..\bin\propel sql:build -v --output-dir=../../install/
|
||||||
|
|
||||||
|
|
||||||
|
echo [INFO] Reloaded Thelia2 database
|
||||||
|
cd ..\..
|
||||||
|
del install\sqldb.map
|
||||||
|
php Thelia thelia:dev:reloadDB
|
||||||
|
|
||||||
|
echo [INFO] Installing fixtures
|
||||||
|
php install\faker.php
|
||||||
|
|
||||||
|
echo [INFO] Adding admin
|
||||||
|
php Thelia thelia:create-admin
|
||||||
|
|
||||||
|
echo [SUCCESS] Reset done
|
||||||
|
)
|
||||||
|
) else (
|
||||||
|
echo [FAILED] Please add your database informations in local\config\database.yml and start this script again.
|
||||||
|
)
|
||||||
Reference in New Issue
Block a user