mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-12 04:23:19 +00:00
Cleanup namepaces, variables uses
This commit is contained in:
@@ -10,7 +10,6 @@
|
||||
*/
|
||||
|
||||
use Alchemy\Phrasea\Application;
|
||||
use Alchemy\Phrasea\Core\Configuration;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -51,13 +50,12 @@ class databox_cgu
|
||||
private static function getUnvalidated(Application $app, $home = false)
|
||||
{
|
||||
$terms = array();
|
||||
$appbox = $app['phraseanet.appbox'];
|
||||
|
||||
if ( ! $home) {
|
||||
$user = $app['phraseanet.user'];
|
||||
}
|
||||
|
||||
foreach ($appbox->get_databoxes() as $databox) {
|
||||
foreach ($app['phraseanet.appbox']->get_databoxes() as $databox) {
|
||||
try {
|
||||
$cgus = $databox->get_cgus();
|
||||
|
||||
|
@@ -66,13 +66,12 @@ class databox_status
|
||||
$path = $url = false;
|
||||
|
||||
$sbas_params = phrasea::sbas_params($app);
|
||||
$registry = $app['phraseanet.registry'];
|
||||
|
||||
if ( ! isset($sbas_params[$sbas_id])) {
|
||||
return;
|
||||
}
|
||||
|
||||
$path = $this->path = $registry->get('GV_RootPath') . "config/status/" . urlencode($sbas_params[$sbas_id]["host"]) . "-" . urlencode($sbas_params[$sbas_id]["port"]) . "-" . urlencode($sbas_params[$sbas_id]["dbname"]);
|
||||
$path = $this->path = $app['phraseanet.registry']->get('GV_RootPath') . "config/status/" . urlencode($sbas_params[$sbas_id]["host"]) . "-" . urlencode($sbas_params[$sbas_id]["port"]) . "-" . urlencode($sbas_params[$sbas_id]["dbname"]);
|
||||
$url = $this->url = "/custom/status/" . urlencode($sbas_params[$sbas_id]["host"]) . "-" . urlencode($sbas_params[$sbas_id]["port"]) . "-" . urlencode($sbas_params[$sbas_id]["dbname"]);
|
||||
|
||||
$databox = $app['phraseanet.appbox']->get_databox((int) $sbas_id);
|
||||
@@ -382,8 +381,6 @@ class databox_status
|
||||
|
||||
public static function updateIcon(Application $app, $sbas_id, $bit, $switch, UploadedFile $file)
|
||||
{
|
||||
$registry = $app['phraseanet.registry'];
|
||||
|
||||
$switch = in_array($switch, array('on', 'off')) ? $switch : false;
|
||||
|
||||
if ( ! $switch) {
|
||||
@@ -406,13 +403,12 @@ class databox_status
|
||||
$name = "-stat_" . $bit . "_" . ($switch == 'on' ? '1' : '0') . ".gif";
|
||||
|
||||
try {
|
||||
$file = $file->move($registry->get('GV_RootPath') . "config/status/", $path.$name);
|
||||
$file = $file->move($app['phraseanet.registry']->get('GV_RootPath') . "config/status/", $path.$name);
|
||||
} catch (FileException $e) {
|
||||
throw new Exception_Upload_CannotWriteFile();
|
||||
}
|
||||
|
||||
|
||||
$custom_path = $registry->get('GV_RootPath') . 'www/custom/status/';
|
||||
$custom_path = $app['phraseanet.registry']->get('GV_RootPath') . 'www/custom/status/';
|
||||
|
||||
$app['filesystem']->mkdir($custom_path, 0750);
|
||||
|
||||
|
Reference in New Issue
Block a user