mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-08 10:34:34 +00:00
Cleanup namepaces, variables uses
This commit is contained in:
@@ -77,13 +77,6 @@ class API_OAuth2_Account
|
||||
*/
|
||||
protected $token;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param appbox $appbox
|
||||
* @param int $account_id
|
||||
* @return API_OAuth2_Account
|
||||
*/
|
||||
public function __construct(Application $app, $account_id)
|
||||
{
|
||||
$this->app = $app;
|
||||
@@ -230,13 +223,6 @@ class API_OAuth2_Account
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param appbox $appbox
|
||||
* @param User_Adapter $user
|
||||
* @param API_OAuth2_Application $application
|
||||
* @return API_OAuth2_Account
|
||||
*/
|
||||
public static function create(Application $app, User_Adapter $user, API_OAuth2_Application $application)
|
||||
{
|
||||
$sql = 'INSERT INTO api_accounts
|
||||
@@ -261,13 +247,6 @@ class API_OAuth2_Account
|
||||
return new self($app, $account_id);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param appbox $appbox
|
||||
* @param API_OAuth2_Application $application
|
||||
* @param User_Adapter $user
|
||||
* @return API_OAuth2_Account
|
||||
*/
|
||||
public static function load_with_user(Application $app, API_OAuth2_Application $application, User_Adapter $user)
|
||||
{
|
||||
$sql = 'SELECT api_account_id FROM api_accounts
|
||||
|
@@ -664,12 +664,6 @@ class API_OAuth2_Application
|
||||
return new self($app, $row['application_id']);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param appbox $appbox
|
||||
* @param User_Adapter $user
|
||||
* @return array
|
||||
*/
|
||||
public static function load_dev_app_by_user(Application $app, User_Adapter $user)
|
||||
{
|
||||
$sql = 'SELECT a.application_id
|
||||
@@ -689,12 +683,6 @@ class API_OAuth2_Application
|
||||
return $apps;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param appbox $appbox
|
||||
* @param user_adapter $user
|
||||
* @return API_OAuth2_Application
|
||||
*/
|
||||
public static function load_app_by_user(Application $app, user_adapter $user)
|
||||
{
|
||||
$sql = 'SELECT a.application_id
|
||||
|
@@ -10,7 +10,6 @@
|
||||
*/
|
||||
|
||||
use Alchemy\Phrasea\Application;
|
||||
use Alchemy\Phrasea\Core\Configuration;
|
||||
use Alchemy\Phrasea\Border\Attribute\Status;
|
||||
use Alchemy\Phrasea\Border\Manager as BorderManager;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
@@ -320,160 +319,158 @@ class API_V1_adapter extends API_V1_Abstract
|
||||
*/
|
||||
protected function get_gv_info(Application $app)
|
||||
{
|
||||
$registry = $app['phraseanet.registry'];
|
||||
|
||||
return array(
|
||||
'global_values' => array(
|
||||
'serverName' => $registry->get('GV_ServerName'),
|
||||
'title' => $registry->get('GV_homeTitle'),
|
||||
'keywords' => $registry->get('GV_metaKeywords'),
|
||||
'description' => $registry->get('GV_metaDescription'),
|
||||
'serverName' => $app['phraseanet.registry']->get('GV_ServerName'),
|
||||
'title' => $app['phraseanet.registry']->get('GV_homeTitle'),
|
||||
'keywords' => $app['phraseanet.registry']->get('GV_metaKeywords'),
|
||||
'description' => $app['phraseanet.registry']->get('GV_metaDescription'),
|
||||
'httpServer' => array(
|
||||
'logErrors' => $registry->get('GV_log_errors'),
|
||||
'logErrors' => $app['phraseanet.registry']->get('GV_log_errors'),
|
||||
'phpTimezone' => ini_get('date.timezone'),
|
||||
'siteId' => $registry->get('GV_sit'),
|
||||
'staticUrl' => $registry->get('GV_STATIC_URL'),
|
||||
'defaultLanguage' => $registry->get('id_GV_default_lng'),
|
||||
'allowIndexing' => $registry->get('GV_allow_search_engine'),
|
||||
'siteId' => $app['phraseanet.registry']->get('GV_sit'),
|
||||
'staticUrl' => $app['phraseanet.registry']->get('GV_STATIC_URL'),
|
||||
'defaultLanguage' => $app['phraseanet.registry']->get('id_GV_default_lng'),
|
||||
'allowIndexing' => $app['phraseanet.registry']->get('GV_allow_search_engine'),
|
||||
'modes' => array(
|
||||
'XsendFile' => $registry->get('GV_modxsendfile'),
|
||||
'nginxXAccelRedirect' => $registry->get('GV_X_Accel_Redirect'),
|
||||
'nginxXAccelRedirectMountPoint' => $registry->get('GV_X_Accel_Redirect_mount_point'),
|
||||
'h264Streaming' => $registry->get('GV_h264_streaming'),
|
||||
'authTokenDirectory' => $registry->get('GV_mod_auth_token_directory'),
|
||||
'authTokenDirectoryPath' => $registry->get('GV_mod_auth_token_directory_path'),
|
||||
'authTokenPassphrase' => $registry->get('GV_mod_auth_token_passphrase'),
|
||||
'XsendFile' => $app['phraseanet.registry']->get('GV_modxsendfile'),
|
||||
'nginxXAccelRedirect' => $app['phraseanet.registry']->get('GV_X_Accel_Redirect'),
|
||||
'nginxXAccelRedirectMountPoint' => $app['phraseanet.registry']->get('GV_X_Accel_Redirect_mount_point'),
|
||||
'h264Streaming' => $app['phraseanet.registry']->get('GV_h264_streaming'),
|
||||
'authTokenDirectory' => $app['phraseanet.registry']->get('GV_mod_auth_token_directory'),
|
||||
'authTokenDirectoryPath' => $app['phraseanet.registry']->get('GV_mod_auth_token_directory_path'),
|
||||
'authTokenPassphrase' => $app['phraseanet.registry']->get('GV_mod_auth_token_passphrase'),
|
||||
),
|
||||
'files' => array(
|
||||
'owner' => $registry->get('GV_filesOwner'),
|
||||
'group' => $registry->get('GV_filesOwner'),
|
||||
'owner' => $app['phraseanet.registry']->get('GV_filesOwner'),
|
||||
'group' => $app['phraseanet.registry']->get('GV_filesOwner'),
|
||||
)
|
||||
),
|
||||
'maintenance' => array(
|
||||
'alertMessage' => $registry->get('GV_message'),
|
||||
'displayMessage' => $registry->get('GV_message_on'),
|
||||
'alertMessage' => $app['phraseanet.registry']->get('GV_message'),
|
||||
'displayMessage' => $app['phraseanet.registry']->get('GV_message_on'),
|
||||
),
|
||||
'webServices' => array(
|
||||
'googleApi' => $registry->get('GV_google_api'),
|
||||
'googleAnalyticsId' => $registry->get('GV_googleAnalytics'),
|
||||
'googleChromeFrameDisclaimer' => $registry->get('GV_display_gcf'),
|
||||
'i18nWebService' => $registry->get('GV_i18n_service'),
|
||||
'googleApi' => $app['phraseanet.registry']->get('GV_google_api'),
|
||||
'googleAnalyticsId' => $app['phraseanet.registry']->get('GV_googleAnalytics'),
|
||||
'googleChromeFrameDisclaimer' => $app['phraseanet.registry']->get('GV_display_gcf'),
|
||||
'i18nWebService' => $app['phraseanet.registry']->get('GV_i18n_service'),
|
||||
'recaptacha' => array(
|
||||
'active' => $registry->get('GV_captchas'),
|
||||
'publicKey' => $registry->get('GV_captcha_public_key'),
|
||||
'privateKey' => $registry->get('GV_captcha_private_key'),
|
||||
'active' => $app['phraseanet.registry']->get('GV_captchas'),
|
||||
'publicKey' => $app['phraseanet.registry']->get('GV_captcha_public_key'),
|
||||
'privateKey' => $app['phraseanet.registry']->get('GV_captcha_private_key'),
|
||||
),
|
||||
'youtube' => array(
|
||||
'active' => $registry->get('GV_youtube_api'),
|
||||
'clientId' => $registry->get('GV_youtube_client_id'),
|
||||
'clientSecret' => $registry->get('GV_youtube_client_secret'),
|
||||
'devKey' => $registry->get('GV_youtube_dev_key'),
|
||||
'active' => $app['phraseanet.registry']->get('GV_youtube_api'),
|
||||
'clientId' => $app['phraseanet.registry']->get('GV_youtube_client_id'),
|
||||
'clientSecret' => $app['phraseanet.registry']->get('GV_youtube_client_secret'),
|
||||
'devKey' => $app['phraseanet.registry']->get('GV_youtube_dev_key'),
|
||||
),
|
||||
'flickr' => array(
|
||||
'active' => $registry->get('GV_flickr_api'),
|
||||
'clientId' => $registry->get('GV_flickr_client_id'),
|
||||
'clientSecret' => $registry->get('GV_flickr_client_secret'),
|
||||
'active' => $app['phraseanet.registry']->get('GV_flickr_api'),
|
||||
'clientId' => $app['phraseanet.registry']->get('GV_flickr_client_id'),
|
||||
'clientSecret' => $app['phraseanet.registry']->get('GV_flickr_client_secret'),
|
||||
),
|
||||
'dailymtotion' => array(
|
||||
'active' => $registry->get('GV_dailymotion_api'),
|
||||
'clientId' => $registry->get('GV_dailymotion_client_id'),
|
||||
'clientSecret' => $registry->get('GV_dailymotion_client_secret'),
|
||||
'active' => $app['phraseanet.registry']->get('GV_dailymotion_api'),
|
||||
'clientId' => $app['phraseanet.registry']->get('GV_dailymotion_client_id'),
|
||||
'clientSecret' => $app['phraseanet.registry']->get('GV_dailymotion_client_secret'),
|
||||
)
|
||||
),
|
||||
'navigator' => array(
|
||||
'active' => $registry->get('GV_client_navigator'),
|
||||
'active' => $app['phraseanet.registry']->get('GV_client_navigator'),
|
||||
),
|
||||
'homepage' => array(
|
||||
'viewType' => $registry->get('GV_home_publi'),
|
||||
'viewType' => $app['phraseanet.registry']->get('GV_home_publi'),
|
||||
),
|
||||
'report' => array(
|
||||
'anonymous' => $registry->get('GV_anonymousReport'),
|
||||
'anonymous' => $app['phraseanet.registry']->get('GV_anonymousReport'),
|
||||
),
|
||||
'events' => array(
|
||||
'events' => $registry->get('GV_events'),
|
||||
'notifications' => $registry->get('GV_notifications'),
|
||||
'events' => $app['phraseanet.registry']->get('GV_events'),
|
||||
'notifications' => $app['phraseanet.registry']->get('GV_notifications'),
|
||||
),
|
||||
'upload' => array(
|
||||
'allowedFileExtension' => $registry->get('GV_appletAllowedFileEx'),
|
||||
'allowedFileExtension' => $app['phraseanet.registry']->get('GV_appletAllowedFileEx'),
|
||||
),
|
||||
'filesystem' => array(
|
||||
'noWeb' => $registry->get('GV_base_datapath_noweb'),
|
||||
'noWeb' => $app['phraseanet.registry']->get('GV_base_datapath_noweb'),
|
||||
),
|
||||
'searchEngine' => array(
|
||||
'configuration' => array(
|
||||
'defaultQuery' => $registry->get('GV_defaultQuery'),
|
||||
'defaultQueryType' => $registry->get('GV_defaultQuery_type'),
|
||||
'defaultQuery' => $app['phraseanet.registry']->get('GV_defaultQuery'),
|
||||
'defaultQueryType' => $app['phraseanet.registry']->get('GV_defaultQuery_type'),
|
||||
),
|
||||
'sphinx' => array(
|
||||
'active' => $registry->get('GV_sphinx'),
|
||||
'host' => $registry->get('GV_sphinx_host'),
|
||||
'port' => $registry->get('GV_sphinx_port'),
|
||||
'realtimeHost' => $registry->get('GV_sphinx_rt_host'),
|
||||
'realtimePort' => $registry->get('GV_sphinx_rt_port'),
|
||||
'active' => $app['phraseanet.registry']->get('GV_sphinx'),
|
||||
'host' => $app['phraseanet.registry']->get('GV_sphinx_host'),
|
||||
'port' => $app['phraseanet.registry']->get('GV_sphinx_port'),
|
||||
'realtimeHost' => $app['phraseanet.registry']->get('GV_sphinx_rt_host'),
|
||||
'realtimePort' => $app['phraseanet.registry']->get('GV_sphinx_rt_port'),
|
||||
),
|
||||
'phrasea' => array(
|
||||
'minChar' => $registry->get('GV_min_letters_truncation'),
|
||||
'sort' => $registry->get('GV_phrasea_sort'),
|
||||
'minChar' => $app['phraseanet.registry']->get('GV_min_letters_truncation'),
|
||||
'sort' => $app['phraseanet.registry']->get('GV_phrasea_sort'),
|
||||
),
|
||||
),
|
||||
'binary' => array(
|
||||
'phpCli' => $registry->get('GV_cli'),
|
||||
'phpIni' => $registry->get('GV_PHP_INI'),
|
||||
'imagick' => $registry->get('GV_imagick'),
|
||||
'swfExtract' => $registry->get('GV_swf_extract'),
|
||||
'pdf2swf' => $registry->get('GV_pdf2swf'),
|
||||
'swfRender' => $registry->get('GV_swf_render'),
|
||||
'unoconv' => $registry->get('GV_unoconv'),
|
||||
'ffmpeg' => $registry->get('GV_ffmpeg'),
|
||||
'mp4box' => $registry->get('GV_mp4box'),
|
||||
'pdftotext' => $registry->get('GV_pdftotext'),
|
||||
'pdfmaxpages' => $registry->get('GV_pdfmaxpages'),),
|
||||
'phpCli' => $app['phraseanet.registry']->get('GV_cli'),
|
||||
'phpIni' => $app['phraseanet.registry']->get('GV_PHP_INI'),
|
||||
'imagick' => $app['phraseanet.registry']->get('GV_imagick'),
|
||||
'swfExtract' => $app['phraseanet.registry']->get('GV_swf_extract'),
|
||||
'pdf2swf' => $app['phraseanet.registry']->get('GV_pdf2swf'),
|
||||
'swfRender' => $app['phraseanet.registry']->get('GV_swf_render'),
|
||||
'unoconv' => $app['phraseanet.registry']->get('GV_unoconv'),
|
||||
'ffmpeg' => $app['phraseanet.registry']->get('GV_ffmpeg'),
|
||||
'mp4box' => $app['phraseanet.registry']->get('GV_mp4box'),
|
||||
'pdftotext' => $app['phraseanet.registry']->get('GV_pdftotext'),
|
||||
'pdfmaxpages' => $app['phraseanet.registry']->get('GV_pdfmaxpages'),),
|
||||
'mainConfiguration' => array(
|
||||
'adminMail' => $registry->get('GV_adminMail'),
|
||||
'viewBasAndCollName' => $registry->get('GV_view_bas_and_coll'),
|
||||
'chooseExportTitle' => $registry->get('GV_choose_export_title'),
|
||||
'defaultExportTitle' => $registry->get('GV_default_export_title'),
|
||||
'socialTools' => $registry->get('GV_social_tools'),),
|
||||
'adminMail' => $app['phraseanet.registry']->get('GV_adminMail'),
|
||||
'viewBasAndCollName' => $app['phraseanet.registry']->get('GV_view_bas_and_coll'),
|
||||
'chooseExportTitle' => $app['phraseanet.registry']->get('GV_choose_export_title'),
|
||||
'defaultExportTitle' => $app['phraseanet.registry']->get('GV_default_export_title'),
|
||||
'socialTools' => $app['phraseanet.registry']->get('GV_social_tools'),),
|
||||
'modules' => array(
|
||||
'thesaurus' => $registry->get('GV_thesaurus'),
|
||||
'storyMode' => $registry->get('GV_multiAndReport'),
|
||||
'docSubsitution' => $registry->get('GV_seeOngChgDoc'),
|
||||
'subdefSubstitution' => $registry->get('GV_seeNewThumb'),),
|
||||
'thesaurus' => $app['phraseanet.registry']->get('GV_thesaurus'),
|
||||
'storyMode' => $app['phraseanet.registry']->get('GV_multiAndReport'),
|
||||
'docSubsitution' => $app['phraseanet.registry']->get('GV_seeOngChgDoc'),
|
||||
'subdefSubstitution' => $app['phraseanet.registry']->get('GV_seeNewThumb'),),
|
||||
'email' => array(
|
||||
'defaultMailAddress' => $registry->get('GV_defaulmailsenderaddr'),
|
||||
'defaultMailAddress' => $app['phraseanet.registry']->get('GV_defaulmailsenderaddr'),
|
||||
'smtp' => array(
|
||||
'active' => $registry->get('GV_smtp'),
|
||||
'auth' => $registry->get('GV_smtp_auth'),
|
||||
'host' => $registry->get('GV_smtp_host'),
|
||||
'port' => $registry->get('GV_smtp_port'),
|
||||
'secure' => $registry->get('GV_smtp_secure'),
|
||||
'user' => $registry->get('GV_smtp_user'),
|
||||
'password' => $registry->get('GV_smtp_password'),
|
||||
'active' => $app['phraseanet.registry']->get('GV_smtp'),
|
||||
'auth' => $app['phraseanet.registry']->get('GV_smtp_auth'),
|
||||
'host' => $app['phraseanet.registry']->get('GV_smtp_host'),
|
||||
'port' => $app['phraseanet.registry']->get('GV_smtp_port'),
|
||||
'secure' => $app['phraseanet.registry']->get('GV_smtp_secure'),
|
||||
'user' => $app['phraseanet.registry']->get('GV_smtp_user'),
|
||||
'password' => $app['phraseanet.registry']->get('GV_smtp_password'),
|
||||
),
|
||||
),
|
||||
'ftp' => array(
|
||||
'active' => $registry->get('GV_activeFTP'),
|
||||
'activeForUser' => $registry->get('GV_ftp_for_user'),),
|
||||
'active' => $app['phraseanet.registry']->get('GV_activeFTP'),
|
||||
'activeForUser' => $app['phraseanet.registry']->get('GV_ftp_for_user'),),
|
||||
'client' => array(
|
||||
'maxSizeDownload' => $registry->get('GV_download_max'),
|
||||
'tabSearchMode' => $registry->get('GV_ong_search'),
|
||||
'tabAdvSearchPosition' => $registry->get('GV_ong_advsearch'),
|
||||
'tabTopicsPosition' => $registry->get('GV_ong_topics'),
|
||||
'tabOngActifPosition' => $registry->get('GV_ong_actif'),
|
||||
'renderTopicsMode' => $registry->get('GV_client_render_topics'),
|
||||
'displayRolloverPreview' => $registry->get('GV_rollover_reg_preview'),
|
||||
'displayRolloverBasket' => $registry->get('GV_rollover_chu'),
|
||||
'collRenderMode' => $registry->get('GV_client_coll_ckbox'),
|
||||
'viewSizeBaket' => $registry->get('GV_viewSizeBaket'),
|
||||
'clientAutoShowProposals' => $registry->get('GV_clientAutoShowProposals'),
|
||||
'needAuth2DL' => $registry->get('GV_needAuth2DL'),),
|
||||
'maxSizeDownload' => $app['phraseanet.registry']->get('GV_download_max'),
|
||||
'tabSearchMode' => $app['phraseanet.registry']->get('GV_ong_search'),
|
||||
'tabAdvSearchPosition' => $app['phraseanet.registry']->get('GV_ong_advsearch'),
|
||||
'tabTopicsPosition' => $app['phraseanet.registry']->get('GV_ong_topics'),
|
||||
'tabOngActifPosition' => $app['phraseanet.registry']->get('GV_ong_actif'),
|
||||
'renderTopicsMode' => $app['phraseanet.registry']->get('GV_client_render_topics'),
|
||||
'displayRolloverPreview' => $app['phraseanet.registry']->get('GV_rollover_reg_preview'),
|
||||
'displayRolloverBasket' => $app['phraseanet.registry']->get('GV_rollover_chu'),
|
||||
'collRenderMode' => $app['phraseanet.registry']->get('GV_client_coll_ckbox'),
|
||||
'viewSizeBaket' => $app['phraseanet.registry']->get('GV_viewSizeBaket'),
|
||||
'clientAutoShowProposals' => $app['phraseanet.registry']->get('GV_clientAutoShowProposals'),
|
||||
'needAuth2DL' => $app['phraseanet.registry']->get('GV_needAuth2DL'),),
|
||||
'inscription' => array(
|
||||
'autoSelectDB' => $registry->get('GV_autoselectDB'),
|
||||
'autoRegister' => $registry->get('GV_autoregister'),
|
||||
'autoSelectDB' => $app['phraseanet.registry']->get('GV_autoselectDB'),
|
||||
'autoRegister' => $app['phraseanet.registry']->get('GV_autoregister'),
|
||||
),
|
||||
'push' => array(
|
||||
'validationReminder' => $registry->get('GV_validation_reminder'),
|
||||
'expirationValue' => $registry->get('GV_val_expiration'),
|
||||
'validationReminder' => $app['phraseanet.registry']->get('GV_validation_reminder'),
|
||||
'expirationValue' => $app['phraseanet.registry']->get('GV_val_expiration'),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
Reference in New Issue
Block a user