fix #396 incorrect pdo_sqlite path

This commit is contained in:
Nicolas Le Goff
2012-02-16 12:49:43 +01:00
parent 273d29ab3e
commit 97dcb9b301
5 changed files with 329 additions and 326 deletions

View File

@@ -106,7 +106,7 @@ return call_user_func(function()
'main_connexion' => $connexionINI,
'test_connexion' => array(
'driver' => 'pdo_sqlite',
'path' => realpath($registry->get("GV_RootPath") . 'lib/unitTest/tests.sqlite'),
'path' => realpath(__DIR__ . '/../../../unitTest') . '/tests.sqlite',
'charset' => 'UTF8'
));
@@ -183,10 +183,8 @@ return call_user_func(function()
$app->get('/', function() use ($app)
{
if ($app['install'] === true)
return $app->redirect('/setup/installer/');
if ($app['upgrade'] === true)
return $app->redirect('/setup/upgrader/');
});

View File

@@ -38,7 +38,7 @@ class Root implements ControllerProviderInterface
$controllers = new ControllerCollection();
$controllers->get('/', function(Application $app)
$controllers->get('/', function(Application $app, Request $request)
{
$Core = $app['Core'];
@@ -47,7 +47,7 @@ class Root implements ControllerProviderInterface
\User_Adapter::updateClientInfos(3);
$section = $app['request']->get('section', false);
$section = $request->get('section', false);
$available = array(
'connected'
@@ -98,6 +98,7 @@ class Root implements ControllerProviderInterface
'module' => 'admin'
, 'events' => \eventsmanager_broker::getInstance($appbox, $Core)
, 'module_name' => 'Admin'
, 'notice' => $request->get("notice")
, 'feature' => $feature
, 'featured' => $featured
, 'databoxes' => $databoxes

View File

@@ -315,7 +315,7 @@ class Installer implements ControllerProviderInterface
$appbox->get_session()->authenticate($auth);
$redirection = '/admin/index.php?section=taskmanager&notice=install_success';
$redirection = '/admin/?section=taskmanager&notice=install_success';
return $app->redirect($redirection);
}

View File

@@ -138,12 +138,10 @@ class appbox extends base
$custom_path.= $collection->get_base_id();
if (is_null($pathfile))
return $this;
$datas = file_get_contents($pathfile->getPathname());
if (is_null($datas))
return $this;
file_put_contents($file, $datas);
@@ -195,12 +193,10 @@ class appbox extends base
$custom_path.= $pic_type . '_' . $databox->get_sbas_id();
if (is_null($pathfile))
return $this;
$datas = file_get_contents($pathfile->getPathname());
if (is_null($datas))
return $this;
file_put_contents($file, $datas);
@@ -492,7 +488,7 @@ class appbox extends base
'main_connexion' => $connexionINI,
'test_connexion' => array(
'driver' => 'pdo_sqlite',
'path' => realpath($root . 'lib/unitTest/tests.sqlite'),
'path' => realpath($root . 'lib/unitTest') . '/tests.sqlite',
'charset' => 'UTF8'
));
@@ -612,7 +608,6 @@ class appbox extends base
public function get_databoxes()
{
if ($this->databoxes)
return $this->databoxes;
$ret = array();

View File

@@ -186,7 +186,16 @@
</div>
</div>
</div>
<iframe class="right PNB10" src="about:blank;" name="right" id="right" frameborder="1" border="0" framespacing="0" style="left:260px;border:none;right:0;"></iframe>
{% if notice %}
<div class="right PNB10 notice" style="left:260px;">
{% if notice == "install_success" %}
{% trans %}Successful install{% endtrans %}
{% endif %}
</div>
{% endif %}
<iframe class="right PNB10" src="about:blank;" name="right" id="right" frameborder="1" border="0" framespacing="0" style="left:260px;border:none;right:0;{{ notice ? "top:30px" : "top:0" }}"></iframe>
<div class="right PNB" style="left:250px;overflow:auto;">
<div id="right-ajax" class="PNB10"></div>
</div>