Coding standards

This commit is contained in:
Romain Neutron
2012-03-09 12:49:13 +01:00
parent 20a771ae37
commit 82d9eeef7b
64 changed files with 217 additions and 175 deletions

View File

@@ -315,8 +315,8 @@ return call_user_func(function()
return $app['response']($result); return $app['response']($result);
} }
); );
$route = '/records/{databox_id}/{record_id}/caption/'; $route = '/records/{databox_id}/{record_id}/caption/';
$app->get( $app->get(
$route, function($databox_id, $record_id) use ($app) $route, function($databox_id, $record_id) use ($app)

View File

@@ -293,7 +293,7 @@ return call_user_func(
$basket_collection = $repository->findActiveValidationAndBasketByUser( $basket_collection = $repository->findActiveValidationAndBasketByUser(
$app['Core']->getAuthenticatedUser() $app['Core']->getAuthenticatedUser()
); );
$basket = $repository->findUserBasket( $basket = $repository->findUserBasket(
$ssel_id $ssel_id
, $app['Core']->getAuthenticatedUser() , $app['Core']->getAuthenticatedUser()

View File

@@ -271,7 +271,7 @@ return call_user_func(function()
*/ */
$route = "/applications/dev/new"; $route = "/applications/dev/new";
$app->get($route, function() use ($app) $app->get($route, function() use ($app)
{ {
$var = array("violations" => null, 'form' => null, 'request' => $app['request']); $var = array("violations" => null, 'form' => null, 'request' => $app['request']);
return $app['response']('api/auth/application_dev_new.twig', $var); return $app['response']('api/auth/application_dev_new.twig', $var);

View File

@@ -67,8 +67,10 @@ return call_user_func(function()
$app->get('/', function() use ($app) $app->get('/', function() use ($app)
{ {
if ($app['install'] === true) if ($app['install'] === true)
return $app->redirect('/setup/installer/'); return $app->redirect('/setup/installer/');
if ($app['upgrade'] === true) if ($app['upgrade'] === true)
return $app->redirect('/setup/upgrader/'); return $app->redirect('/setup/upgrader/');
}); });

View File

@@ -57,4 +57,4 @@ class ApcCache extends DoctrineApc implements Cache
return apc_clear_cache() && apc_clear_cache('user'); return apc_clear_cache() && apc_clear_cache('user');
} }
} }

View File

@@ -40,6 +40,7 @@ class ArrayCache extends DoctrineArray implements Cache
{ {
throw new Exception(sprintf('Unable to find key %s', $id)); throw new Exception(sprintf('Unable to find key %s', $id));
} }
return $this->fetch($id); return $this->fetch($id);
} }
@@ -60,4 +61,4 @@ class ArrayCache extends DoctrineArray implements Cache
return true; return true;
} }
} }

View File

@@ -32,4 +32,4 @@ interface Cache extends DoctrineCache
public function deleteMulti(array $array_keys); public function deleteMulti(array $array_keys);
} }

View File

@@ -88,7 +88,7 @@ class Manager
if ($this->hasChange($cacheKey, $service_name)) if ($this->hasChange($cacheKey, $service_name))
{ {
$driver->flush(); $driver->flush();
if ($write) if ($write)
{ {
$this->registry[$cacheKey] = $service_name; $this->registry[$cacheKey] = $service_name;

View File

@@ -57,4 +57,4 @@ class MemcacheCache extends DoctrineMemcache implements Cache
return $this->getMemcache()->flush(); return $this->getMemcache()->flush();
} }
} }

View File

@@ -57,4 +57,4 @@ class XcacheCache extends DoctrineXcache implements Cache
return xcache_clear_cache(XC_TYPE_VAR, 0); return xcache_clear_cache(XC_TYPE_VAR, 0);
} }
} }

View File

@@ -412,22 +412,22 @@ class Basket implements ControllerProviderInterface
$em->persist($basket_element); $em->persist($basket_element);
$basket->addBasketElement($basket_element); $basket->addBasketElement($basket_element);
if(null !== $validationSession = $basket->getValidation()) if(null !== $validationSession = $basket->getValidation())
{ {
if(false !== $validationSession->isFinished()) if(false !== $validationSession->isFinished())
{ {
continue; continue;
} }
$participants = $validationSession->getParticipants(); $participants = $validationSession->getParticipants();
foreach($participants as $participant) foreach($participants as $participant)
{ {
$validationData = new \Entities\ValidationData(); $validationData = new \Entities\ValidationData();
$validationData->setParticipant($participant); $validationData->setParticipant($participant);
$validationData->setBasketElement($basket_element); $validationData->setBasketElement($basket_element);
$em->persist($validationData); $em->persist($validationData);
} }
} }

View File

@@ -763,7 +763,7 @@ class Push implements ControllerProviderInterface
{ {
$query->havePositions($request->get('Position')); $query->havePositions($request->get('Position'));
} }
$sort = $request->get('srt', 'usr_creationdate'); $sort = $request->get('srt', 'usr_creationdate');
$ord = $request->get('ord', 'desc'); $ord = $request->get('ord', 'desc');

View File

@@ -44,7 +44,7 @@ class Root implements ControllerProviderInterface
$registry = $app['Core']->getRegistry(); $registry = $app['Core']->getRegistry();
$user = $app['Core']->getAuthenticatedUser(); $user = $app['Core']->getAuthenticatedUser();
$cssPath = $registry->get('GV_RootPath') . 'www/skins/prod/'; $cssPath = $registry->get('GV_RootPath') . 'www/skins/prod/';
$css = array(); $css = array();
$cssfile = false; $cssfile = false;
@@ -79,7 +79,7 @@ class Root implements ControllerProviderInterface
$thjslist = ""; $thjslist = "";
$queries_topics = ''; $queries_topics = '';
if ($registry->get('GV_client_render_topics') == 'popups') if ($registry->get('GV_client_render_topics') == 'popups')
{ {
$queries_topics = \queries::dropdown_topics(); $queries_topics = \queries::dropdown_topics();
@@ -90,7 +90,7 @@ class Root implements ControllerProviderInterface
} }
$sbas = $bas2sbas = array(); $sbas = $bas2sbas = array();
foreach ($appbox->get_databoxes() as $databox) foreach ($appbox->get_databoxes() as $databox)
{ {
$sbas_id = $databox->get_sbas_id(); $sbas_id = $databox->get_sbas_id();

View File

@@ -110,7 +110,7 @@ class Story implements ControllerProviderInterface
, 'meta_id' => null , 'meta_id' => null
, 'value' => $value , 'value' => $value
); );
break; break;
} }
@@ -334,7 +334,7 @@ class Story implements ControllerProviderInterface
} }
catch (\Exception $e) catch (\Exception $e)
{ {
} }
$Serializer = $app['Core']['Serializer']; $Serializer = $app['Core']['Serializer'];

View File

@@ -279,7 +279,7 @@ class Core extends \Pimple
{ {
return \User_Adapter::getInstance($session->get_usr_id(), $appbox); return \User_Adapter::getInstance($session->get_usr_id(), $appbox);
} }
return null; return null;
} }

View File

@@ -49,6 +49,7 @@ class Configuration
{ {
$specifications = new Configuration\ApplicationSpecification(); $specifications = new Configuration\ApplicationSpecification();
} }
return new self($specifications, $environment); return new self($specifications, $environment);
} }

View File

@@ -134,12 +134,14 @@ class ApplicationSpecification implements Specification
$this->getConfigurationsFile(); $this->getConfigurationsFile();
$this->getConnexionsFile(); $this->getConnexionsFile();
$this->getServicesFile(); $this->getServicesFile();
return true; return true;
} }
catch (\Exception $e) catch (\Exception $e)
{ {
} }
return false; return false;
} }

View File

@@ -19,4 +19,4 @@ namespace Alchemy\Phrasea\Core\Service\Exception;
class ServiceNotFound extends \Exception class ServiceNotFound extends \Exception
{ {
} }

View File

@@ -36,7 +36,7 @@ class FirePHP extends ServiceAbstract implements ServiceInterface
$this->logger = new Logger('FirePHP'); $this->logger = new Logger('FirePHP');
$this->logger->pushHandler(new FirePHPHandler()); $this->logger->pushHandler(new FirePHPHandler());
return $this; return $this;
} }
@@ -60,4 +60,4 @@ class FirePHP extends ServiceAbstract implements ServiceInterface
return array(); return array();
} }
} }

View File

@@ -35,10 +35,10 @@ class Prod extends Helper
$user = $this->getCore()->getAuthenticatedUser(); $user = $this->getCore()->getAuthenticatedUser();
if(!$user instanceof \User_Adapter) if(!$user instanceof \User_Adapter)
{ {
return $search_datas; return $search_datas;
} }
$searchSet = $user->getPrefs('search'); $searchSet = $user->getPrefs('search');
foreach ($user->ACL()->get_granted_sbas() as $databox) foreach ($user->ACL()->get_granted_sbas() as $databox)

View File

@@ -121,7 +121,7 @@ class UserProvider implements ControlProviderInterface
public function getRessource($id) public function getRessource($id)
{ {
$Core = \bootstrap::getCore(); $Core = \bootstrap::getCore();
return \User_Adapter::getInstance($id, \appbox::get_instance($Core)); return \User_Adapter::getInstance($id, \appbox::get_instance($Core));
} }

View File

@@ -56,6 +56,7 @@ class StoryWZRepository extends EntityRepository
{ {
return 0; return 0;
} }
return ($a < $b) ? -1 : 1; return ($a < $b) ? -1 : 1;
}); });

View File

@@ -53,12 +53,12 @@ class API_OAuth2_Form_DevAppDesktop
/** /**
* *
* @var string * @var string
*/ */
public $type; public $type;
public $scheme_website; public $scheme_website;
public $urlwebsite; public $urlwebsite;
/** /**
* *
* @param Request $request * @param Request $request
@@ -116,7 +116,7 @@ class API_OAuth2_Form_DevAppDesktop
/** /**
* *
* @return string * @return string
*/ */
public function getType() public function getType()
{ {
@@ -132,7 +132,7 @@ class API_OAuth2_Form_DevAppDesktop
{ {
return $this->urlwebsite; return $this->urlwebsite;
} }
public function getSchemeCallback() public function getSchemeCallback()
{ {
return ''; return '';
@@ -152,7 +152,8 @@ class API_OAuth2_Form_DevAppDesktop
$metadata->addPropertyConstraint('description', new Constraints\NotBlank($blank)); $metadata->addPropertyConstraint('description', new Constraints\NotBlank($blank));
$metadata->addPropertyConstraint('urlwebsite', new Constraints\NotBlank($blank)); $metadata->addPropertyConstraint('urlwebsite', new Constraints\NotBlank($blank));
$metadata->addPropertyConstraint('urlwebsite', new Constraints\Url($url)); $metadata->addPropertyConstraint('urlwebsite', new Constraints\Url($url));
return; return;
} }
} }

View File

@@ -50,10 +50,10 @@ class API_OAuth2_Form_DevAppInternet
* @var string * @var string
*/ */
public $callback; public $callback;
public $scheme_website; public $scheme_website;
public $scheme_callback; public $scheme_callback;
public $urlwebsite; public $urlwebsite;
public $urlcallback; public $urlcallback;
@@ -71,10 +71,10 @@ class API_OAuth2_Form_DevAppInternet
$this->scheme_website = $request->get('scheme-website', 'http://'); $this->scheme_website = $request->get('scheme-website', 'http://');
$this->scheme_callback = $request->get('scheme-callback', 'http://'); $this->scheme_callback = $request->get('scheme-callback', 'http://');
$this->type = API_OAuth2_Application::WEB_TYPE; $this->type = API_OAuth2_Application::WEB_TYPE;
$this->urlwebsite = $this->scheme_website.$this->website; $this->urlwebsite = $this->scheme_website.$this->website;
$this->urlcallback = $this->scheme_callback.$this->callback; $this->urlcallback = $this->scheme_callback.$this->callback;
return $this; return $this;
} }
@@ -116,7 +116,7 @@ class API_OAuth2_Form_DevAppInternet
/** /**
* *
* @return string * @return string
*/ */
public function getType() public function getType()
{ {
@@ -159,6 +159,7 @@ class API_OAuth2_Form_DevAppInternet
$metadata->addPropertyConstraint('urlwebsite', new Constraints\Url($url)); $metadata->addPropertyConstraint('urlwebsite', new Constraints\Url($url));
$metadata->addPropertyConstraint('urlcallback', new Constraints\NotBlank($blank)); $metadata->addPropertyConstraint('urlcallback', new Constraints\NotBlank($blank));
$metadata->addPropertyConstraint('urlcallback', new Constraints\Url($url)); $metadata->addPropertyConstraint('urlcallback', new Constraints\Url($url));
return; return;
} }

View File

@@ -207,7 +207,7 @@ class API_V1_adapter extends API_V1_Abstract
public function caption_records(Request $request, $databox_id, $record_id) public function caption_records(Request $request, $databox_id, $record_id)
{ {
$result = new API_V1_result($request, $this); $result = new API_V1_result($request, $this);
$record = $this->appbox->get_databox($databox_id)->get_record($record_id); $record = $this->appbox->get_databox($databox_id)->get_record($record_id);
$fields = $record->get_caption()->get_fields(); $fields = $record->get_caption()->get_fields();
$ret = array(); $ret = array();
@@ -220,9 +220,10 @@ class API_V1_adapter extends API_V1_Abstract
); );
} }
$result->set_datas($ret); $result->set_datas($ret);
return $result; return $result;
} }
/** /**
* Get an API_V1_result containing the results of a records search * Get an API_V1_result containing the results of a records search
* *

View File

@@ -130,17 +130,17 @@ class Bridge_Api_Dailymotion_Container implements Bridge_Api_ContainerInterface
{ {
return $this->url; return $this->url;
} }
public function get_duration() public function get_duration()
{ {
return ''; return '';
} }
public function get_category() public function get_category()
{ {
return ''; return '';
} }
public function is_private() public function is_private()
{ {
return null; return null;

View File

@@ -377,6 +377,7 @@ class Bridge_Api_Flickr extends Bridge_Api_Abstract implements Bridge_Api_Interf
if (!$response->isOk()) if (!$response->isOk())
{ {
if ($response->err_code === 3) //Already exists in photoset if ($response->err_code === 3) //Already exists in photoset
return; return;
throw new Bridge_Exception_ApiConnectorRequestFailed(); throw new Bridge_Exception_ApiConnectorRequestFailed();
} }
@@ -663,12 +664,15 @@ class Bridge_Api_Flickr extends Bridge_Api_Abstract implements Bridge_Api_Interf
{ {
if (!$this->registry->get('GV_flickr_api')) if (!$this->registry->get('GV_flickr_api'))
return false; return false;
if (trim($this->registry->get('GV_flickr_client_id')) === '') if (trim($this->registry->get('GV_flickr_client_id')) === '')
return false; return false;
if (trim($this->registry->get('GV_flickr_client_secret')) === '') if (trim($this->registry->get('GV_flickr_client_secret')) === '')
return false; return false;
return true; return true;

View File

@@ -138,17 +138,17 @@ class Bridge_Api_Flickr_Container implements Bridge_Api_ContainerInterface
return $this->type; return $this->type;
} }
public function get_duration() public function get_duration()
{ {
return ''; return '';
} }
public function get_category() public function get_category()
{ {
return ''; return '';
} }
public function is_private() public function is_private()
{ {
return null; return null;

View File

@@ -121,14 +121,14 @@ class Bridge_Api_Youtube_Container implements Bridge_Api_ContainerInterface
{ {
return ''; return '';
} }
public function get_category() public function get_category()
{ {
return ''; return '';
} }
public function is_private() public function is_private()
{ {
return null; return null;

View File

@@ -136,10 +136,12 @@ class appbox extends base
$custom_path.= $collection->get_base_id(); $custom_path.= $collection->get_base_id();
if (is_null($pathfile)) if (is_null($pathfile))
return $this; return $this;
$datas = file_get_contents($pathfile->getPathname()); $datas = file_get_contents($pathfile->getPathname());
if (is_null($datas)) if (is_null($datas))
return $this; return $this;
file_put_contents($file, $datas); file_put_contents($file, $datas);
@@ -191,10 +193,12 @@ class appbox extends base
$custom_path.= $pic_type . '_' . $databox->get_sbas_id(); $custom_path.= $pic_type . '_' . $databox->get_sbas_id();
if (is_null($pathfile)) if (is_null($pathfile))
return $this; return $this;
$datas = file_get_contents($pathfile->getPathname()); $datas = file_get_contents($pathfile->getPathname());
if (is_null($datas)) if (is_null($datas))
return $this; return $this;
file_put_contents($file, $datas); file_put_contents($file, $datas);
@@ -540,6 +544,7 @@ class appbox extends base
public function get_databoxes() public function get_databoxes()
{ {
if ($this->databoxes) if ($this->databoxes)
return $this->databoxes; return $this->databoxes;
$ret = array(); $ret = array();

View File

@@ -79,6 +79,7 @@ abstract class base implements cache_cacheableInterface
public function get_schema() public function get_schema()
{ {
if ($this->schema) if ($this->schema)
return $this->schema; return $this->schema;
$this->load_schema(); $this->load_schema();
@@ -167,6 +168,7 @@ abstract class base implements cache_cacheableInterface
{ {
$this->cache = $this->Core->getCache(); $this->cache = $this->Core->getCache();
} }
return $this->cache; return $this->cache;
} }
@@ -232,6 +234,7 @@ abstract class base implements cache_cacheableInterface
{ {
if ($this->version) if ($this->version)
return $this->version; return $this->version;
$version = '0.0.0'; $version = '0.0.0';
@@ -260,8 +263,10 @@ abstract class base implements cache_cacheableInterface
public function upgradeavailable() public function upgradeavailable()
{ {
if ($this->get_version()) if ($this->get_version())
return version_compare(\Alchemy\Phrasea\Core\Version::getNumber(), $this->get_version(), '>'); return version_compare(\Alchemy\Phrasea\Core\Version::getNumber(), $this->get_version(), '>');
else else
return true; return true;
} }
@@ -399,6 +404,7 @@ abstract class base implements cache_cacheableInterface
protected function load_schema() protected function load_schema()
{ {
if ($this->schema) if ($this->schema)
return $this; return $this;
$structure = simplexml_load_file(__DIR__ . "/../../lib/conf.d/bases_structure.xml"); $structure = simplexml_load_file(__DIR__ . "/../../lib/conf.d/bases_structure.xml");

View File

@@ -59,6 +59,7 @@ class cache_databox
if ($date <= $last_update) if ($date <= $last_update)
{ {
self::$refreshing = false; self::$refreshing = false;
return; return;
} }

View File

@@ -79,6 +79,7 @@ class gatekeeper
$session = $appbox->get_session(); $session = $appbox->get_session();
if (http_request::is_command_line()) if (http_request::is_command_line())
return; return;
if (isset($_SERVER['PHP_SELF']) && trim($_SERVER['PHP_SELF'])) if (isset($_SERVER['PHP_SELF']) && trim($_SERVER['PHP_SELF']))
@@ -131,6 +132,7 @@ class gatekeeper
if ($this->_PHP_SELF == '/thesaurus2/xmlhttp/getterm.x.php' if ($this->_PHP_SELF == '/thesaurus2/xmlhttp/getterm.x.php'
|| $this->_PHP_SELF == '/thesaurus2/xmlhttp/searchcandidate.x.php' || $this->_PHP_SELF == '/thesaurus2/xmlhttp/searchcandidate.x.php'
|| $this->_PHP_SELF == '/thesaurus2/xmlhttp/getsy.x.php') || $this->_PHP_SELF == '/thesaurus2/xmlhttp/getsy.x.php')
return; return;
phrasea::redirect('/login/?redirect=/thesaurus2'); phrasea::redirect('/login/?redirect=/thesaurus2');
break; break;
@@ -139,6 +141,7 @@ class gatekeeper
break; break;
case 'admin': case 'admin':
if ($this->_script_name === 'runscheduler.php') if ($this->_script_name === 'runscheduler.php')
return; return;
phrasea::redirect('/login/?redirect=' . $_SERVER['REQUEST_URI']); phrasea::redirect('/login/?redirect=' . $_SERVER['REQUEST_URI']);
break; break;
@@ -158,6 +161,7 @@ class gatekeeper
return; return;
case 'setup': case 'setup':
if ($appbox->upgradeavailable()) if ($appbox->upgradeavailable())
return; return;
else else
phrasea::redirect('/login/'); phrasea::redirect('/login/');
@@ -274,6 +278,7 @@ class gatekeeper
$parm = $request->get_parms('LOG'); $parm = $request->get_parms('LOG');
if (is_null($parm["LOG"])) if (is_null($parm["LOG"]))
return $this; return $this;
try try

View File

@@ -306,6 +306,7 @@ class module_console_fileEnsureDevSetting extends Command
$output->writeln(sprintf('<error>Miss required keys %s</error>', implode(', ', $required))); $output->writeln(sprintf('<error>Miss required keys %s</error>', implode(', ', $required)));
$this->errors++; $this->errors++;
} }
return; return;
} }
@@ -447,6 +448,7 @@ class module_console_fileEnsureDevSetting extends Command
{ {
$config = new \Doctrine\DBAL\Configuration(); $config = new \Doctrine\DBAL\Configuration();
$conn = \Doctrine\DBAL\DriverManager::getConnection($connexion->all(), $config); $conn = \Doctrine\DBAL\DriverManager::getConnection($connexion->all(), $config);
return true; return true;
} }
catch (\Exception $e) catch (\Exception $e)

View File

@@ -300,6 +300,7 @@ class module_console_fileEnsureProductionSetting extends Command
$output->writeln(sprintf('<error>Miss required keys %s</error>', implode(', ', $required))); $output->writeln(sprintf('<error>Miss required keys %s</error>', implode(', ', $required)));
$this->errors++; $this->errors++;
} }
return; return;
} }
@@ -441,6 +442,7 @@ class module_console_fileEnsureProductionSetting extends Command
{ {
$config = new \Doctrine\DBAL\Configuration(); $config = new \Doctrine\DBAL\Configuration();
$conn = \Doctrine\DBAL\DriverManager::getConnection($connexion->all(), $config); $conn = \Doctrine\DBAL\DriverManager::getConnection($connexion->all(), $config);
return true; return true;
} }
catch (\Exception $e) catch (\Exception $e)
@@ -896,6 +898,7 @@ class module_console_fileEnsureProductionSetting extends Command
{ {
return false; return false;
} }
return $server === $Service->getDriver()->isServer(); return $server === $Service->getDriver()->isServer();
} }

View File

@@ -645,7 +645,7 @@ class module_report_activity extends module_report
{ {
unset($this->result[$i]); unset($this->result[$i]);
} }
if (isset($this->result[$i]['poiddoc']) && isset($this->result[$i]['poidprev'])) if (isset($this->result[$i]['poiddoc']) && isset($this->result[$i]['poidprev']))
{ {
$this->result[$i]['poiddoc'] = p4string::format_octets($this->result[$i]['poiddoc']); $this->result[$i]['poiddoc'] = p4string::format_octets($this->result[$i]['poiddoc']);
@@ -653,7 +653,7 @@ class module_report_activity extends module_report
} }
} }
$i++; $i++;
$this->result[$i]['nbprev'] = 0; $this->result[$i]['nbprev'] = 0;
@@ -692,7 +692,7 @@ class module_report_activity extends module_report
$save_user = $user; $save_user = $user;
} }
unset($this->result[$i]); unset($this->result[$i]);
$nb_row = $i + 1; $nb_row = $i + 1;
$this->total = $nb_row; $this->total = $nb_row;
@@ -772,7 +772,7 @@ class module_report_activity extends module_report
} }
catch (Exception $e) catch (Exception $e)
{ {
} }
} }
elseif ($value == "size") elseif ($value == "size")

View File

@@ -64,9 +64,9 @@ class patch_3602 implements patchInterface
} }
catch(\PDOException $e) catch(\PDOException $e)
{ {
} }
return true; return true;
} }

View File

@@ -222,13 +222,13 @@ class set_order extends set_abstract
$core = \bootstrap::getCore(); $core = \bootstrap::getCore();
$em = $core->getEntityManager(); $em = $core->getEntityManager();
$Basket = null; $Basket = null;
/* @var $repository \Repositories\BasketRepository */ /* @var $repository \Repositories\BasketRepository */
if($this->ssel_id) if($this->ssel_id)
{ {
$repository = $em->getRepository('\Entities\Basket'); $repository = $em->getRepository('\Entities\Basket');
try try
{ {
$Basket = $repository->findUserBasket($this->ssel_id, $core->getAuthenticatedUser(), false); $Basket = $repository->findUserBasket($this->ssel_id, $core->getAuthenticatedUser(), false);
@@ -284,8 +284,8 @@ class set_order extends set_abstract
$Basket->addBasketElement($BasketElement); $Basket->addBasketElement($BasketElement);
$em->persist($BasketElement); $em->persist($BasketElement);
$params = array( $params = array(
':usr_id' => $session->get_usr_id() ':usr_id' => $session->get_usr_id()
, ':order_id' => $this->id , ':order_id' => $this->id

View File

@@ -607,15 +607,15 @@ class setup
if ($Core->getCache()->isServer()) if ($Core->getCache()->isServer())
{ {
$stats = $Core->getCache()->getStats(); $stats = $Core->getCache()->getStats();
echo '<li>' . sprintf(_('setup::Serveur actif sur %s'), $registry->get('GV_cache_server_host') . ':' . $registry->get('GV_cache_server_port')) . '</li>'; echo '<li>' . sprintf(_('setup::Serveur actif sur %s'), $registry->get('GV_cache_server_host') . ':' . $registry->get('GV_cache_server_port')) . '</li>';
echo "<table>"; echo "<table>";
foreach ($stats as $name => $stat) foreach ($stats as $name => $stat)
{ {
echo "<tr class='even'><td>" . $name . "</td><td> " . $stat . "</td></tr>"; echo "<tr class='even'><td>" . $name . "</td><td> " . $stat . "</td></tr>";
} }
echo "</table>"; echo "</table>";
} }
else else
@@ -806,7 +806,7 @@ class setup
$appConf = new \Alchemy\Phrasea\Core\Configuration\ApplicationSpecification(); $appConf = new \Alchemy\Phrasea\Core\Configuration\ApplicationSpecification();
$appConf->delete(); $appConf->delete();
return; return;
} }

View File

@@ -99,6 +99,7 @@ class sphinxrt
$cl = new SphinxClient(); $cl = new SphinxClient();
if ($cl->Status() === false) if ($cl->Status() === false)
return $this; return $this;
$cl->SetServer($registry->get('GV_sphinx_host'), (int) $registry->get('GV_sphinx_port')); $cl->SetServer($registry->get('GV_sphinx_host'), (int) $registry->get('GV_sphinx_port'));

View File

@@ -35,6 +35,7 @@ $extractDateFields = function(\Alchemy\Phrasea\Core $Core) {
$date_sort_fields[$date['fieldname']] = $date['fieldname']; $date_sort_fields[$date['fieldname']] = $date['fieldname'];
} }
} }
return $date_sort_fields; return $date_sort_fields;
}; };

View File

@@ -31,7 +31,7 @@
<directory>../lib/unitTest/</directory> <directory>../lib/unitTest/</directory>
</testsuite> </testsuite>
</testsuites> </testsuites>
<filter> <filter>
<blacklist> <blacklist>
<directory>./vendor</directory> <directory>./vendor</directory>

View File

@@ -401,7 +401,7 @@ class ApiYamlApplication extends PhraseanetWebTestCaseAbstract
$this->evaluateBadRequestRoute($route, array('GET')); $this->evaluateBadRequestRoute($route, array('GET'));
$this->evaluateMethodNotAllowedRoute($route, array('POST', 'PUT', 'DELETE')); $this->evaluateMethodNotAllowedRoute($route, array('POST', 'PUT', 'DELETE'));
} }
public function testRecordsMetadatasRoute() public function testRecordsMetadatasRoute()
{ {
foreach (static::$databoxe_ids as $databox_id) foreach (static::$databoxe_ids as $databox_id)
@@ -1243,7 +1243,7 @@ class ApiYamlApplication extends PhraseanetWebTestCaseAbstract
$this->assertTrue(is_string($meta["value"])); $this->assertTrue(is_string($meta["value"]));
} }
} }
protected function evaluateRecordsMetadataResponse($content) protected function evaluateRecordsMetadataResponse($content)
{ {
$this->assertArrayHasKey("metadatas", $content["response"]); $this->assertArrayHasKey("metadatas", $content["response"]);

View File

@@ -312,7 +312,7 @@ class ApplicationLightboxTest extends PhraseanetWebTestCaseAuthenticatedAbstract
$datas = json_decode($this->client->getResponse()->getContent()); $datas = json_decode($this->client->getResponse()->getContent());
$this->assertTrue(is_object($datas), 'asserting good json datas'); $this->assertTrue(is_object($datas), 'asserting good json datas');
$this->assertTrue($datas->error); $this->assertTrue($datas->error);
$validationBasket = $this->insertOneValidationBasket(); $validationBasket = $this->insertOneValidationBasket();
$crawler = $this->client->request('POST', '/ajax/SET_RELEASE/' . $validationBasket->getId() . '/'); $crawler = $this->client->request('POST', '/ajax/SET_RELEASE/' . $validationBasket->getId() . '/');

View File

@@ -461,45 +461,45 @@ class ControllerBasketTest extends PhraseanetWebTestCaseAuthenticatedAbstract
$this->assertEquals(2, $basket->getElements()->count()); $this->assertEquals(2, $basket->getElements()->count());
} }
public function testAddElementToValidationPost() public function testAddElementToValidationPost()
{ {
$em = self::$core->getEntityManager(); $em = self::$core->getEntityManager();
$datas = $em->getRepository('Entities\ValidationData')->findAll(); $datas = $em->getRepository('Entities\ValidationData')->findAll();
$countDatas = count($datas); $countDatas = count($datas);
$validationSession = new \Entities\ValidationSession(); $validationSession = new \Entities\ValidationSession();
$validationSession->setDescription('Une description au hasard'); $validationSession->setDescription('Une description au hasard');
$validationSession->setName('Un nom de validation'); $validationSession->setName('Un nom de validation');
$expires = new \DateTime(); $expires = new \DateTime();
$expires->modify('+1 week'); $expires->modify('+1 week');
$validationSession->setExpires($expires); $validationSession->setExpires($expires);
$validationSession->setInitiator(self::$user); $validationSession->setInitiator(self::$user);
$basket = new \Entities\Basket(); $basket = new \Entities\Basket();
$basket->setName('test'); $basket->setName('test');
$basket->setDescription('description'); $basket->setDescription('description');
$basket->setOwner(self::$user); $basket->setOwner(self::$user);
$basket->setValidation($validationSession); $basket->setValidation($validationSession);
$validationSession->setBasket($basket); $validationSession->setBasket($basket);
$validationParticipant = new \Entities\ValidationParticipant(); $validationParticipant = new \Entities\ValidationParticipant();
$validationParticipant->setSession($validationSession); $validationParticipant->setSession($validationSession);
$validationParticipant->setUser(self::$user_alt1); $validationParticipant->setUser(self::$user_alt1);
$validationSession->addValidationParticipant($validationParticipant); $validationSession->addValidationParticipant($validationParticipant);
$em->persist($validationParticipant); $em->persist($validationParticipant);
$em->persist($basket); $em->persist($basket);
$em->persist($validationSession); $em->persist($validationSession);
$em->flush(); $em->flush();
$route = sprintf('/baskets/%s/addElements/', $basket->getId()); $route = sprintf('/baskets/%s/addElements/', $basket->getId());
$records = array( $records = array(
self::$record_1->get_serialize_key(), self::$record_1->get_serialize_key(),
self::$record_2->get_serialize_key(), self::$record_2->get_serialize_key(),
@@ -522,13 +522,13 @@ class ControllerBasketTest extends PhraseanetWebTestCaseAuthenticatedAbstract
$basket = $em->getRepository('Entities\Basket')->find($basket->getId()); $basket = $em->getRepository('Entities\Basket')->find($basket->getId());
$this->assertEquals(2, $basket->getElements()->count()); $this->assertEquals(2, $basket->getElements()->count());
$datas = $em->getRepository('Entities\ValidationData')->findAll(); $datas = $em->getRepository('Entities\ValidationData')->findAll();
$this->assertTrue($countDatas < count($datas), 'assert that '.count($datas).' > '.$countDatas ); $this->assertTrue($countDatas < count($datas), 'assert that '.count($datas).' > '.$countDatas );
} }
public function testAddElementPostJSON() public function testAddElementPostJSON()
{ {
$basket = $this->insertOneBasket(); $basket = $this->insertOneBasket();

View File

@@ -271,7 +271,7 @@ class BridgeApplication extends PhraseanetWebTestCaseAuthenticatedAbstract
} }
catch (Exception $e) catch (Exception $e)
{ {
} }
try try
@@ -281,7 +281,7 @@ class BridgeApplication extends PhraseanetWebTestCaseAuthenticatedAbstract
} }
catch (Exception $e) catch (Exception $e)
{ {
} }
} }

View File

@@ -73,7 +73,7 @@
{% if app_type == "web" %} {% if app_type == "web" %}
<tr class="callback" style="height:25px;"> <tr class="callback" style="height:25px;">
<td><label for="callback">{% trans 'URL de callback' %} <br/></label></td> <td><label for="callback">{% trans 'URL de callback' %} <br/></label></td>
<td class="url-td"> <td class="url-td">
<select name="scheme-callback"> <select name="scheme-callback">
<option value="http://">http://</option> <option value="http://">http://</option>
<option value="https://">https://</option> <option value="https://">https://</option>

View File

@@ -27,10 +27,10 @@
<td>{% trans 'URL de callback' %}</td> <td>{% trans 'URL de callback' %}</td>
{% if app.get_type == constant('API_OAuth2_Application::DESKTOP_TYPE') %} {% if app.get_type == constant('API_OAuth2_Application::DESKTOP_TYPE') %}
<td> <td>
<span>{{app.get_redirect_uri}}</span> <span>{{app.get_redirect_uri}}</span>
</td> </td>
{% else %} {% else %}
<td class="url_callback"><span class="url_callback_input">{{app.get_redirect_uri}}</span> <td class="url_callback"><span class="url_callback_input">{{app.get_redirect_uri}}</span>
<button type="button" class="save_callback" style="display:none;">save</button> <button type="button" class="save_callback" style="display:none;">save</button>
<button type="button" class="modifier_callback" style="display:none;">modifier</button> <button type="button" class="modifier_callback" style="display:none;">modifier</button>
</td> </td>

View File

@@ -1,36 +1,36 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html> <html>
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<title>Phraseanet Authentication</title> <title>Phraseanet Authentication</title>
<meta name="author" content="Alchemy" /> <meta name="author" content="Alchemy" />
<!-- Mobile viewport optimized --> <!-- Mobile viewport optimized -->
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- styles --> <!-- styles -->
<link rel="stylesheet" type="text/css" href="/skins/html5/bootstrap/css/bootstrap.css" /> <link rel="stylesheet" type="text/css" href="/skins/html5/bootstrap/css/bootstrap.css" />
<link rel="stylesheet" type="text/css" href="/skins/html5/bootstrap/css/bootstrap-responsive.css" /> <link rel="stylesheet" type="text/css" href="/skins/html5/bootstrap/css/bootstrap-responsive.css" />
<link rel="stylesheet" type="text/css" href="/skins/oauth/default.css" /> <link rel="stylesheet" type="text/css" href="/skins/oauth/default.css" />
<!-- All JavaScript at the bottom, except this Modernizr build. <!-- All JavaScript at the bottom, except this Modernizr build.
Modernizr enables HTML5 elements & feature detects for optimal performance. --> Modernizr enables HTML5 elements & feature detects for optimal performance. -->
<script type="text/javascript" src="/skins/html5/Boilerplate/js/modernizr-2.5.2.min.js"></script> <script type="text/javascript" src="/skins/html5/Boilerplate/js/modernizr-2.5.2.min.js"></script>
<!-- HTML5 shim, for IE6-8 support of HTML5 elements --> <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]> <!--[if lt IE 9]>
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script> <script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]--> <![endif]-->
</head> </head>
<body> <body>
<div id="page" class="container"> <div id="page" class="container">
<div id="main" class="row"> <div id="main" class="row">
<div id="title-box" class="span6 offset3"> <div id="title-box" class="span6 offset3">
<h1 id="namePhr">{{home_title}}</h1> <h1 id="namePhr">{{home_title}}</h1>
</div> </div>
{% if not session.is_authenticated %} {% if not session.is_authenticated %}
<div id="content-box" class="span6 offset3"> <div id="content-box" class="span6 offset3">
<form id="login-form" class="form-vertical" method="post"> <form id="login-form" class="form-vertical" method="post">
@@ -53,7 +53,7 @@
<a href="#">{% trans 'Probl&egrave;mes de connexion ?' %}</a> <a href="#">{% trans 'Probl&egrave;mes de connexion ?' %}</a>
</p> </p>
</div> </div>
{% else %} {% else %}
{% if user is not none %} {% if user is not none %}
{% set username = '<b>' ~ user.get_display_name() ~ '</b>' %} {% set username = '<b>' ~ user.get_display_name() ~ '</b>' %}
<div id="hello-box" class="span6 offset3"> <div id="hello-box" class="span6 offset3">
@@ -62,7 +62,7 @@
Hello {{username}} Hello {{username}}
{% endtrans %} {% endtrans %}
</p> </p>
</div> </div>
{% endif %} {% endif %}
{% if auth.getClient() is not none %} {% if auth.getClient() is not none %}
<div id="text-box" class="span6 offset3"> <div id="text-box" class="span6 offset3">
@@ -95,8 +95,8 @@
<input id="button_deny" class="btn btn-inverse btn-large span3" type="submit" value="{% trans 'Ne pas autoriser' %}" /> <input id="button_deny" class="btn btn-inverse btn-large span3" type="submit" value="{% trans 'Ne pas autoriser' %}" />
</form> </form>
</div> </div>
{% endif %} {% endif %}
</div> </div>
</div> </div>
@@ -115,5 +115,5 @@
<script type="text/javascript" src="/skins/html5/bootstrap/js/bootstrap-transition.js"></script> <script type="text/javascript" src="/skins/html5/bootstrap/js/bootstrap-transition.js"></script>
<script type="text/javascript" src="/skins/html5/bootstrap/js/bootstrap-typeahead.js"></script> <script type="text/javascript" src="/skins/html5/bootstrap/js/bootstrap-typeahead.js"></script>
</body> </body>
</html> </html>

View File

@@ -1,8 +1,8 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html> <html>
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<title> <title>
{% if error is defined %} {% if error is defined %}
{% trans 'Fail' %} {% trans 'Fail' %}
{% else %} {% else %}
@@ -14,20 +14,20 @@
<!-- Mobile viewport optimized --> <!-- Mobile viewport optimized -->
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- styles --> <!-- styles -->
<link rel="stylesheet" type="text/css" href="/skins/html5/bootstrap/css/bootstrap.css" /> <link rel="stylesheet" type="text/css" href="/skins/html5/bootstrap/css/bootstrap.css" />
<link rel="stylesheet" type="text/css" href="/skins/html5/bootstrap/css/bootstrap-responsive.css" /> <link rel="stylesheet" type="text/css" href="/skins/html5/bootstrap/css/bootstrap-responsive.css" />
<link rel="stylesheet" type="text/css" href="/skins/oauth/default.css" /> <link rel="stylesheet" type="text/css" href="/skins/oauth/default.css" />
<!-- All JavaScript at the bottom, except this Modernizr build. <!-- All JavaScript at the bottom, except this Modernizr build.
Modernizr enables HTML5 elements & feature detects for optimal performance. --> Modernizr enables HTML5 elements & feature detects for optimal performance. -->
<script type="text/javascript" src="/skins/html5/Boilerplate/js/modernizr-2.5.2.min.js"></script> <script type="text/javascript" src="/skins/html5/Boilerplate/js/modernizr-2.5.2.min.js"></script>
<!-- HTML5 shim, for IE6-8 support of HTML5 elements --> <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]> <!--[if lt IE 9]>
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script> <script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]--> <![endif]-->
</head> </head>
<body> <body>
<div id="page" class="container"> <div id="page" class="container">
@@ -59,7 +59,7 @@
{% endtrans %} {% endtrans %}
</p> </p>
<input type="text" class="input-large" name="access_token" value="{{token.access_token}}" size="{{token.access_token|length}}"/> <input type="text" class="input-large" name="access_token" value="{{token.access_token}}" size="{{token.access_token|length}}"/>
</div> </div>
{% else %} {% else %}
<div id="top-text-box"> <div id="top-text-box">
<h4>{% trans %}Code d'acc&egrave;s{% endtrans %}</h4> <h4>{% trans %}Code d'acc&egrave;s{% endtrans %}</h4>
@@ -94,5 +94,5 @@
<script type="text/javascript" src="/skins/html5/bootstrap/js/bootstrap-transition.js"></script> <script type="text/javascript" src="/skins/html5/bootstrap/js/bootstrap-transition.js"></script>
<script type="text/javascript" src="/skins/html5/bootstrap/js/bootstrap-typeahead.js"></script> <script type="text/javascript" src="/skins/html5/bootstrap/js/bootstrap-typeahead.js"></script>
</body> </body>
</html> </html>

View File

@@ -73,7 +73,7 @@
{% if app_type == "web" %} {% if app_type == "web" %}
<tr class="callback" style="height:25px;"> <tr class="callback" style="height:25px;">
<td><label for="callback">{% trans 'URL de callback' %} <br/></label></td> <td><label for="callback">{% trans 'URL de callback' %} <br/></label></td>
<td class="url-td"> <td class="url-td">
<select name="scheme-callback"> <select name="scheme-callback">
<option value="http://">http://</option> <option value="http://">http://</option>
<option value="https://">https://</option> <option value="https://">https://</option>

View File

@@ -27,10 +27,10 @@
<td>{% trans 'URL de callback' %}</td> <td>{% trans 'URL de callback' %}</td>
{% if app.get_type == constant('API_OAuth2_Application::DESKTOP_TYPE') %} {% if app.get_type == constant('API_OAuth2_Application::DESKTOP_TYPE') %}
<td> <td>
<span>{{app.get_redirect_uri}}</span> <span>{{app.get_redirect_uri}}</span>
</td> </td>
{% else %} {% else %}
<td class="url_callback"><span class="url_callback_input">{{app.get_redirect_uri}}</span> <td class="url_callback"><span class="url_callback_input">{{app.get_redirect_uri}}</span>
<button type="button" class="save_callback" style="display:none;">save</button> <button type="button" class="save_callback" style="display:none;">save</button>
<button type="button" class="modifier_callback" style="display:none;">modifier</button> <button type="button" class="modifier_callback" style="display:none;">modifier</button>
</td> </td>

View File

@@ -1,36 +1,36 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html> <html>
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<title>Phraseanet Authentication</title> <title>Phraseanet Authentication</title>
<meta name="author" content="Alchemy" /> <meta name="author" content="Alchemy" />
<!-- Mobile viewport optimized --> <!-- Mobile viewport optimized -->
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- styles --> <!-- styles -->
<link rel="stylesheet" type="text/css" href="/skins/html5/bootstrap/css/bootstrap.css" /> <link rel="stylesheet" type="text/css" href="/skins/html5/bootstrap/css/bootstrap.css" />
<link rel="stylesheet" type="text/css" href="/skins/html5/bootstrap/css/bootstrap-responsive.css" /> <link rel="stylesheet" type="text/css" href="/skins/html5/bootstrap/css/bootstrap-responsive.css" />
<link rel="stylesheet" type="text/css" href="/skins/oauth/default.css" /> <link rel="stylesheet" type="text/css" href="/skins/oauth/default.css" />
<!-- All JavaScript at the bottom, except this Modernizr build. <!-- All JavaScript at the bottom, except this Modernizr build.
Modernizr enables HTML5 elements & feature detects for optimal performance. --> Modernizr enables HTML5 elements & feature detects for optimal performance. -->
<script type="text/javascript" src="/skins/html5/Boilerplate/js/modernizr-2.5.2.min.js"></script> <script type="text/javascript" src="/skins/html5/Boilerplate/js/modernizr-2.5.2.min.js"></script>
<!-- HTML5 shim, for IE6-8 support of HTML5 elements --> <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]> <!--[if lt IE 9]>
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script> <script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]--> <![endif]-->
</head> </head>
<body> <body>
<div id="page" class="container"> <div id="page" class="container">
<div id="main" class="row"> <div id="main" class="row">
<div id="title-box" class="span6 offset3"> <div id="title-box" class="span6 offset3">
<h1 id="namePhr">{{home_title}}</h1> <h1 id="namePhr">{{home_title}}</h1>
</div> </div>
{% if not session.is_authenticated %} {% if not session.is_authenticated %}
<div id="content-box" class="span6 offset3"> <div id="content-box" class="span6 offset3">
<form id="login-form" class="form-vertical" method="post"> <form id="login-form" class="form-vertical" method="post">
@@ -53,7 +53,7 @@
<a href="#">{% trans 'Probl&egrave;mes de connexion ?' %}</a> <a href="#">{% trans 'Probl&egrave;mes de connexion ?' %}</a>
</p> </p>
</div> </div>
{% else %} {% else %}
{% if user is not none %} {% if user is not none %}
{% set username = '<b>' ~ user.get_display_name() ~ '</b>' %} {% set username = '<b>' ~ user.get_display_name() ~ '</b>' %}
<div id="hello-box" class="span6 offset3"> <div id="hello-box" class="span6 offset3">
@@ -62,7 +62,7 @@
Hello {{username}} Hello {{username}}
{% endtrans %} {% endtrans %}
</p> </p>
</div> </div>
{% endif %} {% endif %}
{% if auth.getClient() is not none %} {% if auth.getClient() is not none %}
<div id="text-box" class="span6 offset3"> <div id="text-box" class="span6 offset3">
@@ -95,8 +95,8 @@
<input id="button_deny" class="btn btn-inverse btn-large span3" type="submit" value="{% trans 'Ne pas autoriser' %}" /> <input id="button_deny" class="btn btn-inverse btn-large span3" type="submit" value="{% trans 'Ne pas autoriser' %}" />
</form> </form>
</div> </div>
{% endif %} {% endif %}
</div> </div>
</div> </div>
@@ -115,5 +115,5 @@
<script type="text/javascript" src="/skins/html5/bootstrap/js/bootstrap-transition.js"></script> <script type="text/javascript" src="/skins/html5/bootstrap/js/bootstrap-transition.js"></script>
<script type="text/javascript" src="/skins/html5/bootstrap/js/bootstrap-typeahead.js"></script> <script type="text/javascript" src="/skins/html5/bootstrap/js/bootstrap-typeahead.js"></script>
</body> </body>
</html> </html>

View File

@@ -1,8 +1,8 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html> <html>
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<title> <title>
{% if error is defined %} {% if error is defined %}
{% trans 'Fail' %} {% trans 'Fail' %}
{% else %} {% else %}
@@ -14,20 +14,20 @@
<!-- Mobile viewport optimized --> <!-- Mobile viewport optimized -->
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- styles --> <!-- styles -->
<link rel="stylesheet" type="text/css" href="/skins/html5/bootstrap/css/bootstrap.css" /> <link rel="stylesheet" type="text/css" href="/skins/html5/bootstrap/css/bootstrap.css" />
<link rel="stylesheet" type="text/css" href="/skins/html5/bootstrap/css/bootstrap-responsive.css" /> <link rel="stylesheet" type="text/css" href="/skins/html5/bootstrap/css/bootstrap-responsive.css" />
<link rel="stylesheet" type="text/css" href="/skins/oauth/default.css" /> <link rel="stylesheet" type="text/css" href="/skins/oauth/default.css" />
<!-- All JavaScript at the bottom, except this Modernizr build. <!-- All JavaScript at the bottom, except this Modernizr build.
Modernizr enables HTML5 elements & feature detects for optimal performance. --> Modernizr enables HTML5 elements & feature detects for optimal performance. -->
<script type="text/javascript" src="/skins/html5/Boilerplate/js/modernizr-2.5.2.min.js"></script> <script type="text/javascript" src="/skins/html5/Boilerplate/js/modernizr-2.5.2.min.js"></script>
<!-- HTML5 shim, for IE6-8 support of HTML5 elements --> <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]> <!--[if lt IE 9]>
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script> <script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]--> <![endif]-->
</head> </head>
<body> <body>
<div id="page" class="container"> <div id="page" class="container">
@@ -59,7 +59,7 @@
{% endtrans %} {% endtrans %}
</p> </p>
<input type="text" class="input-xlarge" name="access_token" value="{{token.access_token}}" size="{{token.access_token|length}}"/> <input type="text" class="input-xlarge" name="access_token" value="{{token.access_token}}" size="{{token.access_token|length}}"/>
</div> </div>
{% else %} {% else %}
<div id="top-text-box"> <div id="top-text-box">
<h4>{% trans %}Code d'acc&egrave;s{% endtrans %}</h4> <h4>{% trans %}Code d'acc&egrave;s{% endtrans %}</h4>
@@ -94,5 +94,5 @@
<script type="text/javascript" src="/skins/html5/bootstrap/js/bootstrap-transition.js"></script> <script type="text/javascript" src="/skins/html5/bootstrap/js/bootstrap-transition.js"></script>
<script type="text/javascript" src="/skins/html5/bootstrap/js/bootstrap-typeahead.js"></script> <script type="text/javascript" src="/skins/html5/bootstrap/js/bootstrap-typeahead.js"></script>
</body> </body>
</html> </html>

View File

@@ -492,7 +492,7 @@
count += parseInt($(count_el).val()); count += parseInt($(count_el).val());
} }
}); });
{% set max_download = registry.get('GV_download_max', 120) %} {% set max_download = registry.get('GV_download_max', 120) %}
{% set alert_too_big%} {% set alert_too_big%}
"{% trans %} You can not directly download more than {{max_download}} Mo ; time to package all documents is too long{% endtrans %}\n"+ "{% trans %} You can not directly download more than {{max_download}} Mo ; time to package all documents is too long{% endtrans %}\n"+

View File

@@ -53,6 +53,7 @@
{ {
var val = $.trim($('#auto_order').val()); var val = $.trim($('#auto_order').val());
if(val == '') if(val == '')
return; return;
var sorter = {}; var sorter = {};

View File

@@ -53,6 +53,7 @@
{ {
var val = $.trim($('#auto_order').val()); var val = $.trim($('#auto_order').val());
if(val == '') if(val == '')
return; return;
var sorter = {}; var sorter = {};

View File

@@ -62,9 +62,9 @@
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function(){ $(document).ready(function(){
$("#QuickAddUser button").button(); $("#QuickAddUser button").button();
$("#QuickAddUser form").bind('submit', function(){ $("#QuickAddUser form").bind('submit', function(){

View File

@@ -32,7 +32,7 @@
<img src="/skins/icons/push16.png"/> <img src="/skins/icons/push16.png"/>
</button> </button>
{% endif %} {% endif %}
{% if user.ACL().has_right('push') %} {% if user.ACL().has_right('push') %}
<button class="ui-corner-all TOOL_feedback_btn basket_window" title="{% trans 'Feedback' %}"> <button class="ui-corner-all TOOL_feedback_btn basket_window" title="{% trans 'Feedback' %}">
<img src="/skins/icons/feedback16.png"/> <img src="/skins/icons/feedback16.png"/>

View File

@@ -88,7 +88,7 @@
return false; return false;
}); });
$('.deleter', $container).bind('click', function(){ $('.deleter', $container).bind('click', function(){
var owner = $(this).closest('.owner'); var owner = $(this).closest('.owner');
var usr_id = owner.find('input[name="usr_id"]').val(); var usr_id = owner.find('input[name="usr_id"]').val();
@@ -133,7 +133,7 @@
} }
}); });
} }
function unShareWith(usr_id, callback) function unShareWith(usr_id, callback)
{ {
@@ -155,6 +155,7 @@
humane.error(data.message); humane.error(data.message);
} }
$dialog.refresh(); $dialog.refresh();
return; return;
}, },
error: function(){ error: function(){

View File

@@ -93,7 +93,7 @@
<div class="PNB" style="top:40px;height:120px;bottom:auto;"> <div class="PNB" style="top:40px;height:120px;bottom:auto;">
<table style="table-layout:fixed;width:100%;"> <table style="table-layout:fixed;width:100%;">
<tr> <tr>
<td> <td>
<label>{% trans 'Activite' %}</label> <label>{% trans 'Activite' %}</label>
</td> </td>
<td> <td>
@@ -102,10 +102,10 @@
<td > <td >
<label>{% trans 'Company' %}</label> <label>{% trans 'Company' %}</label>
</td> </td>
<td > <td >
<label>{% trans 'Country' %}</label> <label>{% trans 'Country' %}</label>
</td> </td>
<td > <td >
<label>{% trans 'Position' %}</label> <label>{% trans 'Position' %}</label>
</td> </td>
</tr> </tr>
@@ -135,7 +135,7 @@
</select> </select>
</td> </td>
<td> <td>
<select size="5" multiple="multiple" name="Country[]" style="width:80%;"> <select size="5" multiple="multiple" name="Country[]" style="width:80%;">
<option value="">{% trans 'All' %}</option> <option value="">{% trans 'All' %}</option>
{% for Code, Country in query.getRelatedCountries() %} {% for Code, Country in query.getRelatedCountries() %}
@@ -144,7 +144,7 @@
</select> </select>
</td> </td>
<td > <td >
<select size="5" multiple="multiple" name="Position[]" style="width:80%;"> <select size="5" multiple="multiple" name="Position[]" style="width:80%;">
<option value="">{% trans 'All' %}</option> <option value="">{% trans 'All' %}</option>
{% for Position in query.getRelatedPositions() %} {% for Position in query.getRelatedPositions() %}

View File

@@ -20,7 +20,7 @@
$(".horizontal-scroller:visible").css("position", "fixed"); $(".horizontal-scroller:visible").css("position", "fixed");
} }
});*/ });*/
</script> </script>
{% if is_infouser %} {% if is_infouser %}

View File

@@ -292,6 +292,7 @@ phrasea::headers();
}, },
success: function(data){ success: function(data){
alert(data.message); alert(data.message);
return; return;
} }
}); });

View File

@@ -226,15 +226,15 @@ if (!is_null($templates) || !is_null($parm['deny']) || !is_null($parm['accept'])
bodySize.y = $(window).height(); bodySize.y = $(window).height();
bodySize.x = $(window).width(); bodySize.x = $(window).width();
var $heightd = $('#tab_demandes').outerHeight(true); var $heightd = $('#tab_demandes').outerHeight(true);
var maxSize = (bodySize.y - 120); var maxSize = (bodySize.y - 120);
if($heightd > maxSize) if($heightd > maxSize)
{ {
$('#tab_demandes').height(maxSize); $('#tab_demandes').height(maxSize);
} }
} }
$(document).ready(function(){ $(document).ready(function(){