This commit is contained in:
Romain Neutron
2012-06-19 10:40:14 +02:00
parent cd78d5566b
commit e28184167e
153 changed files with 183 additions and 568 deletions

View File

@@ -23,7 +23,6 @@ use Symfony\Component\HttpKernel\Exception;
*/
return call_user_func(function() {
$app = new \Silex\Application();
/**
@@ -96,7 +95,6 @@ return call_user_func(function() {
return;
});
/**
* oAUth log process
*
@@ -297,7 +295,6 @@ return call_user_func(function() {
}
)->before($mustBeAdmin);
/**
* *******************************************************************
* Route : /databoxes/list/
@@ -335,7 +332,6 @@ return call_user_func(function() {
$app->get('/databoxes/{any_id}/collections/', $bad_request_exception);
/**
* *******************************************************************
* Route /databoxes/DATABOX_ID/status/
@@ -395,7 +391,6 @@ return call_user_func(function() {
$app->get('/databoxes/{any_id}/termsOfUse/', $bad_request_exception);
$route = '/quarantine/list/';
$app->get(
$route, function(\Silex\Application $app, Request $request) {
@@ -410,7 +405,6 @@ return call_user_func(function() {
}
);
/**
* *******************************************************************
* Route : /records/add/
@@ -427,7 +421,6 @@ return call_user_func(function() {
}
);
/**
* Route : /records/search/
*
@@ -453,7 +446,6 @@ return call_user_func(function() {
}
);
$route = '/records/{databox_id}/{record_id}/caption/';
$app->get(
$route, function($databox_id, $record_id) use ($app) {
@@ -465,7 +457,6 @@ return call_user_func(function() {
$app->get('/records/{any_id}/{anyother_id}/caption/', $bad_request_exception);
/**
* Route : /records/DATABOX_ID/RECORD_ID/metadatas/
*
@@ -592,7 +583,6 @@ return call_user_func(function() {
$app->post('/records/{any_id}/{anyother_id}/setstatus/', $bad_request_exception);
/**
* Route : /records/DATABOX_ID/RECORD_ID/setcollection/
*
@@ -613,7 +603,6 @@ return call_user_func(function() {
)->assert('databox_id', '\d+')->assert('record_id', '\d+');
$app->post('/records/{wrong_databox_id}/{wrong_record_id}/setcollection/', $bad_request_exception);
$route = '/records/{databox_id}/{record_id}/';
$app->get($route, function($databox_id, $record_id) use ($app) {
$result = $app['api']->get_record($app['request'], $databox_id, $record_id);
@@ -639,7 +628,6 @@ return call_user_func(function() {
}
);
/**
* Route : /baskets/add/
*
@@ -657,8 +645,6 @@ return call_user_func(function() {
}
);
/**
* Route : /baskets/BASKET_ID/content/
*
@@ -678,7 +664,6 @@ return call_user_func(function() {
)->assert('basket_id', '\d+');
$app->get('/baskets/{wrong_basket_id}/content/', $bad_request_exception);
/**
* Route : /baskets/BASKET_ID/settitle/
*
@@ -698,7 +683,6 @@ return call_user_func(function() {
)->assert('basket_id', '\d+');
$app->post('/baskets/{wrong_basket_id}/setname/', $bad_request_exception);
/**
* Route : /baskets/BASKET_ID/setdescription/
*
@@ -737,7 +721,6 @@ return call_user_func(function() {
)->assert('basket_id', '\d+');
$app->post('/baskets/{wrong_basket_id}/delete/', $bad_request_exception);
/**
* Route : /feeds/list/
*
@@ -755,7 +738,6 @@ return call_user_func(function() {
}
);
$route = '/feeds/content/';
$app->get(
$route, function() use ($app) {
@@ -824,7 +806,7 @@ return call_user_func(function() {
$code = \API_V1_result::ERROR_INTERNALSERVERERROR;
}
if($e instanceof \Symfony\Component\HttpKernel\Exception\HttpException) {
if ($e instanceof \Symfony\Component\HttpKernel\Exception\HttpException) {
$headers = $e->getHeaders();
}
@@ -837,5 +819,6 @@ return call_user_func(function() {
return $response;
});
return $app;
});

View File

@@ -75,7 +75,6 @@ return call_user_func(
return new Response('');
}
$em = $app['Core']->getEntityManager();
/* @var $repository \Repositories\BasketElementRepository */
@@ -126,7 +125,6 @@ return call_user_func(
$appbox = \appbox::get_instance($app['Core']);
$usr_id = $appbox->get_session()->get_usr_id();
$Basket = $BasketElement->getBasket();
$ret = array();
@@ -151,9 +149,6 @@ return call_user_func(
}
)->assert('sselcont_id', '\d+');
$app->get('/ajax/LOAD_FEED_ITEM/{entry_id}/{item_id}/', function(\Silex\Application $app, $entry_id, $item_id) {
/* @var $twig \Twig_Environment */
$twig = $app['Core']->getTwig();
@@ -190,7 +185,6 @@ return call_user_func(
$ret['options_html'] = $twig->render($template_options, array('feed_element' => $item));
$ret['caption'] = $twig->render($template_caption, array('view' => 'preview', 'record' => $item->get_record()));
$ret['agreement_html'] = $ret['selector_html'] = $ret['note_html'] = '';
$Serializer = $app['Core']['Serializer'];
@@ -224,7 +218,6 @@ return call_user_func(
, false
);
if ($basket->getIsRead() === false) {
$basket = $em->merge($basket);
$basket->setIsRead(true);
@@ -279,7 +272,6 @@ return call_user_func(
, false
);
if ($basket->getIsRead() === false) {
$basket = $em->merge($basket);
$basket->setIsRead(true);
@@ -314,8 +306,6 @@ return call_user_func(
}
)->assert('ssel_id', '\d+');
$app->get('/feeds/entry/{entry_id}/', function (\Silex\Application $app, $entry_id) use ($appbox) {
\User_Adapter::updateClientInfos((6));
@@ -493,7 +483,6 @@ return call_user_func(
}
)->assert('sselcont_id', '\d+');
$app->post('/ajax/SET_RELEASE/{ssel_id}/', function(\Silex\Application $app, $ssel_id) use ($appbox) {
$em = $app['Core']->getEntityManager();
@@ -535,7 +524,6 @@ return call_user_func(
, $basket->getId()
);
$to = $basket->getValidation()->getInitiator()->get_id();
$params = array(
'ssel_id' => $basket->getId(),
@@ -544,11 +532,8 @@ return call_user_func(
'to' => $to
);
$evt_mngr->trigger('__VALIDATION_DONE__', $params);
$participant->setIsConfirmed(true);
$em->merge($participant);
@@ -574,8 +559,6 @@ return call_user_func(
}
)->assert('ssel_id', '\d+');
$app->error(function($e) use($app) {
/* @var $twig \Twig_Environment */

View File

@@ -60,12 +60,10 @@ return call_user_func(function() {
return $response;
});
/* * *******************************************************************
* AUTHENTIFICATION API
*/
/**
* AUTHORIZE ENDPOINT
*
@@ -93,7 +91,6 @@ return call_user_func(function() {
$action_accept = $request->get("action_accept", null);
$action_login = $request->get("action_login", null);
$template = "api/auth/end_user_authorization.twig";
$custom_template = sprintf(
@@ -102,7 +99,6 @@ return call_user_func(function() {
, $client->get_id()
);
if (file_exists($custom_template)) {
$template = sprintf(
'api/auth/end_user_authorization/%s.twig'
@@ -188,8 +184,6 @@ return call_user_func(function() {
$app->get($route, $authorize_func);
$app->post($route, $authorize_func);
/**
* TOKEN ENDPOINT
* Token endpoint - used to exchange an authorization grant for an access token.
@@ -207,7 +201,6 @@ return call_user_func(function() {
return;
});
/******************************************************************
* MANAGEMENT APPS
*
@@ -243,8 +236,6 @@ return call_user_func(function() {
return $app['response']('api/auth/application_dev_new.twig', $var);
});
$route = "/applications/dev/create";
$app->post($route, function() use ($app) {
$submit = false;
@@ -279,7 +270,6 @@ return call_user_func(function() {
return $app['response']('api/auth/application_dev_new.twig', $var);
});
/**
* show details of app identified by its id
*/
@@ -443,6 +433,5 @@ return call_user_func(function() {
return new Response($msg, $code, $headers);
});
return $app;
});

View File

@@ -41,7 +41,6 @@ return call_user_func(
$pathOut = \recordutils_image::stamp($record->get_base_id(), $record->get_record_id());
}
$log_id = null;
try {
$registry = \registry::get_instance();
@@ -82,7 +81,6 @@ return call_user_func(
throw new \Exception_Session_NotAuthenticated();
}
$all_access = false;
$subdefStruct = $databox->get_subdef_structure();
@@ -139,7 +137,6 @@ return call_user_func(
return $deliver_content($app['request'], $session, $record, $subdef, $watermark, $stamp, $app);
})->assert('sbas_id', '\d+')->assert('record_id', '\d+');
$app->get('/permalink/v1/{label}/{sbas_id}/{record_id}/{key}/{subdef}/view/'
, function($label, $sbas_id, $record_id, $key, $subdef) use($app) {
@@ -164,7 +161,6 @@ return call_user_func(
return $twig->render('overview.twig', $params);
})->assert('sbas_id', '\d+')->assert('record_id', '\d+');
$app->get('/permalink/v1/{label}/{sbas_id}/{record_id}/{key}/{subdef}/'
, function($label, $sbas_id, $record_id, $key, $subdef) use ($app, $session, $deliver_content) {
$databox = \databox::get_instance((int) $sbas_id);
@@ -214,7 +210,6 @@ return call_user_func(
)
->assert('sbas_id', '\d+')->assert('record_id', '\d+');
$app->error(function (\Exception $e) {
if ($e instanceof \Exception_Session_NotAuthenticated) {
$code = 403;
@@ -233,9 +228,6 @@ return call_user_func(
return new Response($message, $code);
});
return $app;
}
);

View File

@@ -114,6 +114,5 @@ return call_user_func(function() {
}
});
return $app;
});

View File

@@ -52,7 +52,6 @@ return call_user_func(function() {
return;
});
$app->get('/', function() use ($app) {
if ($app['install'] === true) {
return $app->redirect('/setup/installer/');
@@ -61,7 +60,6 @@ return call_user_func(function() {
}
});
$app->mount('/installer/', new Controller\Installer());
$app->mount('/upgrader/', new Controller\Upgrader());
$app->mount('/test', new ControllerUtils\PathFileTest());

View File

@@ -90,7 +90,6 @@ abstract class AbstractChecker implements CheckerInterface
return true;
}
$fileDatabox = $file->getCollection()->get_databox();
foreach ($this->databoxes as $databox) {

View File

@@ -33,7 +33,6 @@ class BuildMissingSubdefs extends Command
{
parent::__construct($name);
return $this;
}

View File

@@ -13,7 +13,6 @@ namespace Alchemy\Phrasea\Command;
use Monolog\Logger;
use Symfony\Component\Console\Command\Command as SymfoCommand;
use Symfony\Component\Console\Output\OutputInterface;
/**
* Abstract command which represents a Phraseanet base command

View File

@@ -38,7 +38,6 @@ class RescanTechnicalDatas extends Command
{
parent::__construct($name);
$this->setDescription('Rescan databases for technical datas');
$this->setHelp('Old Phraseanet version did not fully read technical datas. This command rescan all records of these datas.');
@@ -72,6 +71,7 @@ class RescanTechnicalDatas extends Command
if (strtolower($continue) !== 'y') {
$output->writeln('Aborting !');
return;
}

View File

@@ -31,7 +31,6 @@ class Description implements ControllerProviderInterface
$controllers = new ControllerCollection();
$controllers->get('/metadatas/search/', function(Application $app, Request $request) {
$term = trim(strtolower($request->get('term')));
@@ -171,7 +170,6 @@ class Description implements ControllerProviderInterface
$fields = $databox->get_meta_structure();
$available_dc_fields = $databox->get_available_dcfields();
$databox->get_connection()->beginTransaction();
$error = false;
try {
@@ -258,7 +256,6 @@ class Description implements ControllerProviderInterface
$fields = $databox->get_meta_structure();
$available_dc_fields = $databox->get_available_dcfields();
$params = array(
'databox' => $databox,
'fields' => $fields,

View File

@@ -43,7 +43,6 @@ class Publications implements ControllerProviderInterface
return $twig->render($template, array('feeds' => $feeds));
});
$controllers->post('/create/', function() use ($app, $appbox) {
$user = \User_Adapter::getInstance($appbox->get_session()->get_usr_id(), $appbox);
@@ -59,7 +58,6 @@ class Publications implements ControllerProviderInterface
return $app->redirect('/admin/publications/list/');
});
$controllers->get('/feed/{id}/', function($id) use ($app, $appbox) {
$feed = new \Feed_Adapter($appbox, $id);
@@ -74,7 +72,6 @@ class Publications implements ControllerProviderInterface
);
})->assert('id', '\d+');
$controllers->post('/feed/{id}/update/', function($id) use ($app, $appbox) {
$feed = new \Feed_Adapter($appbox, $id);
@@ -100,7 +97,6 @@ class Publications implements ControllerProviderInterface
return $app->redirect('/admin/publications/list/');
})->assert('id', '\d+');
$controllers->post('/feed/{id}/iconupload/', function($id) use ($app, $appbox) {
try {
$datas = array(
@@ -188,7 +184,6 @@ class Publications implements ControllerProviderInterface
return $app->redirect('/admin/publications/feed/' . $id . '/?err=' . $error);
})->assert('id', '\d+');
$controllers->post('/feed/{id}/removepublisher/', function($id) use ($app, $appbox) {
try {
$request = $app['request'];

View File

@@ -81,7 +81,6 @@ class Root implements ControllerProviderInterface
$databoxes[] = $databox;
}
$twig = $Core->getTwig();
return new Response($twig->render('admin/index.html.twig', array(

View File

@@ -79,7 +79,6 @@ class Subdefs implements ControllerProviderInterface
$subdefs = $databox->get_subdef_structure();
foreach ($Parmsubdefs as $post_sub) {
$options = array();

View File

@@ -33,7 +33,6 @@ class Users implements ControllerProviderInterface
$controllers = new ControllerCollection();
$controllers->post('/rights/', function(Application $app) {
$rights = new UserHelper\Edit($app['Core'], $app['request']);
@@ -233,7 +232,6 @@ class Users implements ControllerProviderInterface
);
}
$CSVDatas = \format::arr_to_csv($userTable);
$response = new Response($CSVDatas, 200, array('Content-Type' => 'text/plain'));
@@ -265,7 +263,6 @@ class Users implements ControllerProviderInterface
$have_not_right = $request->get('have_not_right') ? : array();
$on_base = $request->get('on_base') ? : array();
$elligible_users = $user_query
->on_sbas_where_i_am($user->ACL(), $rights)
->like(\User_Query::LIKE_EMAIL, $like_value)
@@ -299,7 +296,6 @@ class Users implements ControllerProviderInterface
);
});
$controllers->post('/create/', function(Application $app) {
$datas = array('error' => false, 'message' => '', 'data' => null);

View File

@@ -231,7 +231,6 @@ class Basket implements ControllerProviderInterface
);
})->assert('basket_id', '\d+');
/**
* Get the Basket reorder form
*/
@@ -255,7 +254,6 @@ class Basket implements ControllerProviderInterface
);
})->assert('basket_id', '\d+');
$controllers->post(
'/{basket_id}/reorder/'
, function(Application $app, $basket_id) {
@@ -267,10 +265,8 @@ class Basket implements ControllerProviderInterface
$basket = $em->getRepository('\Entities\Basket')
->findUserBasket($basket_id, $app['Core']->getAuthenticatedUser(), true);
$order = $app['request']->get('element');
/* @var $basket \Entities\Basket */
foreach ($basket->getElements() as $basketElement) {
if (isset($order[$basketElement->getId()])) {
@@ -290,7 +286,6 @@ class Basket implements ControllerProviderInterface
return new Response($Serializer->serialize($ret, 'json'), 200, array('Content-type' => 'application/json'));
})->assert('basket_id', '\d+');
/**
* Toggle the status of a Basket
*
@@ -407,9 +402,6 @@ class Basket implements ControllerProviderInterface
}
})->assert('basket_id', '\d+');
/**
*
* Move Basket element from a basket to another

View File

@@ -106,7 +106,6 @@ class Bridge implements ControllerProviderInterface
return new Response($twig->render('prod/actions/Bridge/callback.twig', $params));
});
$controllers->get('/adapter/{account_id}/logout/'
, function($account_id) use ($app, $twig) {
$appbox = \appbox::get_instance($app['Core']);
@@ -117,7 +116,6 @@ class Bridge implements ControllerProviderInterface
return $app->redirect('/prod/bridge/adapter/' . $account_id . '/load-elements/' . $account->get_api()->get_connector()->get_default_element_type() . '/');
})->assert('account_id', '\d+');
$controllers->get('/adapter/{account_id}/load-records/'
, function($account_id) use ($app, $twig) {
$page = max((int) $app['request']->get('page'), 0);
@@ -191,7 +189,6 @@ class Bridge implements ControllerProviderInterface
})
->assert('account_id', '\d+');
$controllers->get('/action/{account_id}/{action}/{element_type}/'
, function($account_id, $action, $element_type) use ($app, $twig) {
@@ -259,7 +256,6 @@ class Bridge implements ControllerProviderInterface
return new Response($html);
})->assert('account_id', '\d+');
$controllers->post('/action/{account_id}/{action}/{element_type}/'
, function($account_id, $action, $element_type) use ($app, $twig) {
$appbox = \appbox::get_instance($app['Core']);
@@ -361,11 +357,9 @@ class Bridge implements ControllerProviderInterface
break;
}
return new Response($html);
})->assert('account_id', '\d+');
$controllers->get('/upload/', function(Application $app) use ($twig) {
$request = $app['request'];
$appbox = \appbox::get_instance($app['Core']);
@@ -392,7 +386,6 @@ class Bridge implements ControllerProviderInterface
return new Response($html);
});
$controllers->post('/upload/'
, function(Application $app) use ($twig) {
$errors = array();

View File

@@ -46,7 +46,6 @@ class Feed implements ControllerProviderInterface
return new Response($datas);
});
/**
* I've selected a publication for my ocs, let's publish them
*/
@@ -82,7 +81,6 @@ class Feed implements ControllerProviderInterface
);
});
$controllers->get('/entry/{id}/edit/', function(Application $app, Request $request, $id) use ($appbox, $twig) {
$user = $app["Core"]->getAuthenticatedUser();
@@ -100,7 +98,6 @@ class Feed implements ControllerProviderInterface
return new Response($datas);
})->assert('id', '\d+');
$controllers->post('/entry/{id}/update/', function(Application $app, Request $request, $id) use ($appbox, $twig) {
$datas = array('error' => true, 'message' => '', 'datas' => '');
try {
@@ -126,10 +123,10 @@ class Feed implements ControllerProviderInterface
$current_feed_id = $entry->get_feed()->get_id();
$new_feed_id = $request->get('feed_id',$current_feed_id);
if($current_feed_id != $new_feed_id) {
if ($current_feed_id != $new_feed_id) {
try {
$new_feed = \Feed_Adapter::load_with_user($appbox, $user, $new_feed_id);
} catch(\Exception_NotFound $e) {
} catch (\Exception_NotFound $e) {
throw new \Exception_Forbidden('You have no access to this feed');
}
@@ -180,7 +177,6 @@ class Feed implements ControllerProviderInterface
);
})->assert('id', '\d+');
$controllers->post('/entry/{id}/delete/', function(Application $app, Request $request, $id) use ($appbox, $twig) {
$datas = array('error' => true, 'message' => '');
try {
@@ -255,7 +251,6 @@ class Feed implements ControllerProviderInterface
return new Response($datas);
});
$controllers->get('/feed/{id}/', function(Application $app, Request $request, $id) use ($appbox, $twig) {
$page = (int) $request->get('page');
$page = $page > 0 ? $page : 1;
@@ -270,7 +265,6 @@ class Feed implements ControllerProviderInterface
return new Response($datas);
})->assert('id', '\d+');
$controllers->get('/subscribe/aggregated/', function(Application $app, Request $request) use ( $appbox, $twig) {
$renew = ($request->get('renew') === 'true');
@@ -279,7 +273,6 @@ class Feed implements ControllerProviderInterface
$feeds = \Feed_Collection::load_all($appbox, $user);
$registry = $appbox->get_registry();
$output = array(
'texte' => '<p>' . _('publication::Voici votre fil RSS personnel. Il vous permettra d\'etre tenu au courrant des publications.')
. '</p><p>' . _('publications::Ne le partagez pas, il est strictement confidentiel') . '</p>
@@ -296,7 +289,6 @@ class Feed implements ControllerProviderInterface
);
});
$controllers->get('/subscribe/{id}/', function(Application $app, Request $request, $id) use ($appbox, $twig) {
$renew = ($request->get('renew') === 'true');
$user = $app["Core"]->getAuthenticatedUser();

View File

@@ -42,7 +42,6 @@ class MoveCollection implements ControllerProviderInterface
}
);
$controllers->post('/apply/', function(Application $app) {
$request = $app['request'];
$move = new RecordHelper\MoveCollection($app['Core'], $app['request']);

View File

@@ -42,8 +42,6 @@ class Printer implements ControllerProviderInterface
}
);
$controllers->post('/print.pdf', function(Application $app) {
$printer = new RecordHelper\Printer($app['Core'], $app['request']);

View File

@@ -189,7 +189,6 @@ class Push implements ControllerProviderInterface
throw new ControllerException(_('No elements to push'));
}
$events_manager = \eventsmanager_broker::getInstance(\appbox::get_instance($app['Core']), $app['Core']);
foreach ($receivers as $receiver) {
@@ -363,7 +362,6 @@ class Push implements ControllerProviderInterface
$Validation = $Basket->getValidation();
}
$appbox = \appbox::get_instance($app['Core']);
$found = false;
@@ -608,7 +606,6 @@ class Push implements ControllerProviderInterface
}
}
return new Response($Serializer->serialize($result, 'json'), 200, array('Content-Type' => 'application/json'));
});
@@ -660,9 +657,6 @@ class Push implements ControllerProviderInterface
}
);
$controllers->match('/edit-list/{list_id}/', function(Application $app, Request $request, $list_id) {
$user = $app['Core']->getAuthenticatedUser();

View File

@@ -46,7 +46,6 @@ class Query implements ControllerProviderInterface
$options = new \searchEngine_options();
$bas = is_array($request->get('bas')) ? $request->get('bas') : array_keys($user->ACL()->get_granted_base());
/* @var $user \User_Adapter */
@@ -148,7 +147,6 @@ class Query implements ControllerProviderInterface
}
$string .= '<div style="display:none;"><div id="NEXT_PAGE"></div><div id="PREV_PAGE"></div></div>';
$explain = "<div id=\"explainResults\" class=\"myexplain\">";
$explain .= "<img src=\"/skins/icons/answers.gif\" /><span><b>";
@@ -204,7 +202,6 @@ class Query implements ControllerProviderInterface
)
);
$json['query'] = $query;
$json['phrasea_props'] = $proposals;
$json['total_answers'] = (int) $result->get_count_available_results();
@@ -212,7 +209,6 @@ class Query implements ControllerProviderInterface
$json['prev_page'] = ($page > 1 && $result->get_count_available_results() > 0) ? ($page - 1) : false;
$json['form'] = $form;
$datas = $app['Core']['Serializer']->serialize($json, 'json');
return new Response($datas, 200, array('Content-Type' => 'application/json'));

View File

@@ -67,7 +67,6 @@ class Root implements ControllerProviderInterface
$cssfile = '000000';
}
$user_feeds = \Feed_Collection::load_all($appbox, $user);
$feeds = array_merge(array($user_feeds->get_aggregate()), $user_feeds->get_feeds());

View File

@@ -35,7 +35,6 @@ class Story implements ControllerProviderInterface
{
$controllers = new ControllerCollection();
$controllers->get('/create/', function(Application $app) {
/* @var $twig \Twig_Environment */
$twig = $app['Core']->getTwig();
@@ -51,7 +50,6 @@ class Story implements ControllerProviderInterface
$collection = \collection::get_from_base_id($request->get('base_id'));
if ( ! $user->ACL()->has_right_on_base($collection->get_base_id(), 'canaddrecord')) {
throw new \Exception_Forbidden('You can not create a story on this collection');
}
@@ -126,8 +124,6 @@ class Story implements ControllerProviderInterface
}
});
$controllers->get('/{sbas_id}/{record_id}/', function(Application $app, $sbas_id, $record_id) {
$Story = new \record_adapter($sbas_id, $record_id);
@@ -139,7 +135,6 @@ class Story implements ControllerProviderInterface
return new Response($html);
})->assert('sbas_id', '\d+')->assert('record_id', '\d+');
$controllers->post(
'/{sbas_id}/{record_id}/addElements/'
, function(Application $app, Request $request, $sbas_id, $record_id) {
@@ -225,7 +220,6 @@ class Story implements ControllerProviderInterface
->assert('child_sbas_id', '\d+')
->assert('child_record_id', '\d+');
/**
* Get the Basket reorder form
*/
@@ -254,7 +248,6 @@ class Story implements ControllerProviderInterface
->assert('sbas_id', '\d+')
->assert('record_id', '\d+');
$controllers->post(
'/{sbas_id}/{record_id}/reorder/'
, function(Application $app, $sbas_id, $record_id) {
@@ -302,7 +295,6 @@ class Story implements ControllerProviderInterface
->assert('sbas_id', '\d+')
->assert('record_id', '\d+');
return $controllers;
}
}

View File

@@ -53,7 +53,6 @@ class Tooltip implements ControllerProviderInterface
return $twig->render('prod/Tooltip/Story.html.twig', array('Story' => $Story));
})->assert('sbas_id', '\d+')->assert('record_id', '\d+');
$controllers->post('/user/{usr_id}/'
, function(Application $app, $usr_id) {
$user = \User_Adapter::getInstance($usr_id, \appbox::get_instance($app['Core']));
@@ -68,7 +67,6 @@ class Tooltip implements ControllerProviderInterface
);
})->assert('usr_id', '\d+');
$controllers->post('/preview/{sbas_id}/{record_id}/'
, function(Application $app, $sbas_id, $record_id) {
$record = new \record_adapter($sbas_id, $record_id);
@@ -86,7 +84,6 @@ class Tooltip implements ControllerProviderInterface
);
})->assert('sbas_id', '\d+')->assert('record_id', '\d+');
$controllers->post('/caption/{sbas_id}/{record_id}/{view}/'
, function(Application $app, $sbas_id, $record_id, $view) {
$number = (int) $app['request']->get('number');
@@ -117,7 +114,6 @@ class Tooltip implements ControllerProviderInterface
);
})->assert('sbas_id', '\d+')->assert('record_id', '\d+');
$controllers->post('/tc_datas/{sbas_id}/{record_id}/'
, function(Application $app, $sbas_id, $record_id) {
$record = new \record_adapter($sbas_id, $record_id);
@@ -134,7 +130,6 @@ class Tooltip implements ControllerProviderInterface
);
})->assert('sbas_id', '\d+')->assert('record_id', '\d+');
$controllers->post('/metas/FieldInfos/{sbas_id}/{field_id}/'
, function(Application $app, $sbas_id, $field_id) {
$databox = \databox::get_instance((int) $sbas_id);
@@ -151,7 +146,6 @@ class Tooltip implements ControllerProviderInterface
);
})->assert('sbas_id', '\d+')->assert('field_id', '\d+');
$controllers->post('/DCESInfos/{sbas_id}/{field_id}/'
, function(Application $app, $sbas_id, $field_id) {
$databox = \databox::get_instance((int) $sbas_id);
@@ -168,7 +162,6 @@ class Tooltip implements ControllerProviderInterface
);
})->assert('sbas_id', '\d+')->assert('field_id', '\d+');
$controllers->post('/metas/restrictionsInfos/{sbas_id}/{field_id}/'
, function(Application $app, $sbas_id, $field_id) {
$databox = \databox::get_instance((int) $sbas_id);

View File

@@ -81,7 +81,6 @@ class UsrLists implements ControllerProviderInterface
);
}
/* @var $list \Entities\UsrList */
$result[] = array(
'name' => $list->getName(),
@@ -212,7 +211,6 @@ class UsrLists implements ControllerProviderInterface
);
}
/* @var $list \Entities\UsrList */
$result = array(
'id' => $list->getId(),
@@ -223,7 +221,6 @@ class UsrLists implements ControllerProviderInterface
'users' => $entries
);
return new Response($app['Core']->getTwig()->render('prod/actions/Feedback/list.html.twig', $result));
}
);
@@ -323,7 +320,6 @@ class UsrLists implements ControllerProviderInterface
}
)->assert('list_id', '\d+');
/**
* Remove a usr_id from a list
*/
@@ -590,7 +586,6 @@ class UsrLists implements ControllerProviderInterface
}
)->assert('list_id', '\d+')->assert('usr_id', '\d+');
return $controllers;
}
}

View File

@@ -42,7 +42,6 @@ class WorkZone implements ControllerProviderInterface
, 'srt' => $app['request']->get('sort')
);
return new Response($app['Core']->getTwig()->render('prod/WorkZone/WorkZone.html.twig', $params));
});
@@ -76,7 +75,6 @@ class WorkZone implements ControllerProviderInterface
$PerPage = 10;
$offsetStart = max(($Page - 1) * $PerPage, 0);
$Baskets = $BasketRepo->findWorkzoneBasket(
$user
, $request->get('Query')
@@ -89,7 +87,6 @@ class WorkZone implements ControllerProviderInterface
$page = floor($offsetStart / $PerPage) + 1;
$maxPage = floor(count($Baskets) / $PerPage) + 1;
$params = array(
'Baskets' => $Baskets
, 'Page' => $page
@@ -117,7 +114,6 @@ class WorkZone implements ControllerProviderInterface
return new Response($app['Core']->getTwig()->render('prod/WorkZone/Browser/Basket.html.twig', $params));
})->assert('basket_id', '\d+');
$controllers->post(
'/attachStories/'
, function(Application $app, Request $request) {
@@ -145,7 +141,6 @@ class WorkZone implements ControllerProviderInterface
if ( ! $user->ACL()->has_access_to_base($Story->get_base_id()))
throw new \Exception_Forbidden('You do not have access to this Story');
if ($StoryWZRepo->findUserStory($user, $Story)) {
$alreadyFixed ++;
continue;
@@ -204,7 +199,6 @@ class WorkZone implements ControllerProviderInterface
}
});
$controllers->post(
'/detachStory/{sbas_id}/{record_id}/'
, function(Application $app, Request $request, $sbas_id, $record_id) {
@@ -240,7 +234,6 @@ class WorkZone implements ControllerProviderInterface
}
})->assert('sbas_id', '\d+')->assert('record_id', '\d+');
return $controllers;
}
}

View File

@@ -82,8 +82,6 @@ class RSSFeeds implements ControllerProviderInterface
return $response;
};
$controllers->get('/feed/{id}/{format}/', function($id, $format) use ($app, $appbox, $display_feed) {
$feed = new \Feed_Adapter($appbox, $id);
@@ -99,8 +97,6 @@ class RSSFeeds implements ControllerProviderInterface
return $display_feed($feed, $format, $page);
})->assert('id', '\d+')->assert('format', '(rss|atom)');
$controllers->get('/userfeed/{token}/{id}/{format}/', function($token, $id, $format) use ($app, $appbox, $display_feed) {
try {
$token = new \Feed_Token($appbox, $token, $id);
@@ -116,8 +112,6 @@ class RSSFeeds implements ControllerProviderInterface
return $display_feed($feed, $format, $page, $token->get_user());
})->assert('id', '\d+')->assert('format', '(rss|atom)');
$controllers->get('/userfeed/aggregated/{token}/{format}/', function($token, $format) use ($app, $appbox, $display_feed) {
try {
$token = new \Feed_TokenAggregate($appbox, $token);
@@ -134,8 +128,6 @@ class RSSFeeds implements ControllerProviderInterface
return $display_feed($feed, $format, $page, $token->get_user());
})->assert('format', '(rss|atom)');
$controllers->get('/aggregated/{format}/', function($format) use ($app, $appbox, $display_feed) {
$feeds = \Feed_Collection::load_public_feeds($appbox);
$feed = $feeds->get_aggregate();

View File

@@ -64,7 +64,6 @@ class Installer implements ControllerProviderInterface
return $app->redirect('/setup/installer/step2/');
}
$ld_path = array(__DIR__ . '/../../../../../templates/web');
$loader = new \Twig_Loader_Filesystem($ld_path);
$twig = new \Twig_Environment($loader);

View File

@@ -68,7 +68,6 @@ class PathFileTest implements ControllerProviderInterface
);
});
return $controllers;
}
}

View File

@@ -99,7 +99,6 @@ class Configuration
$this->setConnexions($connexions);
$configs = $this->getConfigurations();
$retrieve_old_parameters = function(\SplFileInfo $configInc) {

View File

@@ -15,7 +15,6 @@ use Alchemy\Phrasea\Border;
use Alchemy\Phrasea\Core;
use Alchemy\Phrasea\Core\Service;
use Alchemy\Phrasea\Core\Service\ServiceAbstract;
use Alchemy\Phrasea\Core\Service\ServiceInterface;
/**
* Define a Border Manager service which handles checks on files that comes in
@@ -78,10 +77,10 @@ class BorderManager extends ServiceAbstract
try {
$checkerObj = new $className($options);
if(isset($checker['databoxes'])) {
if (isset($checker['databoxes'])) {
$databoxes = array();
foreach($checker['databoxes'] as $sbas_id) {
foreach ($checker['databoxes'] as $sbas_id) {
try {
$databoxes[] = \databox::get_instance($sbas_id);
} catch (\Exception $e) {
@@ -91,10 +90,10 @@ class BorderManager extends ServiceAbstract
$checkerObj->restrictToDataboxes($databoxes);
}
if(isset($checker['collections'])) {
if (isset($checker['collections'])) {
$collections = array();
foreach($checker['collections'] as $base_id) {
foreach ($checker['collections'] as $base_id) {
try {
$collections[] = \collection::get_from_base_id($base_id);
} catch (\Exception $e) {

View File

@@ -50,7 +50,6 @@ class RedisCache extends ServiceAbstract
throw new \Exception('The Redis cache requires the Redis extension.');
}
if ( ! $this->cache) {
$redis = new \Redis();

View File

@@ -11,7 +11,6 @@
namespace Alchemy\Phrasea\Helper;
/**
*
* @license http://opensource.org/licenses/gpl-3.0 GPLv3

View File

@@ -211,7 +211,6 @@ class Edit extends RecordHelper
$twig = $this->getCore()->getTwig();
$databox = \databox::get_instance($this->get_sbas_id());
$databox_fields = array();
@@ -482,7 +481,6 @@ class Edit extends RecordHelper
continue;
}
$key = $record->get_serialize_key();
if ( ! array_key_exists($key, $elements))

View File

@@ -109,7 +109,6 @@ class MoveCollection extends RecordHelper
throw new \Exception_Unauthorized(sprintf("%s do not have the permission to move records to %s", $user->get_login()));
}
if ( ! $this->is_possible())
throw new Exception('This action is not possible');
@@ -126,7 +125,6 @@ class MoveCollection extends RecordHelper
}
}
$collection = \collection::get_from_base_id($base_dest);
foreach ($this->selection as $record) {

View File

@@ -230,7 +230,6 @@ class Edit extends \Alchemy\Phrasea\Helper\Helper
$rs = $stmt->fetchAll(\PDO::FETCH_ASSOC);
$stmt->closeCursor();
$msk_and = null;
$msk_xor = null;
$tbits_and = array();

View File

@@ -134,7 +134,6 @@ class Manage extends \Alchemy\Phrasea\Helper\Helper
$this->query_parms[$k] = false;
}
$query = new \User_Query($appbox);
$templates = $query
->only_templates(true)

View File

@@ -11,7 +11,6 @@
namespace Alchemy\Phrasea\Helper;
/**
*
* WorkZone provides methods for working with the working zone of Phraseanet

View File

@@ -11,7 +11,6 @@
namespace Alchemy\Phrasea\Media\Subdef;
/**
* Audio Subdef
*

View File

@@ -254,7 +254,6 @@ class ACL implements cache_cacheableInterface
if ( ! in_array($sbas_id, $sbas_ids))
continue;
if ( ! $this->has_access_to_sbas($sbas_id)) {
$sbas_to_acces[] = $sbas_id;
}
@@ -316,7 +315,6 @@ class ACL implements cache_cacheableInterface
$mask_and = ctype_digit($mask_and) ? $mask_and : '0';
$mask_xor = ctype_digit($mask_xor) ? $mask_xor : '0';
/**
* apply sb is substractive
*/
@@ -844,7 +842,6 @@ class ACL implements cache_cacheableInterface
$this->_rights_bas = $this->_limited = array();
$this->_global_rights['manageusers'] = false;
$this->_global_rights['coll_manage'] = false;
$this->_global_rights['coll_modify_struct'] = false;
@@ -861,7 +858,6 @@ class ACL implements cache_cacheableInterface
$this->_global_rights['candwnldhd'] = false;
$this->_global_rights['order_master'] = false;
foreach ($rs as $row) {
$this->_rights_bas[$row['base_id']]['actif'] = ($row['actif'] == '1');
@@ -1234,7 +1230,6 @@ class ACL implements cache_cacheableInterface
$stmt->execute(array(':usr_id' => $this->user->get_id()));
$stmt->closeCursor();
$sql = "UPDATE basusr SET lastconn=now()
WHERE usr_id = :usr_id AND actif = 1";
$stmt = $this->appbox->get_connection()->prepare($sql);

View File

@@ -276,7 +276,6 @@ class API_OAuth2_Account
":application_id" => $application->get_id()
);
$stmt = $appbox->get_connection()->prepare($sql);
$stmt->execute($params);
$row = $stmt->fetch(PDO::FETCH_ASSOC);

View File

@@ -398,7 +398,6 @@ class API_OAuth2_Adapter extends OAuth2
, 'redirect_uri' => $request->get('redirect_uri', false)
);
$scope = $request->get('scope', false);
$state = $request->get('state', false);
@@ -426,7 +425,6 @@ class API_OAuth2_Adapter extends OAuth2
, "scope" => array("flags" => FILTER_REQUIRE_SCALAR)
);
$input = filter_var_array($datas, $filters);
/**
@@ -484,7 +482,6 @@ class API_OAuth2_Adapter extends OAuth2
$input["redirect_uri"] = $redirect_uri;
}
/**
* Check response_type
*/
@@ -492,21 +489,18 @@ class API_OAuth2_Adapter extends OAuth2
$this->errorDoRedirectUriCallback($input["redirect_uri"], OAUTH2_ERROR_INVALID_REQUEST, 'Invalid response type.', NULL, $input["state"]);
}
/**
* Check requested auth response type against the list of supported types
*/
if (array_search($input["response_type"], $this->getSupportedAuthResponseTypes()) === FALSE)
$this->errorDoRedirectUriCallback($input["redirect_uri"], OAUTH2_ERROR_UNSUPPORTED_RESPONSE_TYPE, NULL, NULL, $input["state"]);
/**
* Restrict clients to certain authorization response types
*/
if ($this->checkRestrictedAuthResponseType($input["client_id"], $input["response_type"]) === FALSE)
$this->errorDoRedirectUriCallback($input["redirect_uri"], OAUTH2_ERROR_UNAUTHORIZED_CLIENT, NULL, NULL, $input["state"]);
/**
* Validate that the requested scope is supported
*/

View File

@@ -896,7 +896,6 @@ class API_V1_adapter extends API_V1_Abstract
$search_engine = new searchEngine_adapter($registry);
$search_engine->set_options($options);
/**
* @todo ameliorer this shit
*/
@@ -1253,7 +1252,6 @@ class API_V1_adapter extends API_V1_Abstract
$em = $this->core->getEntityManager();
$repository = $em->getRepository('\Entities\Basket');
/* @var $repository \Repositories\BasketRepository */
$Basket = $repository->findUserBasket($basket_id, $this->core->getAuthenticatedUser(), true);
@@ -1372,7 +1370,6 @@ class API_V1_adapter extends API_V1_Abstract
$em = $this->core->getEntityManager();
$repository = $em->getRepository('\Entities\Basket');
/* @var $repository \Repositories\BasketRepository */
$Basket = $repository->findUserBasket($basket_id, $this->core->getAuthenticatedUser(), true);
@@ -1408,7 +1405,6 @@ class API_V1_adapter extends API_V1_Abstract
$em = $this->core->getEntityManager();
$repository = $em->getRepository('\Entities\Basket');
/* @var $repository \Repositories\BasketRepository */
$Basket = $repository->findUserBasket($basket_id, $this->core->getAuthenticatedUser(), true);

View File

@@ -327,7 +327,6 @@ class Bridge_Account
$results = array();
$apis = array();
foreach ($rs as $row) {
$api_id = $row['api_id'];
if ( ! isset($apis[$api_id])) {

View File

@@ -229,7 +229,6 @@ class Bridge_Api_Dailymotion extends Bridge_Api_Abstract implements Bridge_Api_I
switch ($object) {
case self::ELEMENT_TYPE_VIDEO:
$result = $this->_api->call('/me/videos', array('fields' => array(
'created_time'
, 'description'
@@ -795,7 +794,6 @@ class Bridge_Api_Dailymotion extends Bridge_Api_Abstract implements Bridge_Api_I
$length = (int) $field["length"];
$length_min = (int) $field["length_min"];
if ( ! isset($datas[$name]) || trim($datas[$name]) === '') {
if ($required)
$errors[$name . '_' . $key] = _("Ce champ est obligatoire");
@@ -821,7 +819,6 @@ class Bridge_Api_Dailymotion extends Bridge_Api_Abstract implements Bridge_Api_I
$length = (int) $field["length"];
$length_min = (int) $field["length_min"];
if ( ! isset($datas[$name]) || trim($datas[$name]) === '') {
if ($required)
$errors[$name] = _("Ce champ est obligatoire");

View File

@@ -48,7 +48,6 @@ class Bridge_Api_Flickr_Element implements Bridge_Api_ElementInterface
else
$this->init_from_single_entry($entry);
$this->user_id = (string) $user_id;
return $this;

View File

@@ -9,7 +9,6 @@
* file that was distributed with this source code.
*/
/**
*
* @package Bridge

View File

@@ -562,7 +562,6 @@ class Bridge_Api_Youtube extends Bridge_Api_Abstract implements Bridge_Api_Inter
break;
}
if ($error = $this->parse_xml_error($response->getBody())) {
$type = $error['type'];
$code = $error['code'];

View File

@@ -333,7 +333,6 @@ class Bridge_Element
, ':update' => $this->updated_on->format(DATE_ISO8601)
);
$stmt = $this->appbox->get_connection()->prepare($sql);
$stmt->execute($params);
$stmt->closeCursor();
@@ -369,7 +368,6 @@ class Bridge_Element
, ':update' => $this->updated_on->format(DATE_ISO8601)
);
$stmt = $this->appbox->get_connection()->prepare($sql);
$stmt->execute($params);
$stmt->closeCursor();

View File

@@ -85,4 +85,3 @@ class DailymotionWithoutOauth2 extends Dailymotion
}
}
?>

View File

@@ -534,7 +534,6 @@ class Feed_Adapter extends Feed_Abstract implements Feed_Interface, cache_cachea
$stmt->execute(array(':feed_id' => $this->get_id()));
$stmt->closeCursor();
$this->delete_data_from_cache();
$feed_coll = new Feed_Collection($this->appbox, array());

View File

@@ -319,7 +319,6 @@ abstract class Feed_XML_Abstract
if ($thumbnail_sd->get_height())
$thumbnail->setAttribute('height', $thumbnail_sd->get_height());
$thumbnail = $this->addTag($document, $group, 'media:content');
$thumbnail->setAttribute('url', $thumbnail_permalink->get_url());

View File

@@ -144,7 +144,6 @@ class Feed_XML_Atom extends Feed_XML_Abstract implements Feed_XML_Interface
$this->addTag($document, $entry_node, 'content', $entry->get_subtitle());
foreach ($entry->get_content() as $content) {
$this->addContent($document, $entry_node, $content);
}

View File

@@ -242,7 +242,6 @@ class Feed_XML_Cooliris extends Feed_XML_Abstract implements Feed_XML_Interface
$doc->formatOutput = true;
$doc->standalone = true;
$root = $this->addTag($doc, $doc, 'rss');
$root->setAttribute('version', self::VERSION);
@@ -420,7 +419,6 @@ class Feed_XML_Cooliris extends Feed_XML_Abstract implements Feed_XML_Interface
if ($thumbnail_sd->get_height())
$thumbnail->setAttribute('height', $thumbnail_sd->get_height());
$thumbnail = $this->addTag($document, $item, 'media:content');
$thumbnail->setAttribute('url', $thumbnail_permalink->get_url());

View File

@@ -242,7 +242,6 @@ class Feed_XML_RSS extends Feed_XML_Abstract implements Feed_XML_Interface
$doc->formatOutput = true;
$doc->standalone = true;
$root = $this->addTag($doc, $doc, 'rss');
$root->setAttribute('version', self::VERSION);

View File

@@ -106,7 +106,6 @@ class Session_Authentication_Native implements Session_Authentication_Interface
$browser = Browser::getInstance();
$this->check_and_revoke_badlogs($browser->getIP());
$this->check_bad_salinity()
->check_mail_locked()
->challenge_password($browser);

View File

@@ -450,7 +450,6 @@ class Session_Handler
$stmt->execute(array(':old_usr_id' => $oldusr));
$stmt->closeCursor();
$sql = 'UPDATE dsel SET usr_id = :usr_id WHERE usr_id = :old_usr_id';
$stmt = $conn->prepare($sql);
$stmt->execute(array(':usr_id' => $this->get_usr_id(), ':old_usr_id' => $oldusr));

View File

@@ -273,7 +273,6 @@ class User_Query implements User_QueryInterface
}
}
if (count($this->sbas_ids) == 0) {
if ($this->sbas_restrictions)
throw new Exception('No base available for you, not enough rights');
@@ -350,7 +349,6 @@ class User_Query implements User_QueryInterface
}
}
if (count($sql_like) > 0)
$sql .= sprintf(' AND (%s) ', implode($this->like_match, $sql_like));
@@ -552,7 +550,6 @@ class User_Query implements User_QueryInterface
$row = $stmt->fetch(PDO::FETCH_ASSOC);
$stmt->closeCursor();
$this->total = $row['total'];
$this->page = 1;

View File

@@ -287,7 +287,6 @@ class appbox extends base
$upgrader->add_steps_complete(1);
$upgrader->set_current_message(_('Creating new tables'));
$core = bootstrap::getCore();
$em = $core->getEntityManager();
@@ -350,7 +349,6 @@ class appbox extends base
$this->post_upgrade($upgrader);
$upgrader->add_steps_complete(1);
/**
* Step 9
*/

View File

@@ -291,7 +291,6 @@ abstract class base implements cache_cacheableInterface
$rs = $stmt->fetchAll(PDO::FETCH_ASSOC);
$stmt->closeCursor();
$ORMTables = array(
'BasketElements',
'Baskets',
@@ -469,7 +468,6 @@ abstract class base implements cache_cacheableInterface
. $is_default . " " . $isnull . "";
}
if ($table->indexes) {
foreach ($table->indexes->index as $index) {
switch ($index->type) {
@@ -623,7 +621,6 @@ abstract class base implements cache_cacheableInterface
}
}
$sql = "SHOW FULL FIELDS FROM `" . $table['name'] . "`";
$stmt = $this->get_connection()->prepare($sql);
$stmt->execute();
@@ -663,7 +660,6 @@ abstract class base implements cache_cacheableInterface
$expr_found .= ' DEFAULT \'' . $_default . '\'';
}
if (isset($correct_table['fields'][$f_name])) {
if (isset($correct_table['collation'][$f_name]) && $correct_table['collation'][$f_name] != $current_collation) {
$old_type = mb_strtolower(trim($row2['Type']));

View File

@@ -105,7 +105,6 @@ class caption_Field_Value implements cache_cacheableInterface
}
if ($this->VocabularyType) {
/**
* Vocabulary Control has been deactivated

View File

@@ -532,7 +532,6 @@ class collection implements cache_cacheableInterface
$appbox->delete_data_from_cache(appbox::CACHE_LIST_BASES);
cache_databox::update($sbas_id, 'structure');
phrasea::reset_baseDatas();
self::set_admin($new_bas, $user);

View File

@@ -81,8 +81,6 @@ class connection
file_put_contents($registry->get('GV_RootPath') . 'logs/mysql_log.log', $string, FILE_APPEND);
return;
}

View File

@@ -297,7 +297,6 @@ class databox extends base
);
}
ksort($trows);
foreach ($trows as $kgrp => $vgrp)
ksort($trows[$kgrp]);
@@ -615,7 +614,6 @@ class databox extends base
$n ++;
}
$core['file-system']->mkdir($pathout, 0750);
return $pathout . DIRECTORY_SEPARATOR;
@@ -787,7 +785,6 @@ class databox extends base
$stmt->execute($params);
$stmt->closeCursor();
return $this;
}
protected $thesaurus;
@@ -844,7 +841,6 @@ class databox extends base
if ( ! is_null($meta_id))
continue;
$nodes = $xp_struct->query('/record/description/' . $fname);
if ($nodes->length > 0) {
$nodes->item(0)->parentNode->removeChild($nodes->item(0));
@@ -903,7 +899,6 @@ class databox extends base
)
);
$sql = "SELECT * FROM coll";
$stmt = $this->get_connection()->prepare($sql);
$stmt->execute();

View File

@@ -80,7 +80,6 @@ class databox_subdefsStructure implements IteratorAggregate
$subdefgroup = $sx_struct->subdefs[0];
foreach ($subdefgroup as $k => $subdefs) {
$subdefgroup_name = strtolower($subdefs->attributes()->name);

View File

@@ -358,7 +358,7 @@ function giveInscript($lng, $demandes = null)
//je check si ya des cgu pour la base
if ($baseInsc['CGU']) {
$out .= '<tr><td colspan="3" style="text-align:center;">' . _('login::register: L\'acces aux bases ci-dessous implique l\'acceptation des Conditions Generales d\'Utilisation (CGU) suivantes') . '<br/><a class="inscriptlink" href="/include/cguUtils.php?action=PRINT&bas=' . $sbasId . '">' . _('login::register::CGU: ouvrir dans une nouvelle fenetre') . '</a></td></tr>';
//$out .= '<tr><td colspan="3" style="text-align:center;"><div id="CGUTXT'.$sbasId.'" style="width:90%;height:120px;text-align:left;overflow:auto;">'.(string)$baseInsc['CGU'].'</div></td></tr>';
//$out .= '<tr><td colspan="3" style="text-align:center;"><div id="CGUTXT'.$sbasId.'" style="width:90%;height:120px;text-align:left;overflow:auto;">'.(string) $baseInsc['CGU'].'</div></td></tr>';
}
foreach ($baseInsc['Colls'] as $collId => $collName) {
@@ -389,7 +389,7 @@ function giveInscript($lng, $demandes = null)
'<br/><a class="inscriptlink" href="/include/cguUtils.php?action=PRINT&bas=' . $sbasId . '&col=' . $collId . '">' . _('login::register::CGU: ouvrir dans une nouvelle fenetre') . '</a></td></tr>' .
// '<tr >' .
// '<td colspan="3" style="text-align:center;"><div style="height:120px;text-align:left;overflow:auto;">' .
// ''.(string)$collDesc['CGU'].'' .
// ''.(string) $collDesc['CGU'].'' .
// '</div></td>' .
// '</tr>' .
'<tr >' .
@@ -408,4 +408,3 @@ function giveInscript($lng, $demandes = null)
return $out;
}
?>

View File

@@ -133,7 +133,6 @@ class eventsmanager_notify_autoregister extends eventsmanager_notifyAbstract
$mailed = true;
}
$this->broker->notify($usr_id, __CLASS__, $datas, $mailed);
}

View File

@@ -167,7 +167,6 @@ class eventsmanager_notify_bridgeuploadfail extends eventsmanager_notifyAbstract
$reason = (string) $sx->reason;
$body = "reason : " . $reason;
return mail::send_mail($subject, $body, $to, $from);
}

View File

@@ -91,7 +91,6 @@ class eventsmanager_notify_order extends eventsmanager_notifyAbstract
$order_id_dom->appendChild($dom_xml->createTextNode($order_id));
$root->appendChild($usr_id_dom);
$root->appendChild($order_id_dom);
@@ -227,7 +226,6 @@ class eventsmanager_notify_order extends eventsmanager_notifyAbstract
. _('Retrouvez son bon de commande dans l\'interface')
. "</div>\n";
return mail::send_mail($subject, $body, $to, $from);
}

View File

@@ -96,7 +96,6 @@ class eventsmanager_notify_push extends eventsmanager_notifyAbstract
$mailed = true;
}
return $this->broker->notify($params['to'], __CLASS__, $datas, $mailed);
}

View File

@@ -99,7 +99,6 @@ class eventsmanager_notify_register extends eventsmanager_notifyAbstract
$base_ids->appendChild($base_id_node);
}
$root->appendChild($usr_id);
$root->appendChild($base_ids);
@@ -132,7 +131,6 @@ class eventsmanager_notify_register extends eventsmanager_notifyAbstract
$mailed = true;
}
$this->broker->notify($usr_id, __CLASS__, $datas, $mailed);
}

View File

@@ -108,7 +108,6 @@ class eventsmanager_notify_validate extends eventsmanager_notifyAbstract
$mailed = true;
}
return $this->broker->notify($params['to'], __CLASS__, $datas, $mailed);
}

View File

@@ -161,7 +161,6 @@ class geonames
}
$this->cache_ips[$ip] = $output;
return $output;
}
}

View File

@@ -53,7 +53,6 @@ class mail
)
. '</div>';
if ($message != '') {
$body .= "<div>---------------------------------------------------</div>\n" . $message;
}
@@ -100,7 +99,6 @@ class mail
$registry = registry::get_instance();
$subject = sprintf(_('login::register:email: Votre compte %s'), $registry->get('GV_homeTitle'));
$body = "<div>" . _('login::register:Votre inscription a ete prise en compte') . "</div>\n";
if ($auto != '') {

View File

@@ -70,7 +70,6 @@ class module_admin
, 'off_databoxes' => $off_databoxes
);
$core = \bootstrap::getCore();
$twig = $core->getTwig();

View File

@@ -47,6 +47,7 @@ class module_console_checkExtension extends Command
if ( ! extension_loaded('phrasea2')) {
$output->writeln("<error>Missing Extension php-phrasea.</error>");
return 1;
}
@@ -107,7 +108,6 @@ class module_console_checkExtension extends Command
$output->writeln("\t$key => $value");
}
$output->writeln("");
$output->writeln("\n-- phrasea_create_session --");
@@ -168,7 +168,6 @@ class module_console_checkExtension extends Command
}
}
$output->writeln("\n-- phrasea_query --");
$nbanswers = 0;
@@ -188,7 +187,6 @@ class module_console_checkExtension extends Command
, array()
);
if ($ret) {
$output->writeln("<info>Succes ! </info> got result on sbas_id " . $base["sbas_id"]);
} else {
@@ -202,7 +200,6 @@ class module_console_checkExtension extends Command
$nbanswers += $tbases[$kb]["results"]["nbanswers"];
}
$output->writeln("Got a total of <info>$nbanswers</info> answers");
$output->writeln("\n-- phrasea_fetch_results --");

View File

@@ -60,7 +60,6 @@ class module_console_fieldsDelete extends Command
return 1;
}
$dialog = $this->getHelperSet()->get('dialog');
$continue = mb_strtolower(
$dialog->ask(

View File

@@ -63,7 +63,6 @@ class module_console_fieldsRename extends Command
return 1;
}
$dialog = $this->getHelperSet()->get('dialog');
$continue = mb_strtolower(
$dialog->ask(

View File

@@ -152,7 +152,6 @@ class module_console_fileEnsureDevSetting extends Command
{
$cache = $this->configuration->getCache();
if ($this->probeCacheService($output, $cache)) {
if ($this->recommendedCacheService($output, $cache, true)) {
$work_message = '<info>Works !</info>';
@@ -167,7 +166,6 @@ class module_console_fileEnsureDevSetting extends Command
$verification = sprintf("\t--> Verify <info>%s</info> : %s", 'MainCache', $work_message);
$this->printConf($output, "\t" . 'service', $cache, false, $verification);
$this->verifyCacheOptions($output, $cache);
}
@@ -176,7 +174,6 @@ class module_console_fileEnsureDevSetting extends Command
{
$cache = $this->configuration->getOpcodeCache();
if ($this->probeCacheService($output, $cache)) {
if ($this->recommendedCacheService($output, $cache, false)) {
$work_message = '<info>Works !</info>';
@@ -191,7 +188,6 @@ class module_console_fileEnsureDevSetting extends Command
$verification = sprintf("\t--> Verify <info>%s</info> : %s", 'OpcodeCache', $work_message);
$this->printConf($output, "\t" . 'service', $cache, false, $verification);
$this->verifyCacheOptions($output, $cache);
}
@@ -454,8 +450,6 @@ class module_console_fileEnsureDevSetting extends Command
$this->errors ++;
}
foreach ($configuration->all() as $conf => $value) {
switch ($conf) {
case 'type':
@@ -552,8 +546,6 @@ class module_console_fileEnsureDevSetting extends Command
$output->writeln(sprintf("\t--> Verify ORM engine <info>%s</info> : %s", $ormName, $work_message));
if ( ! $configuration->has('type')) {
$output->writeln("\n<error>Configuration has no type</error>");
$this->errors ++;
@@ -564,8 +556,6 @@ class module_console_fileEnsureDevSetting extends Command
$this->errors ++;
}
foreach ($configuration->all() as $conf => $value) {
switch ($conf) {
case 'type':
@@ -589,7 +579,6 @@ class module_console_fileEnsureDevSetting extends Command
}
}
foreach ($configuration->get('options') as $conf => $value) {
switch ($conf) {
case 'log':
@@ -630,7 +619,6 @@ class module_console_fileEnsureDevSetting extends Command
$verification = sprintf("\t--> Verify <info>%s</info> : %s", $name, $work_message);
$this->printConf($output, "\t" . $key_cache, $value_cache, false, $verification);
$this->verifyCacheOptions($output, $value_cache);
break;
@@ -764,7 +752,6 @@ class module_console_fileEnsureDevSetting extends Command
return false;
}
try {
$driver = $Service->getDriver();
} catch (\Exception $e) {
@@ -798,6 +785,7 @@ class module_console_fileEnsureDevSetting extends Command
}
unset($memcached);
return $ret;
break;
case 'redis':
@@ -811,6 +799,7 @@ class module_console_fileEnsureDevSetting extends Command
}
unset($redis);
return $ret;
break;
}

View File

@@ -162,7 +162,6 @@ class module_console_fileEnsureProductionSetting extends Command
$verification = sprintf("\t--> Verify <info>%s</info> : %s", 'MainCache', $work_message);
$this->printConf($output, "\t" . 'service', $cache, false, $verification);
$this->verifyCacheOptions($output, $cache);
}
@@ -171,7 +170,6 @@ class module_console_fileEnsureProductionSetting extends Command
{
$cache = $this->configuration->getOpcodeCache();
if ($this->probeCacheService($output, $cache)) {
if ($this->recommendedCacheService($output, $cache, false)) {
$work_message = '<info>Works !</info>';
@@ -186,7 +184,6 @@ class module_console_fileEnsureProductionSetting extends Command
$verification = sprintf("\t--> Verify <info>%s</info> : %s", 'OpcodeCache', $work_message);
$this->printConf($output, "\t" . 'service', $cache, false, $verification);
$this->verifyCacheOptions($output, $cache);
}
@@ -442,8 +439,6 @@ class module_console_fileEnsureProductionSetting extends Command
$this->errors ++;
}
foreach ($configuration->all() as $conf => $value) {
switch ($conf) {
case 'type':
@@ -540,8 +535,6 @@ class module_console_fileEnsureProductionSetting extends Command
$output->writeln(sprintf("\t--> Verify ORM engine <info>%s</info> : %s", $ormName, $work_message));
if ( ! $configuration->has('type')) {
$output->writeln("\n<error>Configuration has no type</error>");
$this->errors ++;
@@ -552,8 +545,6 @@ class module_console_fileEnsureProductionSetting extends Command
$this->errors ++;
}
foreach ($configuration->all() as $conf => $value) {
switch ($conf) {
case 'type':
@@ -577,7 +568,6 @@ class module_console_fileEnsureProductionSetting extends Command
}
}
foreach ($configuration->get('options') as $conf => $value) {
switch ($conf) {
case 'log':
@@ -627,7 +617,6 @@ class module_console_fileEnsureProductionSetting extends Command
$verification = sprintf("\t--> Verify <info>%s</info> : %s", $name, $work_message);
$this->printConf($output, "\t" . $key_cache, $value_cache, false, $verification);
$this->verifyCacheOptions($output, $value_cache);
break;
@@ -794,6 +783,7 @@ class module_console_fileEnsureProductionSetting extends Command
}
unset($memcached);
return $ret;
break;
case 'redis':
@@ -807,6 +797,7 @@ class module_console_fileEnsureProductionSetting extends Command
}
unset($redis);
return $ret;
break;
}

View File

@@ -56,9 +56,9 @@ class module_console_schedulerState extends Command
public function execute(InputInterface $input, OutputInterface $output)
{
try{
try {
$this->checkSetup();
} catch (\RuntimeException $e){
} catch (\RuntimeException $e) {
return self::EXITCODE_SETUP_ERROR;
}

View File

@@ -28,7 +28,6 @@ class module_console_sphinxGenerateSuggestion extends Command
$this->setDescription('Generate suggestions for Sphinx Search Engine');
return $this;
}

View File

@@ -188,7 +188,6 @@ class module_console_systemExport extends Command
$rs = $stmt->fetchAll(PDO::FETCH_ASSOC);
$stmt->closeCursor();
$done = 0;
$current_total = count($rs);
$total += $current_total;

View File

@@ -83,7 +83,6 @@ class module_console_systemMailCheck extends Command
$continue = mb_strtolower($dialog->ask($output, $question, 'C'));
} while ( ! in_array($continue, array('c', 'd', 's')));
if ($continue == 's') {
return false;
} elseif ($continue == 'c') {

View File

@@ -74,7 +74,6 @@ class module_console_systemUpgrade extends Command
$continue = mb_strtolower($dialog->ask($output, '<question>' . _('Continuer ?') . ' (Y/n)</question>', 'Y'));
} while ( ! in_array($continue, array('y', 'n')));
if ($continue == 'y') {
try {
$Core = \bootstrap::getCore();

View File

@@ -64,9 +64,9 @@ class module_console_taskState extends Command
public function execute(InputInterface $input, OutputInterface $output)
{
try{
try {
$this->checkSetup();
} catch (\RuntimeException $e){
} catch (\RuntimeException $e) {
return self::EXITCODE_SETUP_ERROR;
}

View File

@@ -39,9 +39,9 @@ class module_console_tasklist extends Command
public function execute(InputInterface $input, OutputInterface $output)
{
try{
try {
$this->checkSetup();
} catch (\RuntimeException $e){
} catch (\RuntimeException $e) {
return self::EXITCODE_SETUP_ERROR;
}

View File

@@ -70,9 +70,9 @@ class module_console_taskrun extends Command
public function execute(InputInterface $input, OutputInterface $output)
{
try{
try {
$this->checkSetup();
} catch (\RuntimeException $e){
} catch (\RuntimeException $e) {
return self::EXITCODE_SETUP_ERROR;
}

View File

@@ -144,7 +144,6 @@ class module_report_activity extends module_report
//set report
$this->setReport();
$this->report['legend'] = array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23);
@@ -163,7 +162,6 @@ class module_report_activity extends module_report
$filter = $s->getFilters();
$conn = $s->getConnBas();
$params = array(':main_value' => $value);
$date_filter = $filter->getDateFilter();
$params = array_merge($params, $date_filter['params']);
@@ -182,7 +180,6 @@ class module_report_activity extends module_report
AND (" . $coll_filter['sql'] . ")
ORDER BY date";
$stmt = $conn->prepare($sql);
$stmt->execute($params);
$s->setTotalrows($stmt->rowCount());
@@ -229,7 +226,6 @@ class module_report_activity extends module_report
($no_answer) ? $this->title = _('report:: questions sans reponses') :
$this->title = _('report:: questions les plus posees');
$params = array();
$date_filter = $filter->getDateFilter();
$params = array_merge($params, $date_filter['params']);
@@ -296,7 +292,6 @@ class module_report_activity extends module_report
$databox = \databox::get_instance($this->sbas_id);
$params = array();
$date_filter = $filter->getDateFilter();
$params = array_merge($params, $date_filter['params']);
@@ -327,8 +322,6 @@ class module_report_activity extends module_report
ORDER BY date DESC";
$sql .= $filter->getLimitFilter();
$stmt = $conn->prepare($sql);
$stmt->execute($params);
$rs = $stmt->fetchAll(PDO::FETCH_ASSOC);
@@ -484,7 +477,6 @@ class module_report_activity extends module_report
$site_filter = $filter->getGvSitFilter();
$params = array_merge($params, $site_filter['params']);
$this->req = "
SELECT DISTINCT(log." . $on . ") as " . $on . ",
usrid,
@@ -504,7 +496,6 @@ class module_report_activity extends module_report
$this->enable_limit ? $this->req .= "LIMIT 0," . $this->nb_record : "";
$stmt = $conn->prepare($this->req);
$stmt->execute($params);
$rs = $stmt->fetchAll(PDO::FETCH_ASSOC);
@@ -631,7 +622,6 @@ class module_report_activity extends module_report
}
}
$i ++;
$this->result[$i]['nbprev'] = 0;
@@ -697,7 +687,6 @@ class module_report_activity extends module_report
$conn = $s->getConnBas();
$push = array();
$params = array();
$date_filter = $filter->getDateFilter();
$params = array_merge($params, $date_filter['params']);
@@ -708,7 +697,6 @@ class module_report_activity extends module_report
$record_filter = $filter->getRecordFilter();
$params = array_merge($params, $record_filter['params']);
$sql = "
SELECT log.usrid, log.user , d.final as getter, d.record_id, d.date, s.*
FROM (log_docs as d
@@ -761,7 +749,6 @@ class module_report_activity extends module_report
//set report
$this->setReport();
return($this->report);
}
@@ -872,7 +859,6 @@ class module_report_activity extends module_report
$total = $stmt->rowCount();
$stmt->closeCursor();
for ($i = 0; $i < 24; $i ++ )
$res[$i] = 0;

View File

@@ -236,4 +236,3 @@ class module_report_dashboard_feed implements module_report_dashboard_componentI
}
}
?>

View File

@@ -95,4 +95,3 @@ class module_report_dashboard_group implements module_report_dashboard_component
}
}
?>

View File

@@ -206,4 +206,3 @@ class module_report_dashboard_merge implements module_report_dashboard_component
}
}
?>

View File

@@ -159,4 +159,3 @@ class module_report_dashboard_sort implements module_report_dashboard_componentI
}
}
?>

View File

@@ -230,7 +230,6 @@ class module_report_download extends module_report
$finalfilter .= $collfilter['sql'] . ' AND ';
$finalfilter .= 'log.site = :site_id';
$sql = '
SELECT record.record_id as id, SUM(1) AS nb, subdef.name
FROM ( log

View File

@@ -272,7 +272,6 @@ class module_report_nav extends module_report
$this->initialize();
$stmt = $s->getConnBas()->prepare($sql);
$stmt->execute($params);
$rs = $stmt->fetchAll(PDO::FETCH_ASSOC);
@@ -459,7 +458,6 @@ class module_report_nav extends module_report
$conn = connection::getPDOConnection();
$conn2 = connection::getPDOConnection($this->sbas_id);
$datefilter = array();
if ($this->dmin && $this->dmax) {
@@ -562,7 +560,6 @@ class module_report_nav extends module_report
$this->title = sprintf(
_('report:: Information sur l\'enregistrement numero %d'), (int) $rid);
$x = $record->get_thumbnail();
$this->result[] = array(
'photo' =>
@@ -587,7 +584,6 @@ class module_report_nav extends module_report
$this->title = sprintf(
_('report:: Information sur le navigateur %s'), $navigator);
$params = array(':browser' => $navigator);
$sql = "SELECT DISTINCT(version) as version, COUNT(version) as nb

View File

@@ -49,7 +49,6 @@ class module_report_sqlconnexion extends module_report_sql implements module_rep
$this->sql .= " WHERE " . $report_filter['sql'];
$this->sql .= $this->filter->getOrderFilter() ? : '';
$stmt = $this->connbas->prepare($this->sql);
$stmt->execute($params);
$this->total_row = $stmt->rowCount();
@@ -68,8 +67,6 @@ class module_report_sqlconnexion extends module_report_sql implements module_rep
$this->sql .= " GROUP BY " . $this->groupby;
$this->sql .= $this->filter->getOrderFilter() ? : '';
$stmt = $this->connbas->prepare($this->sql);
$stmt->execute($params);
$this->total_row = $stmt->rowCount();

View File

@@ -257,4 +257,3 @@ class module_report_sqlfilter
}
}
?>

View File

@@ -47,7 +47,6 @@ class module_report_sqlquestion extends module_report_sql implements module_repo
ON log.id = log_search.log_id
";
$this->sql .= " WHERE " . $report_filter['sql'];
$this->sql .= $this->filter->getOrderFilter() ? : '';
@@ -103,4 +102,3 @@ class module_report_sqlquestion extends module_report_sql implements module_repo
}
}
?>

View File

@@ -40,7 +40,6 @@ class p4file
} elseif ($server->is_apache()) {
$fileToProtect = mb_substr($file, mb_strlen($registry->get('GV_mod_auth_token_directory_path')));
$secret = $registry->get('GV_mod_auth_token_passphrase'); // Same as AuthTokenSecret
$protectedPath = p4string::addEndSlash(p4string::delFirstSlash($registry->get('GV_mod_auth_token_directory'))); // Same as AuthTokenPrefix
$hexTime = dechex(time()); // Time in Hexadecimal
@@ -50,7 +49,6 @@ class p4file
// We build the url
$url = '/' . $protectedPath . $token . "/" . $hexTime . $fileToProtect;
$ret = $url;
}
}

Some files were not shown because too many files have changed in this diff Show More