Cleanup namepaces, variables uses

This commit is contained in:
Romain Neutron
2012-09-28 16:06:28 +02:00
parent 372861deb4
commit 1700565862
232 changed files with 593 additions and 1446 deletions

View File

@@ -10,7 +10,6 @@
*/
use Alchemy\Phrasea\Application;
use Alchemy\Phrasea\Core\Configuration;
/**
*
@@ -19,8 +18,6 @@ use Alchemy\Phrasea\Core\Configuration;
*/
require_once __DIR__ . "/../../lib/bootstrap.php";
$app = new Application();
$appbox = $app['phraseanet.appbox'];
$registry = $app['phraseanet.registry'];
$request = http_request::getInstance();
$parm = $request->get_parms(
@@ -38,7 +35,7 @@ $refresh = array();
$sbas_id = (int) $parm["sbid"];
try {
$databox = $appbox->get_databox($sbas_id);
$databox = $app['phraseanet.appbox']->get_databox($sbas_id);
$connbas = $databox->get_connection();
$domct = $databox->get_dom_cterms();

View File

@@ -10,7 +10,6 @@
*/
use Alchemy\Phrasea\Application;
use Alchemy\Phrasea\Core\Configuration;
/**
*
@@ -19,8 +18,6 @@ use Alchemy\Phrasea\Core\Configuration;
*/
require_once __DIR__ . "/../../lib/bootstrap.php";
$app = new Application();
$appbox = $app['phraseanet.appbox'];
$registry = $app['phraseanet.registry'];
$request = http_request::getInstance();
$parm = $request->get_parms(
@@ -35,7 +32,7 @@ $json = Array();
if ($parm["sbid"] !== null) {
$loaded = false;
$databox = $appbox->get_databox((int) $parm['sbid']);
$databox = $app['phraseanet.appbox']->get_databox((int) $parm['sbid']);
$dom_thesau = $databox->get_dom_thesaurus();
$meta = $databox->get_meta_structure();

View File

@@ -10,7 +10,6 @@
*/
use Alchemy\Phrasea\Application;
use Alchemy\Phrasea\Core\Configuration;
/**
*
@@ -19,8 +18,6 @@ use Alchemy\Phrasea\Core\Configuration;
*/
require_once __DIR__ . "/../../lib/bootstrap.php";
$app = new Application();
$appbox = $app['phraseanet.appbox'];
$registry = $app['phraseanet.registry'];
$request = http_request::getInstance();
$parm = $request->get_parms(
@@ -55,7 +52,7 @@ foreach ($tsbas as $sbas) {
if (count($sbas['tids']) <= 0)
continue;
$databox = $appbox->get_databox((int) $sbas['sbas']['sbas_id']);
$databox = $app['phraseanet.appbox']->get_databox((int) $sbas['sbas']['sbas_id']);
try {
$connbas = connection::getPDOConnection($app, $sbas['sbas']['sbas_id']);
} catch (Exception $e) {

View File

@@ -9,7 +9,6 @@
*/
use Alchemy\Phrasea\Application;
use Alchemy\Phrasea\Core\Configuration;
/**
*
@@ -22,7 +21,6 @@ require_once __DIR__ . "/../../lib/bootstrap.php";
$app = new Application();
$usr_id = $app['phraseanet.user']->get_id();
$appbox = $app['phraseanet.appbox'];
$request = http_request::getInstance();
$parm = $request->get_parms(
@@ -41,7 +39,7 @@ switch ($parm['act']) {
':usr_id' => $usr_id
);
$stmt = $appbox->get_connection()->prepare($sql);
$stmt = $app['phraseanet.appbox']->get_connection()->prepare($sql);
$stmt->execute($params);
$stmt->closeCursor();
@@ -66,7 +64,7 @@ switch ($parm['act']) {
, ':presets' => $dom->saveXML()
);
$stmt = $appbox->get_connection()->prepare($sql);
$stmt = $app['phraseanet.appbox']->get_connection()->prepare($sql);
$stmt->execute($params);
$ret['html'] = xlist($app, $parm['sbas'], $usr_id);
@@ -79,7 +77,7 @@ switch ($parm['act']) {
FROM edit_presets
WHERE edit_preset_id = :edit_preset_id';
$stmt = $appbox->get_connection()->prepare($sql);
$stmt = $app['phraseanet.appbox']->get_connection()->prepare($sql);
$stmt->execute(array(':edit_preset_id' => $parm['presetid']));
$row = $stmt->fetch(PDO::FETCH_ASSOC);
$stmt->closeCursor();

View File

@@ -10,7 +10,6 @@
*/
use Alchemy\Phrasea\Application;
use Alchemy\Phrasea\Core\Configuration;
/**
*
@@ -19,8 +18,6 @@ use Alchemy\Phrasea\Core\Configuration;
*/
require_once __DIR__ . "/../../lib/bootstrap.php";
$app = new Application();
$appbox = $app['phraseanet.appbox'];
$registry = $app['phraseanet.registry'];
$request = http_request::getInstance();
$parm = $request->get_parms(
@@ -40,7 +37,7 @@ $root->appendChild($ret->createCDATASection(var_export($parm, true)));
if ($parm["bid"] !== null) {
$loaded = false;
$databox = $appbox->get_databox((int) $parm['bid']);
$databox = $app['phraseanet.appbox']->get_databox((int) $parm['bid']);
$dom = $databox->get_dom_thesaurus();
if ($dom) {

View File

@@ -9,7 +9,6 @@
* file that was distributed with this source code.
*/
use Alchemy\Phrasea\Application;
use Alchemy\Phrasea\Core\Configuration;
/**
*
@@ -18,8 +17,6 @@ use Alchemy\Phrasea\Core\Configuration;
*/
require_once __DIR__ . "/../../lib/bootstrap.php";
$app = new Application();
$appbox = $app['phraseanet.appbox'];
$registry = $app['phraseanet.registry'];
$request = http_request::getInstance();
$parm = $request->get_parms(
@@ -37,7 +34,7 @@ $zhtml = '';
if ($parm["bid"] !== null) {
$loaded = false;
$databox = $appbox->get_databox((int) $parm['bid']);
$databox = $app['phraseanet.appbox']->get_databox((int) $parm['bid']);
$dom = $databox->get_dom_thesaurus();
if ($dom) {

View File

@@ -10,7 +10,6 @@
*/
use Alchemy\Phrasea\Application;
use Alchemy\Phrasea\Core\Configuration;
/**
*
@@ -20,7 +19,6 @@ use Alchemy\Phrasea\Core\Configuration;
require_once __DIR__ . "/../../lib/bootstrap.php";
$app = new Application();
$appbox = $app['phraseanet.appbox'];
$request = http_request::getInstance();
$parm = $request->get_parms(
"bid"
@@ -50,7 +48,7 @@ if ($parm["bid"] !== null) {
$loaded = false;
$xml = trim($rowbas["xml"]);
$databox = $appbox->get_databox((int) $parm['bid']);
$databox = $app['phraseanet.appbox']->get_databox((int) $parm['bid']);
$dom = $databox->get_dom_thesaurus();
if ($dom) {
$xpath = $databox->get_xpath_thesaurus();

View File

@@ -10,7 +10,6 @@
*/
use Alchemy\Phrasea\Application;
use Alchemy\Phrasea\Core\Configuration;
/**
*
@@ -20,7 +19,6 @@ use Alchemy\Phrasea\Core\Configuration;
require_once __DIR__ . "/../../lib/bootstrap.php";
$app = new Application();
$appbox = $app['phraseanet.appbox'];
$request = http_request::getInstance();
$parm = $request->get_parms(
'sbid'
@@ -143,7 +141,7 @@ try {
if ($parm['debug'])
printf("/* %s */\n", var_export($t_nrec, true));
$databox = $appbox->get_databox($sbid);
$databox = $app['phraseanet.appbox']->get_databox($sbid);
if ($parm['type'] == 'T') {
$xqroot = 'thesaurus';
$dom = $databox->get_dom_thesaurus();

View File

@@ -10,7 +10,6 @@
*/
use Alchemy\Phrasea\Application;
use Alchemy\Phrasea\Core\Configuration;
/**
*
@@ -19,8 +18,6 @@ use Alchemy\Phrasea\Core\Configuration;
*/
require_once __DIR__ . "/../../lib/bootstrap.php";
$app = new Application();
$appbox = $app['phraseanet.appbox'];
$registry = $app['phraseanet.registry'];
$request = http_request::getInstance();
$parm = $request->get_parms(
@@ -40,7 +37,7 @@ $zhtml = '';
if ($parm['bid'] !== null) {
$loaded = false;
$databox = $appbox->get_databox((int) $parm['bid']);
$databox = $app['phraseanet.appbox']->get_databox((int) $parm['bid']);
$dom = $databox->get_dom_thesaurus();
$unicode = new unicode();
if ($dom) {

View File

@@ -10,7 +10,6 @@
*/
use Alchemy\Phrasea\Application;
use Alchemy\Phrasea\Core\Configuration;
/**
*
@@ -19,8 +18,6 @@ use Alchemy\Phrasea\Core\Configuration;
*/
require_once __DIR__ . "/../../lib/bootstrap.php";
$app = new Application();
$appbox = $app['phraseanet.appbox'];
$registry = $app['phraseanet.registry'];
$request = http_request::getInstance();
$parm = $request->get_parms(
@@ -51,7 +48,7 @@ $html = $root->appendChild($ret->createElement('html'));
if ($parm['bid'] !== null) {
$loaded = false;
$databox = $appbox->get_databox((int) $parm['bid']);
$databox = $app['phraseanet.appbox']->get_databox((int) $parm['bid']);
$dom = $databox->get_dom_thesaurus();
if ($dom) {
$xpath = $databox->get_xpath_thesaurus();

View File

@@ -10,7 +10,6 @@
*/
use Alchemy\Phrasea\Application;
use Alchemy\Phrasea\Core\Configuration;
/**
*
@@ -19,8 +18,6 @@ use Alchemy\Phrasea\Core\Configuration;
*/
require_once __DIR__ . "/../../lib/bootstrap.php";
$app = new Application();
$appbox = $app['phraseanet.appbox'];
$registry = $app['phraseanet.registry'];
$request = http_request::getInstance();
$parm = $request->get_parms(
@@ -41,7 +38,7 @@ $result = array('n_recsChanged' => 0); // , 'n_termsDeleted'=>0, 'n_termsReplace
try {
$databox = $appbox->get_databox((int) $parm['sbid']);
$databox = $app['phraseanet.appbox']->get_databox((int) $parm['sbid']);
$domth = $databox->get_dom_thesaurus();
$domct = $databox->get_dom_cterms();

View File

@@ -10,7 +10,6 @@
*/
use Alchemy\Phrasea\Application;
use Alchemy\Phrasea\Core\Configuration;
/**
*
@@ -30,7 +29,6 @@ $parm = $request->get_parms(
);
$app = new Application();
$appbox = $app['phraseanet.appbox'];
phrasea::headers(200, true, 'application/json', 'UTF-8', false);
if ( ! $parm['lng']) {
@@ -55,7 +53,7 @@ $dbname = '';
$loaded = false;
try {
$databox = $appbox->get_databox($sbid);
$databox = $app['phraseanet.appbox']->get_databox($sbid);
$unicode = new unicode();
$html = "" . '<LI id="TX_P.' . $sbid . '.T" class="expandable">' . "\n";