Fix coding standards

This commit is contained in:
Romain Neutron
2012-01-26 12:32:37 +01:00
parent 692bb01b75
commit 06b8df26b1
312 changed files with 2017 additions and 1651 deletions

View File

@@ -54,4 +54,3 @@ test:
template_engine: twig_debug
orm: doctrine_test

View File

@@ -123,6 +123,7 @@ return call_user_func(function()
}
}
}
return array('ressource' => $ressource, 'general' => $general, 'aspect' => $aspect, 'action' => $action);
};
@@ -141,6 +142,7 @@ return call_user_func(function()
$app['token'] = \API_OAuth2_Token::load_by_oauth_token($app["appbox"], $oauth2_adapter->getToken());
if ($session->is_authenticated())
return;
if ($oauth2_adapter->has_ses_id())
{

View File

@@ -77,6 +77,7 @@ return call_user_func(
$browser = \Browser::getInstance();
if (!$browser->isMobile())
return new Response('');

View File

@@ -97,6 +97,7 @@ return call_user_func(function()
return new response($twig->render('/prod/actions/Bridge/deactivated.twig', $params), 200);
}
return new response($twig->render('/prod/actions/Bridge/error.twig', $params), 200);
}
if ($request->getRequestFormat() == 'json')

View File

@@ -36,10 +36,13 @@ return call_user_func(function()
{
$browser = \Browser::getInstance();
if ($browser->isMobile())
return $app->redirect("/login/?redirect=/lightbox");
elseif ($browser->isNewGeneration())
return $app->redirect("/login/?redirect=/prod");
else
return $app->redirect("/login/?redirect=/client");
});

View File

@@ -183,8 +183,10 @@ return call_user_func(function()
$app->get('/', function() use ($app)
{
if ($app['install'] === true)
return $app->redirect('/setup/installer/');
if ($app['upgrade'] === true)
return $app->redirect('/setup/upgrader/');
});
@@ -197,6 +199,7 @@ return call_user_func(function()
$app->error(function($e) use ($app)
{
if ($e instanceof Exception_Setup_PhraseaAlreadyInstalled)
return $app->redirect('/login');
return new Response(

View File

@@ -183,6 +183,7 @@ class Description implements ControllerProviderInterface
return new Response($Core->getTwig()->render('admin/databox/doc_structure.twig', $params));
});
return $controllers;
}

View File

@@ -88,6 +88,7 @@ class Publications implements ControllerProviderInterface
$user = \User_Adapter::getInstance($appbox->get_session()->get_usr_id(), $appbox);
if (!$feed->is_owner($user))
return $app->redirect('/admin/publications/feed/' . $id . '/?error=' . _('You are not the owner of this feed, you can not edit it'));
$request = $app['request'];
@@ -116,6 +117,7 @@ class Publications implements ControllerProviderInterface
$user = \User_Adapter::getInstance($appbox->get_session()->get_usr_id(), $appbox);
if (!$feed->is_owner($user))
return new Response('ERROR:you are not allowed');
$request = $app["request"];
@@ -123,20 +125,25 @@ class Publications implements ControllerProviderInterface
$fileData = $request->files->get("Filedata");
if ($fileData['error'] !== 0)
return new Response('ERROR:error while upload');
$file = new \system_file($fileData['tmp_name']);
if (!in_array($file->get_mime(), array('image/jpeg', 'image/jpg', 'image/gif')))
return new Response('ERROR:bad filetype');
if ($file->getSize() > 200000)
return new Response('ERROR:file too large');
$datas = $file->get_technical_datas();
if (!isset($datas[\system_file::TC_DATAS_WIDTH]) || !isset($datas[\system_file::TC_DATAS_HEIGHT]))
return new Response('ERROR:file is not square');
if ($datas[\system_file::TC_DATAS_WIDTH] != $datas[\system_file::TC_DATAS_HEIGHT])
return new Response('ERROR:file is not square');
$feed->set_icon($file);

View File

@@ -106,6 +106,7 @@ class Root implements ControllerProviderInterface
))
);
});
return $controllers;
}

View File

@@ -131,6 +131,7 @@ class Subdefs implements ControllerProviderInterface
return \phrasea::redirect('/admin/subdefs/' . $databox->get_sbas_id() . '/');
});
return $controllers;
}
}

View File

@@ -62,6 +62,7 @@ class Printer implements ControllerProviderInterface
->log($record, \Session_Logger::EVENT_PRINT, $layout, '');
}
$PDF = new PDFExport($printer->get_elements(), $layout);
return new Response($PDF->render(), 200, array('Content-Type' => 'application/pdf'));
}
);

View File

@@ -149,6 +149,7 @@ class Core extends \Pimple
$gatekeeper = \gatekeeper::getInstance();
$gatekeeper->check_directory();
}
return;
}

View File

@@ -98,6 +98,7 @@ class Configuration
{
$this->getConfiguration();
}
return $this->environment;
}
@@ -128,6 +129,7 @@ class Configuration
{
$debug = false;
}
return $debug;
}
@@ -148,6 +150,7 @@ class Configuration
{
$maintained = false;
}
return $maintained;
}
@@ -168,6 +171,7 @@ class Configuration
{
$displayErrors = false;
}
return $displayErrors;
}
@@ -179,6 +183,7 @@ class Configuration
public function getPhraseanet()
{
$phraseanetConf = $this->getConfiguration()->get('phraseanet');
return new ParameterBag($phraseanetConf);
}
@@ -278,6 +283,7 @@ class Configuration
public function all()
{
$allConf = $this->configurationHandler->getParser()->parse($this->getFile());
return $allConf;
}

View File

@@ -44,6 +44,7 @@ class Application implements Specification
, $this->getConfigurationFileName()
, $this->getConfigurationFileExtension()
);
return $path;
}

View File

@@ -67,6 +67,7 @@ abstract class AbstractBuilder
$options = array();
}
}
return $options;
}

View File

@@ -498,6 +498,7 @@ class Edit extends RecordHelper
}
if (!is_array($request->get('mds')))
return $this;
$sbas_id = (int) $request->get('sbid');

View File

@@ -195,6 +195,7 @@ class Helper extends \Alchemy\Phrasea\Helper\Helper
if (!$this->is_single_grouping())
throw new Exception('Cannot use ' . __METHOD__ . ' here');
foreach ($this->get_elements() as $record)
return $record;
}
@@ -287,8 +288,10 @@ class Helper extends \Alchemy\Phrasea\Helper\Helper
public function get_serialize_list()
{
if ($this->is_single_grouping())
return $this->get_grouping_head()->get_serialize_key();
else
return $this->selection->serialize_list();
}

View File

@@ -64,6 +64,7 @@ class MoveCollection extends RecordHelper
$this->available_destinations = array();
if (!$this->is_possible)
return $this;
$this->available_destinations = array_keys(

View File

@@ -82,6 +82,7 @@ class UserProvider implements ControlProviderInterface
try
{
\User_Adapter::getInstance($id, appbox::get_instance());
return true;
}
catch (\Exception $e)

View File

@@ -150,6 +150,7 @@ class UsrList
foreach ($this->getOwners() as $owner)
{
if ($owner->getUser()->get_id() == $user->get_id())
return true;
}
@@ -166,6 +167,7 @@ class UsrList
foreach ($this->getOwners() as $owner)
{
if ($owner->getUser()->get_id() == $user->get_id())
return $owner;
}

View File

@@ -158,6 +158,7 @@ class ValidationParticipant
public function setUser(\User_Adapter $user)
{
$this->usr_id = $user->get_id();
return $this;
}

View File

@@ -321,6 +321,7 @@ class ValidationSession
public function setInitiator(\User_Adapter $user)
{
$this->initiator_id = $user->get_id();
return;
}

View File

@@ -39,114 +39,133 @@ class EntitiesBasketElementProxy extends \Entities\BasketElement implements \Doc
public function getId()
{
$this->__load();
return parent::getId();
}
public function setRecordId($recordId)
{
$this->__load();
return parent::setRecordId($recordId);
}
public function getRecordId()
{
$this->__load();
return parent::getRecordId();
}
public function setSbasId($sbasId)
{
$this->__load();
return parent::setSbasId($sbasId);
}
public function getSbasId()
{
$this->__load();
return parent::getSbasId();
}
public function setOrd($ord)
{
$this->__load();
return parent::setOrd($ord);
}
public function getOrd()
{
$this->__load();
return parent::getOrd();
}
public function setCreated($created)
{
$this->__load();
return parent::setCreated($created);
}
public function getCreated()
{
$this->__load();
return parent::getCreated();
}
public function setUpdated($updated)
{
$this->__load();
return parent::setUpdated($updated);
}
public function getUpdated()
{
$this->__load();
return parent::getUpdated();
}
public function setBasket(\Entities\Basket $basket)
{
$this->__load();
return parent::setBasket($basket);
}
public function getBasket()
{
$this->__load();
return parent::getBasket();
}
public function getRecord()
{
$this->__load();
return parent::getRecord();
}
public function setRecord(\record_adapter $record)
{
$this->__load();
return parent::setRecord($record);
}
public function setLastInBasket()
{
$this->__load();
return parent::setLastInBasket();
}
public function addValidationData(\Entities\ValidationData $validationDatas)
{
$this->__load();
return parent::addValidationData($validationDatas);
}
public function getValidationDatas()
{
$this->__load();
return parent::getValidationDatas();
}
public function getUserValidationDatas(\User_Adapter $user)
{
$this->__load();
return parent::getUserValidationDatas($user);
}

View File

@@ -39,162 +39,189 @@ class EntitiesBasketProxy extends \Entities\Basket implements \Doctrine\ORM\Prox
public function getId()
{
$this->__load();
return parent::getId();
}
public function setName($name)
{
$this->__load();
return parent::setName($name);
}
public function getName()
{
$this->__load();
return parent::getName();
}
public function setDescription($description)
{
$this->__load();
return parent::setDescription($description);
}
public function getDescription()
{
$this->__load();
return parent::getDescription();
}
public function setUsrId($usrId)
{
$this->__load();
return parent::setUsrId($usrId);
}
public function getUsrId()
{
$this->__load();
return parent::getUsrId();
}
public function setPusherId($pusherId)
{
$this->__load();
return parent::setPusherId($pusherId);
}
public function getPusherId()
{
$this->__load();
return parent::getPusherId();
}
public function setArchived($archived)
{
$this->__load();
return parent::setArchived($archived);
}
public function getArchived()
{
$this->__load();
return parent::getArchived();
}
public function setCreated($created)
{
$this->__load();
return parent::setCreated($created);
}
public function getCreated()
{
$this->__load();
return parent::getCreated();
}
public function setUpdated($updated)
{
$this->__load();
return parent::setUpdated($updated);
}
public function getUpdated()
{
$this->__load();
return parent::getUpdated();
}
public function addBasketElement(\Entities\BasketElement $elements)
{
$this->__load();
return parent::addBasketElement($elements);
}
public function getElements()
{
$this->__load();
return parent::getElements();
}
public function setPusher(\User_Adapter $user)
{
$this->__load();
return parent::setPusher($user);
}
public function getPusher()
{
$this->__load();
return parent::getPusher();
}
public function setOwner(\User_Adapter $user)
{
$this->__load();
return parent::setOwner($user);
}
public function getOwner()
{
$this->__load();
return parent::getOwner();
}
public function setValidation(\Entities\ValidationSession $validation)
{
$this->__load();
return parent::setValidation($validation);
}
public function getValidation()
{
$this->__load();
return parent::getValidation();
}
public function setIsRead($isRead)
{
$this->__load();
return parent::setIsRead($isRead);
}
public function getIsRead()
{
$this->__load();
return parent::getIsRead();
}
public function hasRecord(\record_adapter $record)
{
$this->__load();
return parent::hasRecord($record);
}
public function getSize()
{
$this->__load();
return parent::getSize();
}

View File

@@ -39,78 +39,91 @@ class EntitiesStoryWZProxy extends \Entities\StoryWZ implements \Doctrine\ORM\Pr
public function getId()
{
$this->__load();
return parent::getId();
}
public function setSbasId($sbasId)
{
$this->__load();
return parent::setSbasId($sbasId);
}
public function getSbasId()
{
$this->__load();
return parent::getSbasId();
}
public function setRecordId($recordId)
{
$this->__load();
return parent::setRecordId($recordId);
}
public function getRecordId()
{
$this->__load();
return parent::getRecordId();
}
public function setUsrId($usrId)
{
$this->__load();
return parent::setUsrId($usrId);
}
public function getUsrId()
{
$this->__load();
return parent::getUsrId();
}
public function setCreated($created)
{
$this->__load();
return parent::setCreated($created);
}
public function getCreated()
{
$this->__load();
return parent::getCreated();
}
public function setUser(\User_Adapter $user)
{
$this->__load();
return parent::setUser($user);
}
public function getUser()
{
$this->__load();
return parent::getUser();
}
public function getRecord()
{
$this->__load();
return parent::getRecord();
}
public function setRecord(\record_adapter $record)
{
$this->__load();
return parent::setRecord($record);
}

View File

@@ -39,66 +39,77 @@ class EntitiesUsrListEntryProxy extends \Entities\UsrListEntry implements \Doctr
public function getId()
{
$this->__load();
return parent::getId();
}
public function setUsrId($usrId)
{
$this->__load();
return parent::setUsrId($usrId);
}
public function getUsrId()
{
$this->__load();
return parent::getUsrId();
}
public function setCreated($created)
{
$this->__load();
return parent::setCreated($created);
}
public function getCreated()
{
$this->__load();
return parent::getCreated();
}
public function setUpdated($updated)
{
$this->__load();
return parent::setUpdated($updated);
}
public function getUpdated()
{
$this->__load();
return parent::getUpdated();
}
public function setList(\Entities\UsrList $list)
{
$this->__load();
return parent::setList($list);
}
public function getList()
{
$this->__load();
return parent::getList();
}
public function getUser()
{
$this->__load();
return parent::getUser();
}
public function setUser(\User_Adapter $user)
{
$this->__load();
return parent::setUser($user);
}

View File

@@ -39,78 +39,91 @@ class EntitiesUsrListOwnerProxy extends \Entities\UsrListOwner implements \Doctr
public function getId()
{
$this->__load();
return parent::getId();
}
public function setUsrId($usrId)
{
$this->__load();
return parent::setUsrId($usrId);
}
public function getUsrId()
{
$this->__load();
return parent::getUsrId();
}
public function setRole($role)
{
$this->__load();
return parent::setRole($role);
}
public function getRole()
{
$this->__load();
return parent::getRole();
}
public function setCreated($created)
{
$this->__load();
return parent::setCreated($created);
}
public function getCreated()
{
$this->__load();
return parent::getCreated();
}
public function setUpdated($updated)
{
$this->__load();
return parent::setUpdated($updated);
}
public function getUpdated()
{
$this->__load();
return parent::getUpdated();
}
public function setList(\Entities\UsrList $list)
{
$this->__load();
return parent::setList($list);
}
public function getList()
{
$this->__load();
return parent::getList();
}
public function setUser(\User_Adapter $user)
{
$this->__load();
return parent::setUser($user);
}
public function getUser()
{
$this->__load();
return parent::getUser();
}

View File

@@ -39,78 +39,91 @@ class EntitiesUsrListProxy extends \Entities\UsrList implements \Doctrine\ORM\Pr
public function getId()
{
$this->__load();
return parent::getId();
}
public function setName($name)
{
$this->__load();
return parent::setName($name);
}
public function getName()
{
$this->__load();
return parent::getName();
}
public function setCreated($created)
{
$this->__load();
return parent::setCreated($created);
}
public function getCreated()
{
$this->__load();
return parent::getCreated();
}
public function setUpdated($updated)
{
$this->__load();
return parent::setUpdated($updated);
}
public function getUpdated()
{
$this->__load();
return parent::getUpdated();
}
public function addUsrListOwner(\Entities\UsrListOwner $owners)
{
$this->__load();
return parent::addUsrListOwner($owners);
}
public function getOwners()
{
$this->__load();
return parent::getOwners();
}
public function hasAccess(\User_Adapter $user)
{
$this->__load();
return parent::hasAccess($user);
}
public function getOwner(\User_Adapter $user)
{
$this->__load();
return parent::getOwner($user);
}
public function addUsrListEntry(\Entities\UsrListEntry $entry)
{
$this->__load();
return parent::addUsrListEntry($entry);
}
public function getEntries()
{
$this->__load();
return parent::getEntries();
}

View File

@@ -39,66 +39,77 @@ class EntitiesValidationDataProxy extends \Entities\ValidationData implements \D
public function getId()
{
$this->__load();
return parent::getId();
}
public function setAgreement($agreement)
{
$this->__load();
return parent::setAgreement($agreement);
}
public function getAgreement()
{
$this->__load();
return parent::getAgreement();
}
public function setNote($note)
{
$this->__load();
return parent::setNote($note);
}
public function getNote()
{
$this->__load();
return parent::getNote();
}
public function setUpdated($updated)
{
$this->__load();
return parent::setUpdated($updated);
}
public function getUpdated()
{
$this->__load();
return parent::getUpdated();
}
public function setParticipant(\Entities\ValidationParticipant $participant)
{
$this->__load();
return parent::setParticipant($participant);
}
public function getParticipant()
{
$this->__load();
return parent::getParticipant();
}
public function setBasketElement(\Entities\BasketElement $basketElement)
{
$this->__load();
return parent::setBasketElement($basketElement);
}
public function getBasketElement()
{
$this->__load();
return parent::getBasketElement();
}

View File

@@ -39,120 +39,140 @@ class EntitiesValidationParticipantProxy extends \Entities\ValidationParticipant
public function getId()
{
$this->__load();
return parent::getId();
}
public function setUsrId($usrId)
{
$this->__load();
return parent::setUsrId($usrId);
}
public function getUsrId()
{
$this->__load();
return parent::getUsrId();
}
public function addValidationData(\Entities\ValidationData $datas)
{
$this->__load();
return parent::addValidationData($datas);
}
public function setSession(\Entities\ValidationSession $session)
{
$this->__load();
return parent::setSession($session);
}
public function getSession()
{
$this->__load();
return parent::getSession();
}
public function setIsAware($isAware)
{
$this->__load();
return parent::setIsAware($isAware);
}
public function getIsAware()
{
$this->__load();
return parent::getIsAware();
}
public function setUser(\User_Adapter $user)
{
$this->__load();
return parent::setUser($user);
}
public function getUser()
{
$this->__load();
return parent::getUser();
}
public function setReminded($reminded)
{
$this->__load();
return parent::setReminded($reminded);
}
public function getReminded()
{
$this->__load();
return parent::getReminded();
}
public function getDatas()
{
$this->__load();
return parent::getDatas();
}
public function setIsConfirmed($isConfirmed)
{
$this->__load();
return parent::setIsConfirmed($isConfirmed);
}
public function getIsConfirmed()
{
$this->__load();
return parent::getIsConfirmed();
}
public function setCanAgree($canAgree)
{
$this->__load();
return parent::setCanAgree($canAgree);
}
public function getCanAgree()
{
$this->__load();
return parent::getCanAgree();
}
public function setCanSeeOthers($canSeeOthers)
{
$this->__load();
return parent::setCanSeeOthers($canSeeOthers);
}
public function getCanSeeOthers()
{
$this->__load();
return parent::getCanSeeOthers();
}
public function isReleasable()
{
$this->__load();
return parent::isReleasable();
}

View File

@@ -39,162 +39,189 @@ class EntitiesValidationSessionProxy extends \Entities\ValidationSession impleme
public function getId()
{
$this->__load();
return parent::getId();
}
public function setName($name)
{
$this->__load();
return parent::setName($name);
}
public function getName()
{
$this->__load();
return parent::getName();
}
public function setDescription($description)
{
$this->__load();
return parent::setDescription($description);
}
public function getDescription()
{
$this->__load();
return parent::getDescription();
}
public function setArchived($archived)
{
$this->__load();
return parent::setArchived($archived);
}
public function getArchived()
{
$this->__load();
return parent::getArchived();
}
public function setCreated($created)
{
$this->__load();
return parent::setCreated($created);
}
public function getCreated()
{
$this->__load();
return parent::getCreated();
}
public function setUpdated($updated)
{
$this->__load();
return parent::setUpdated($updated);
}
public function getUpdated()
{
$this->__load();
return parent::getUpdated();
}
public function setExpires($expires)
{
$this->__load();
return parent::setExpires($expires);
}
public function getExpires()
{
$this->__load();
return parent::getExpires();
}
public function setReminded($reminded)
{
$this->__load();
return parent::setReminded($reminded);
}
public function getReminded()
{
$this->__load();
return parent::getReminded();
}
public function setBasket(\Entities\Basket $basket)
{
$this->__load();
return parent::setBasket($basket);
}
public function getBasket()
{
$this->__load();
return parent::getBasket();
}
public function addValidationParticipant(\Entities\ValidationParticipant $participants)
{
$this->__load();
return parent::addValidationParticipant($participants);
}
public function getParticipants()
{
$this->__load();
return parent::getParticipants();
}
public function getParticipant(\User_Adapter $user)
{
$this->__load();
return parent::getParticipant($user);
}
public function setInitiatorId($initiatorId)
{
$this->__load();
return parent::setInitiatorId($initiatorId);
}
public function getInitiatorId()
{
$this->__load();
return parent::getInitiatorId();
}
public function isInitiator(\User_Adapter $user)
{
$this->__load();
return parent::isInitiator($user);
}
public function setInitiator(\User_Adapter $user)
{
$this->__load();
return parent::setInitiator($user);
}
public function getInitiator()
{
$this->__load();
return parent::getInitiator();
}
public function isFinished()
{
$this->__load();
return parent::isFinished();
}
public function getValidationString(\User_Adapter $user)
{
$this->__load();
return parent::getValidationString($user);
}

View File

@@ -124,6 +124,7 @@ class ACL implements cache_cacheableInterface
$key = $record->get_serialize_key();
if (array_key_exists($key, $this->_rights_records_document))
return true;
return false;
@@ -191,6 +192,7 @@ class ACL implements cache_cacheableInterface
$key = $record->get_serialize_key();
if (array_key_exists($key, $this->_rights_records_preview))
return true;
return false;
@@ -244,6 +246,7 @@ class ACL implements cache_cacheableInterface
public function apply_model(User_Interface $template_user, Array $base_ids)
{
if (count($base_ids) == 0)
return $this;
$sbas_ids = array();
@@ -400,6 +403,7 @@ class ACL implements cache_cacheableInterface
$this->load_rights_bas();
if (!$this->has_access_to_base($base_id))
return false;
if ($this->is_limited($base_id))
@@ -487,6 +491,7 @@ class ACL implements cache_cacheableInterface
$this->load_rights_bas();
if (!$this->has_access_to_base($base_id))
return false;
return $this->_rights_bas[$base_id]['restrict_dwnld'];
@@ -503,6 +508,7 @@ class ACL implements cache_cacheableInterface
$this->load_rights_bas();
if (!$this->has_access_to_base($base_id))
return false;
return (int) $this->_rights_bas[$base_id]['remain_dwnld'];
@@ -520,6 +526,7 @@ class ACL implements cache_cacheableInterface
$this->load_rights_bas();
if (!$this->has_access_to_base($base_id))
return false;
$this->_rights_bas[$base_id]['remain_dwnld'] =
@@ -559,12 +566,14 @@ class ACL implements cache_cacheableInterface
$this->load_rights_sbas();
if (!isset($this->_rights_sbas[$sbas_id]))
return false;
if (!isset($this->_rights_sbas[$sbas_id][$right]))
throw new Exception('This right does not exists');
if ($this->_rights_sbas[$sbas_id][$right] === true)
return true;
return false;
@@ -580,6 +589,7 @@ class ACL implements cache_cacheableInterface
{
$this->load_rights_bas();
if (!$this->has_access_to_base($base_id))
return false;
return $this->_rights_bas[$base_id]['mask_and'];
@@ -595,6 +605,7 @@ class ACL implements cache_cacheableInterface
{
$this->load_rights_bas();
if (!$this->has_access_to_base($base_id))
return false;
return $this->_rights_bas[$base_id]['mask_xor'];
@@ -736,6 +747,7 @@ class ACL implements cache_cacheableInterface
{
if ($this->_rights_records_preview)
return $this;
try
@@ -789,6 +801,7 @@ class ACL implements cache_cacheableInterface
{
if ($this->_rights_sbas && $this->_global_rights)
return $this;
try
@@ -850,6 +863,7 @@ class ACL implements cache_cacheableInterface
protected function load_rights_bas()
{
if ($this->_rights_bas && $this->_global_rights && is_array($this->_limited))
return $this;
try
@@ -1353,6 +1367,7 @@ class ACL implements cache_cacheableInterface
$stmt->closeCursor();
if (!$row)
return $this;
$this->give_access_to_base(array($base_id_dest));
@@ -1519,6 +1534,7 @@ class ACL implements cache_cacheableInterface
{
$this->load_rights_bas();
if (!isset($this->_limited[$base_id]))
return null;
return ($this->_limited[$base_id]);
}

View File

@@ -1101,6 +1101,7 @@ class API_V1_adapter extends API_V1_Abstract
* @todo ajouter une option pour avoir les values serialisées
* dans un cas multi
*/
return array(
'meta_id' => $value->getId()
, 'meta_structure_id' => $field->get_meta_struct_id()

View File

@@ -100,6 +100,7 @@ class DailymotionWithoutOauth2 extends Dailymotion
$this->timeout = null;
$result = json_decode($this->httpRequest($result['upload_url'], array('file' => '@' . $filePath)), true);
$this->timeout = $timeout;
return $result['url'];
}
}

View File

@@ -135,6 +135,7 @@ class Feed_Adapter extends Feed_Abstract implements Feed_Interface, cache_cachea
public function get_icon_url()
{
if ($this->icon_url)
return $this->icon_url;
$url = '/skins/icons/rss32.gif';
@@ -248,6 +249,7 @@ class Feed_Adapter extends Feed_Abstract implements Feed_Interface, cache_cachea
public function has_access(User_Adapter $user)
{
if ($this->get_collection() instanceof collection)
return $user->ACL()->has_access_to_base($this->collection->get_base_id());
return true;
}
@@ -292,6 +294,7 @@ class Feed_Adapter extends Feed_Abstract implements Feed_Interface, cache_cachea
public function add_publisher(User_Adapter $user)
{
if (in_array($user->get_id(), array_keys($this->get_publishers())))
return $this;
Feed_Publisher_Adapter::create($this->appbox, $user, $this, false);
@@ -307,6 +310,7 @@ class Feed_Adapter extends Feed_Abstract implements Feed_Interface, cache_cachea
protected function load_publishers()
{
if (is_array($this->publishers))
return $this->publishers;
$sql = 'SELECT id, usr_id, owner FROM feed_publishers
@@ -596,6 +600,7 @@ class Feed_Adapter extends Feed_Abstract implements Feed_Interface, cache_cachea
public function get_homepage_link(registryInterface $registry, $format, $page = null)
{
if (!$this->is_public())
return null;
switch ($format)
{
@@ -637,6 +642,7 @@ class Feed_Adapter extends Feed_Abstract implements Feed_Interface, cache_cachea
try
{
if (!$renew)
return $this->get_data_from_cache($cache_key);
}
catch (Exception $e)

View File

@@ -370,9 +370,11 @@ class Feed_XML_Cooliris extends Feed_XML_Abstract implements Feed_XML_Interface
$medium = strtolower($content->get_record()->get_type());
if (!in_array($medium, array('image', 'audio', 'video')))
return $this;
if (!$preview_permalink || !$thumbnail_permalink)
return $this;
//add item node to channel node

View File

@@ -907,6 +907,7 @@ class User_Adapter implements User_Interface, cache_cacheableInterface
public static function get_usr_id_from_email($email)
{
if (is_null($email))
return false;
$conn = connection::getPDOConnection();
@@ -1277,6 +1278,7 @@ class User_Adapter implements User_Interface, cache_cacheableInterface
protected function load_preferences()
{
if ($this->_prefs)
return $this;
$sql = 'SELECT prop, value FROM usr_settings WHERE usr_id= :id';
$stmt = $this->appbox->get_connection()->prepare($sql);
@@ -1477,6 +1479,7 @@ class User_Adapter implements User_Interface, cache_cacheableInterface
{
$this->load_preferences();
if (isset($this->_prefs[$prop]) && $this->_prefs[$prop] === $value)
return $value;
$ok = true;
@@ -1514,6 +1517,7 @@ class User_Adapter implements User_Interface, cache_cacheableInterface
$appbox = appbox::get_instance();
$session = $appbox->get_session();
if (!$session->is_authenticated())
return;
$ses_id = $session->get_ses_id();
@@ -1788,6 +1792,7 @@ class User_Adapter implements User_Interface, cache_cacheableInterface
public function get_nonce()
{
if ($this->nonce)
return $this->nonce;
$nonce = false;

View File

@@ -489,6 +489,7 @@ class User_Query implements User_QueryInterface
public function get_total()
{
if ($this->total)
return $this->total;
$conn = $this->appbox->get_connection();
@@ -637,6 +638,7 @@ class User_Query implements User_QueryInterface
public function on_base_ids(Array $base_ids = null)
{
if (!$base_ids)
return $this;
$this->bases_restrictions = true;
@@ -661,6 +663,7 @@ class User_Query implements User_QueryInterface
public function on_sbas_ids(Array $sbas_ids = null)
{
if (!$sbas_ids)
return $this;
$this->sbas_restrictions = true;

View File

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

View File

@@ -258,8 +258,10 @@ abstract class base implements cache_cacheableInterface
public function upgradeavailable()
{
if ($this->get_version())
return version_compare(\Alchemy\Phrasea\Core\Version::getNumber(), $this->get_version(), '>');
else
return true;
}

View File

@@ -407,6 +407,7 @@ class caption_field //implements cache_cacheableInterface
foreach($this->values as $value)
{
/* @var $value Caption_Field_Value */
return $value->getValue();
}
}

View File

@@ -60,6 +60,7 @@ class caption_record implements caption_interface, cache_cacheableInterface
protected function retrieve_fields()
{
if (is_array($this->fields))
return $this->fields;
$fields = array();
@@ -133,6 +134,7 @@ class caption_record implements caption_interface, cache_cacheableInterface
{
$fields = $this->retrieve_fields();
if (isset($this->dces_elements[$label]))
return $fields[$this->dces_elements[$label]];
return null;
}

View File

@@ -54,6 +54,7 @@ class connection
{
$registry = registry::get_instance();
if (!$registry->get('GV_debug'))
return;
$totalTime = 0;
@@ -120,6 +121,7 @@ class connection
$name = (int) $name;
}
else
return false;
if (!isset(self::$_PDO_instance[$name]))
@@ -173,6 +175,7 @@ class connection
}
}
if (array_key_exists($name, self::$_PDO_instance))
return self::$_PDO_instance[$name];
throw new Exception('Connection not available');
}

View File

@@ -451,6 +451,7 @@ class databox extends base
$stmt->closeCursor();
if ($row)
return self::get_instance((int) $row['sbas_id']);
try
@@ -575,6 +576,7 @@ class databox extends base
public function get_meta_structure()
{
if ($this->meta_struct)
return $this->meta_struct;
try
@@ -697,6 +699,7 @@ class databox extends base
}
}
if ($n > $limit)
return true;
return false;
@@ -1220,6 +1223,7 @@ class databox extends base
public function get_structure()
{
if ($this->structure)
return $this->structure;
$this->structure = $this->retrieve_structure();
@@ -1260,6 +1264,7 @@ class databox extends base
public function get_cterms()
{
if ($this->cterms)
return $this->cterms;
$sql = "SELECT value FROM pref WHERE prop='cterms'";
@@ -1426,6 +1431,7 @@ class databox extends base
public function get_cgus()
{
if ($this->cgus)
return $this->cgus;
$this->load_cgus();

View File

@@ -76,6 +76,7 @@ class gatekeeper
$session = $appbox->get_session();
if (http_request::is_command_line())
return;
if (isset($_SERVER['PHP_SELF']) && trim($_SERVER['PHP_SELF']))
@@ -121,6 +122,7 @@ class gatekeeper
if ($this->_PHP_SELF == '/thesaurus2/xmlhttp/getterm.x.php'
|| $this->_PHP_SELF == '/thesaurus2/xmlhttp/searchcandidate.x.php'
|| $this->_PHP_SELF == '/thesaurus2/xmlhttp/getsy.x.php')
return;
phrasea::redirect('/login/?redirect=/thesaurus2');
break;
@@ -129,6 +131,7 @@ class gatekeeper
break;
case 'admin':
if ($this->_script_name === 'runscheduler.php')
return;
phrasea::redirect('/login/?redirect=' . $_SERVER['REQUEST_URI']);
break;
@@ -148,6 +151,7 @@ class gatekeeper
return;
case 'setup':
if ($appbox->upgradeavailable())
return;
else
phrasea::redirect('/login/');
@@ -264,6 +268,7 @@ class gatekeeper
$parm = $request->get_parms('LOG');
if (is_null($parm["LOG"]))
return $this;
try
@@ -281,6 +286,7 @@ class gatekeeper
try
{
$datas = random::helloToken($parm['LOG']);
return phrasea::redirect("/lightbox/validate/" . $datas['datas'] . "/");
}
catch (Exception_NotFound $e)

View File

@@ -103,6 +103,7 @@ class geonames
$cityName = self::clean_input($cityName);
if (strlen($cityName) === 0)
return $output;
$registry = registry::get_instance();
@@ -143,6 +144,7 @@ class geonames
public function find_geoname_from_ip($ip)
{
if (array_key_exists($ip, $this->cache_ips))
return $this->cache_ips[$ip];
$output = array(

View File

@@ -26,9 +26,11 @@ class http_query
public static function getHttpCodeFromUrl($url)
{
if (!is_scalar($url))
return null;
if (trim($url) === '')
return null;
$ch = curl_init();
@@ -52,9 +54,11 @@ class http_query
public static function getHttpHeaders($url)
{
if (!is_scalar($url))
return null;
if (trim($url) === '')
return null;
$ch = curl_init();
@@ -83,9 +87,11 @@ class http_query
public static function getUrl($url, $post_data = false)
{
if (!is_scalar($url))
return null;
if (trim($url) === '')
return null;
$ch = curl_init();

View File

@@ -169,6 +169,7 @@ class module_console_fileConfigCheck extends Command
throw new \Exception(sprintf("Check parsing file\n"), null, $e);
}
$output->writeln("<info>Parsing File OK</info>");
return;
}
@@ -183,6 +184,7 @@ class module_console_fileConfigCheck extends Command
throw new \Exception(sprintf("Check get selected environment\n"), null, $e);
}
$output->writeln("<info>Get Selected Environment OK</info>");
return;
}
@@ -203,6 +205,7 @@ class module_console_fileConfigCheck extends Command
throw new \Exception(sprintf("Check get selected environment from file\n"), null, $e);
}
$output->writeln("<info>Get Selected Environment from file OK</info>");
return;
}
@@ -262,6 +265,7 @@ class module_console_fileConfigCheck extends Command
}
$output->writeln("<info>Phraseanet Scope OK</info>");
return;
}
@@ -297,6 +301,7 @@ class module_console_fileConfigCheck extends Command
throw new \Exception(sprintf("Check Database Scope\n"), null, $e);
}
$output->writeln("<info>Database Scope OK</info>");
return;
}
@@ -383,6 +388,7 @@ class module_console_fileConfigCheck extends Command
}
$output->writeln("<info>Template engine service OK</info>");
return;
}
@@ -391,6 +397,7 @@ class module_console_fileConfigCheck extends Command
if (!$this->connexionOk)
{
$output->writeln("<comment>As ORM service test depends on database test success, it is not executed</comment>");
return;
}
@@ -502,6 +509,7 @@ class module_console_fileConfigCheck extends Command
}
$output->writeln("<info>ORM service OK</info>");
return;
}

View File

@@ -500,6 +500,7 @@ class module_report
public function getOrder($k = false)
{
if ($k === false)
return $this->tab_order;
return $this->tab_order[$k];
}
@@ -819,6 +820,7 @@ class module_report
public function buildReport($tab = false, $groupby = false, $on = false)
{
if (sizeof($this->report) > 0)
return $this->report;
$conn = connection::getPDOConnection($this->sbas_id);

View File

@@ -1112,6 +1112,7 @@ class module_report_activity extends module_report
$date = new DateTime($row['ddate']);
$result[$date->format(DATE_ATOM)] = $row['activity'];
}
return $result;
}

View File

@@ -157,8 +157,10 @@ class module_report_dashboard implements module_report_dashboard_componentInterf
public function isValid()
{
if (isset($this->dashboard) && sizeof($this->dashboard) > 0)
return true;
else
return false;
}

View File

@@ -252,6 +252,7 @@ class module_report_dashboard_feed implements module_report_dashboard_componentI
{
}
return;
}

View File

@@ -149,8 +149,10 @@ class module_report_dashboard_sort implements module_report_dashboard_componentI
public function isValid()
{
if (isset($this->arraySorted) && sizeof($this->arraySorted) > 0)
return true;
else
return false;
}
@@ -162,6 +164,7 @@ class module_report_dashboard_sort implements module_report_dashboard_componentI
public function getTop($nbtop)
{
if (!is_int($nbtop))
return array();
$tmp = array();
@@ -182,6 +185,7 @@ class module_report_dashboard_sort implements module_report_dashboard_componentI
}
}
}
return $tmp;
}

View File

@@ -238,6 +238,7 @@ class phrasea
public static function sbas_params()
{
if (self::$_sbas_params)
return self::$_sbas_params;
$appbox = appbox::get_instance();
@@ -274,6 +275,7 @@ class phrasea
{
$usr_id = User_Adapter::get_usr_id_from_login('invite');
if (!$usr_id)
return false;
$appbox = appbox::get_instance();
$user = User_Adapter::getInstance($usr_id, $appbox);

View File

@@ -749,8 +749,10 @@ class record_adapter implements record_Interface, cache_cacheableInterface
if ($data)
{
if (isset($this->technical_datas[$data]))
return $this->technical_datas[$data];
else
return false;
}
@@ -1487,6 +1489,7 @@ class record_adapter implements record_Interface, cache_cacheableInterface
public function get_reg_name()
{
if (!$this->is_grouping())
return false;
$balisename = '';
@@ -1683,6 +1686,7 @@ class record_adapter implements record_Interface, cache_cacheableInterface
{
$hd = $this->get_subdef('document');
if ($hd->is_physically_present())
return new system_file(p4string::addEndSlash($hd->get_path()) . $hd->get_file());
return null;
}
@@ -2020,6 +2024,7 @@ class record_adapter implements record_Interface, cache_cacheableInterface
$repo = $em->getRepository('\Entities\Basket');
/* @var $$repo \Repositories\BasketRepository */
return $repo->findContainingRecord($this);
}

View File

@@ -211,6 +211,7 @@ class record_preview extends record_adapter
public function get_train($pos = 0, $query='', searchEngine_adapter $search_engine=null)
{
if ($this->train)
return $this->train;
switch ($this->env)
@@ -273,6 +274,7 @@ class record_preview extends record_adapter
public function get_title($highlight = '', searchEngine_adapter $search_engine=null)
{
if ($this->title)
return $this->title;
$this->title = collection::getLogo($this->get_base_id()) . ' ';
@@ -329,6 +331,7 @@ class record_preview extends record_adapter
public function get_short_history()
{
if (!is_null($this->short_history))
return $this->short_history;
$tab = array();
@@ -421,6 +424,7 @@ class record_preview extends record_adapter
public function get_view_popularity()
{
if (!is_null($this->view_popularity))
return $this->view_popularity;
$appbox = appbox::get_instance();
$session = $appbox->get_session();
@@ -518,6 +522,7 @@ class record_preview extends record_adapter
public function get_refferer_popularity()
{
if (!is_null($this->refferer_popularity))
return $this->refferer_popularity;
$appbox = appbox::get_instance();
$session = $appbox->get_session();
@@ -604,6 +609,7 @@ class record_preview extends record_adapter
{
if (!is_null($this->download_popularity))
return $this->download_popularity;
$appbox = appbox::get_instance();
$session = $appbox->get_session();

View File

@@ -71,6 +71,7 @@ class registry implements registryInterface
$this->cache->set('GV_debug', $configuration->isDebug());
$this->cache->set('GV_maintenance', $configuration->isMaintained());
}
return $this;
}
@@ -139,8 +140,10 @@ class registry implements registryInterface
$this->load();
if (!$this->cache->is_set($key) && !is_null($defaultvalue))
return $defaultvalue;
else
return $this->cache->get($key);
}

View File

@@ -122,6 +122,7 @@ class searchEngine_adapter_phrasea_queryParser
$this->proposals = Array("QRY" => "", "BASES" => array());
$this->phq = $this->mb_trim($phq, 'UTF-8');
if ($this->phq != "")
return($this->maketree(0));
else
{
@@ -139,14 +140,18 @@ class searchEngine_adapter_phrasea_queryParser
{
case "SIMPLE":
if (is_array($tree["VALUE"]))
return(implode(" ", $tree["VALUE"]));
else
return($tree["VALUE"]);
break;
case "QSIMPLE":
if (is_array($tree["VALUE"]))
return("\"" . implode(" ", $tree["VALUE"]) . "\"");
else
return("\"" . $tree["VALUE"] . "\"");
break;
case "PHRASEA_KW_ALL":
@@ -154,15 +159,19 @@ class searchEngine_adapter_phrasea_queryParser
break;
case "PHRASEA_KW_LAST":
if ($tree["PNUM"] !== null)
return("" . $tree["VALUE"][0] . "[" . $tree["PNUM"] . "]");
else
return($tree["VALUE"][0]);
break;
case "OPS":
case "OPK":
if (isset($tree["PNUM"]))
return("(" . $this->astext($tree["LB"]) . " " . $tree["VALUE"] . "[" . $tree["PNUM"] . "] " . $this->astext($tree["RB"]) . ")");
else
return("(" . $this->astext($tree["LB"]) . " " . $tree["VALUE"] . " " . $this->astext($tree["RB"]) . ")");
break;
}
@@ -183,8 +192,10 @@ class searchEngine_adapter_phrasea_queryParser
if ($tree)
{
if ($tree["CLASS"] == "OPS" || $tree["CLASS"] == "OPK")
return($tree["COMPLEXITY"] = $this->calc_complexity($tree["LB"]) + $this->calc_complexity($tree["RB"]));
else
return($tree["COMPLEXITY"] = 1);
}
}
@@ -348,6 +359,7 @@ class searchEngine_adapter_phrasea_queryParser
function priority_opk(&$tree, $depth = 0)
{
if (!$tree)
return;
if ($tree["CLASS"] == "OPK" && ($tree["LB"]["CLASS"] == "OPS" || $tree["LB"]["CLASS"] == "OPK"))
{
@@ -366,6 +378,7 @@ class searchEngine_adapter_phrasea_queryParser
function distrib_opk(&$tree, $depth = 0)
{
if (!$tree)
return;
if ($tree["CLASS"] == "OPK" && ($tree["RB"]["CLASS"] == "OPS"))
{
@@ -392,6 +405,7 @@ class searchEngine_adapter_phrasea_queryParser
function thesaurus2_apply(&$tree, $bid)
{
if (!$tree)
return;
if (($tree["CLASS"] == "SIMPLE" || $tree["CLASS"] == "QSIMPLE") && isset($tree["SREF"]) && isset($tree["SREF"]["TIDS"]))
{
@@ -458,6 +472,7 @@ class searchEngine_adapter_phrasea_queryParser
if ($depth == 0)
$ret = $tree;
if (!$useThesaurus)
return; // full-text only : inchangé
if (($tree["CLASS"] == "SIMPLE" || $tree["CLASS"] == "QSIMPLE"))
{
@@ -592,6 +607,7 @@ class searchEngine_adapter_phrasea_queryParser
$this->proposals["BASES"]["b$bid"] = array("BID" => $bid, "NAME" => $name, "TERMS" => array());
if (!$tree)
return(0);
$ambigus = 0;
@@ -733,15 +749,19 @@ class searchEngine_adapter_phrasea_queryParser
break;
case "PHRASEA_KW_LAST":
if ($tree["PNUM"] !== null)
return("" . $tree["VALUE"][0] . "[" . $tree["PNUM"] . "]");
else
return($tree["VALUE"][0]);
break;
case "OPS":
case "OPK":
if (isset($tree["PNUM"]))
return('(' . $this->_queryAsHTML($tree["LB"], $depth + 1) . ' ' . $tree["VALUE"] . '[' . $tree["PNUM"] . '] ' . $this->_queryAsHTML($tree["RB"], $depth + 1) . ')');
else
return('(' . $this->_queryAsHTML($tree["LB"], $depth + 1) . ' ' . $tree["VALUE"] . ' ' . $this->_queryAsHTML($tree["RB"], $depth + 1) . ')');
break;
}
@@ -904,8 +924,10 @@ class searchEngine_adapter_phrasea_queryParser
function containsColonOperator(&$tree)
{
if (!$tree)
return(false);
if ($tree["CLASS"] == "OPK" && $tree["NODETYPE"] == PHRASEA_OP_COLON && ($tree["RB"]["CLASS"] == "SIMPLE" || $tree["RB"]["CLASS"] == "QSIMPLE"))
return(true);
$ret = false;
if ($tree["CLASS"] == "OPS" || $tree["CLASS"] == "OPK")
@@ -1028,15 +1050,19 @@ class searchEngine_adapter_phrasea_queryParser
break;
case "PHRASEA_KW_LAST":
if ($tree["PNUM"] !== null)
return("" . $tree["VALUE"][0] . "[" . $tree["PNUM"] . "]");
else
return($tree["VALUE"][0]);
break;
case "OPS":
case "OPK":
if (isset($tree["PNUM"]))
return("(" . $this->astext_ambigu($tree["LB"], $ambiguites, $mouseCallback, $depth + 1) . " " . $tree["VALUE"] . "[" . $tree["PNUM"] . "] " . $this->astext_ambigu($tree["RB"], $ambiguites, $mouseCallback, $depth + 1) . ")");
else
return("(" . $this->astext_ambigu($tree["LB"], $ambiguites, $mouseCallback, $depth + 1) . " " . $tree["VALUE"] . " " . $this->astext_ambigu($tree["RB"], $ambiguites, $mouseCallback, $depth + 1) . ")");
break;
}
@@ -1045,6 +1071,7 @@ class searchEngine_adapter_phrasea_queryParser
function get_ambigu(&$tree, $mouseCallback = "void", $depth = 0)
{
if (!$tree)
return("");
unset($tree["DEPTH"]);
if ($tree["CLASS"] == "OPS" || $tree["CLASS"] == "OPK")
@@ -1069,14 +1096,17 @@ class searchEngine_adapter_phrasea_queryParser
function set_default(&$tree, &$emptyw, $depth = 0)
{
if (!$tree)
return(true);
if ($tree["CLASS"] == "OPS" || $tree["CLASS"] == "OPK")
{
if ($tree["CLASS"] == "OPS")
{
if (!$this->set_default($tree["LB"], $emptyw, $depth + 1))
return(false);
if (!$this->set_default($tree["RB"], $emptyw, $depth + 1))
return(false);
}
else // OPK !
@@ -1210,6 +1240,7 @@ class searchEngine_adapter_phrasea_queryParser
$nmodif += $this->factor_or2($tree["RB"], $depth + 1);
}
}
return($nmodif);
}
@@ -1607,6 +1638,7 @@ class searchEngine_adapter_phrasea_queryParser
// quand on est entre guillements les tokens perdent leur signification
$tree = $this->addtotree($tree, $t, $depth, $inquote);
if (!$tree)
return(null);
}
else
@@ -1629,6 +1661,7 @@ class searchEngine_adapter_phrasea_queryParser
// quand on est entre guillements les tokens perdent leur signification
$tree = $this->addtotree($tree, $t, $depth, $inquote);
if (!$tree)
return(null);
}
else // '(' : appel récursif
@@ -1656,6 +1689,7 @@ class searchEngine_adapter_phrasea_queryParser
}
}
if (!$tree)
return(null);
}
break;
@@ -1712,6 +1746,7 @@ class searchEngine_adapter_phrasea_queryParser
}
}
if (!$tree)
return(null);
}
break;
@@ -1724,6 +1759,7 @@ class searchEngine_adapter_phrasea_queryParser
print("-------------------------\n");
}
if (!$tree)
return(null);
break;
}
@@ -1750,6 +1786,7 @@ class searchEngine_adapter_phrasea_queryParser
}
if (!$t)
return($tree);
switch ($t["CLASS"])
{
@@ -2009,6 +2046,7 @@ class searchEngine_adapter_phrasea_queryParser
function nexttoken($inquote = false)
{
if ($this->phq == "")
return(null);
switch ($c = substr($this->phq, 0, 1))
{
@@ -2143,8 +2181,10 @@ class searchEngine_adapter_phrasea_queryParser
$this->phq = $this->mb_ltrim(mb_substr($this->phq, $i + 1, 99999, 'UTF-8'), 'UTF-8');
}
if ($t != "")
return(array("CLASS" => "TOK_WORD", "VALUE" => $t));
else
return(array("CLASS" => "TOK_VOID", "VALUE" => $t));
break;
}

View File

@@ -762,6 +762,7 @@ class set_export extends set_abstract
return false;
}
if (isset($list['complete']) && $list['complete'] === true)
return;
@@ -1011,6 +1012,7 @@ class set_export extends set_abstract
$response->headers->set('Content-Disposition', $disposition . "; filename=" . $exportname . ";");
$response->headers->set('Content-Length', filesize($file));
$response->setContent(file_get_contents($file));
return $response;
}
}

View File

@@ -81,6 +81,7 @@ class setup
{
}
return $installed;
}
@@ -304,11 +305,13 @@ class setup
protected static function discover_binary($binary, array $look_here = array())
{
if (system_server::get_platform() == 'WINDOWS')
return null;
foreach ($look_here as $place)
{
if (is_executable($place))
return $place;
}
@@ -320,6 +323,7 @@ class setup
$registry = registry::get_instance();
if ($registry->get('GV_h264_streaming') !== true)
return;
?>
<h1>mod_auth_token configuration </h1>
@@ -531,6 +535,7 @@ class setup
</form>
<?php
return;
}
@@ -722,6 +727,7 @@ class setup
$constraints = array();
if (!extension_loaded('gettext'))
return new Setup_ConstraintsIterator($constraints);
foreach (User_Adapter::$locales as $code => $language_name)
@@ -754,11 +760,14 @@ class setup
if (($current === '' || $current === 'off' || $current === '0') && $is_flag)
if ($value === 'off' || $value === '0' || $value === '')
return $current;
if (($current === '1' || $current === 'on') && $is_flag)
if ($value === 'on' || $value === '1')
return $current;
if ($current === $value)
return $current;
}
@@ -843,4 +852,3 @@ class setup
}

View File

@@ -150,6 +150,7 @@ class task_manager
closedir($hdir);
}
}
return $tasks;
}
}

View File

@@ -162,6 +162,7 @@ class task_period_outofdate extends task_abstract
parent.calcSQL();
</script>
<?php
return("");
}
else // ... so we NEVER come here
@@ -218,6 +219,7 @@ class task_period_outofdate extends task_abstract
jQuery.map($(this).serializeArray(), function(n, i){
json[n['name']] = n['value'];
});
return json;
};
})( jQuery );
@@ -309,6 +311,7 @@ class task_period_outofdate extends task_abstract
$("#status"+fld).html(html);
}
});
return;
}
@@ -682,6 +685,7 @@ class task_period_outofdate extends task_abstract
}
$ret = ($nchanged > 0 ? $nchanged : 'NORECSTODO');
return($ret);
}

View File

@@ -68,6 +68,7 @@ class task_period_upgradetov32 extends task_abstract
{
printf("sbas_id '" . $this->sbas_id . "' invalide\n");
$this->return_value = self::RETURNSTATUS_STOPPED;
return;
}
@@ -369,11 +370,13 @@ class task_period_upgradetov32 extends task_abstract
if ($n_done >= 5000)
{
$this->return_value = task_abstract::RETURNSTATUS_TORESTART;
return;
}
if ($memory > 100)
{
$this->return_value = task_abstract::RETURNSTATUS_TORESTART;
return;
}
}

View File

@@ -366,6 +366,7 @@ class task_period_writemeta extends task_databoxAbstract
$this->log("\t" . $s);
}
return $this;
}

View File

@@ -336,6 +336,7 @@ class ControllerRssFeedTest extends \PhraseanetWebTestCaseAbstract
{
$current_attributes[$attribute->name] = $attribute->value;
}
return $current_attributes;
}
@@ -521,6 +522,7 @@ class ControllerRssFeedTest extends \PhraseanetWebTestCaseAbstract
unset($item_entries[$key]); //remove
}
};
return $remove;
}

View File

@@ -111,6 +111,7 @@
results.removeClass('loading').append(data);
activateLinks(results);
active_archiver(results);
return;
}
@@ -148,6 +149,7 @@
return false;
});
active_archiver($('.Basket', $container));
return;
}
@@ -205,6 +207,7 @@
if(!data.success)
{
humane.error(data.message);
return;
}
if(data.archive === true)
@@ -219,6 +222,7 @@
}
p4.WorkZone.refresh();
return;
}

View File

@@ -89,6 +89,7 @@
},
select: function( event, ui ) {
p4.Mustache('Push-Badge', ui.item, appendBadge);
return false;
}
})

View File

@@ -1186,6 +1186,7 @@
if(data.apps && parseInt(data.apps)>1)
t = Math.round((Math.sqrt(parseInt(data.apps)-1) * 1.3 * 60000));
window.setTimeout("sessionactive();", t);
return;
}
})

View File

@@ -351,6 +351,7 @@ foreach ($tasks as $t)
{
if(window.console)
console.log('No task like this');
return(false);
}

View File

@@ -72,6 +72,7 @@ $qrySbas = array();
if (is_null($parm['bas']))
{
echo 'vous devez selectionner des collections dans lesquelles chercher';
return;
}

View File

@@ -220,6 +220,7 @@ if ($request->has_post_datas())
if ($newUsrEmail)
{
$user->set_mail_locked(true);
return phrasea::redirect('/login/sendmail-confirm.php?usr_id=' . $newid);
}

View File

@@ -287,6 +287,7 @@ function doUserConf($conf, $param)
return $new_conf;
}
else
return $conf;
}

View File

@@ -336,6 +336,7 @@ function doUserConf($conf, $param)
return $new_conf;
}
else
return $conf;
}