mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 15:33:15 +00:00
Fix CS
This commit is contained in:
@@ -97,7 +97,7 @@ class ACL implements cache_cacheableInterface
|
|||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
* @param User_Interface $user
|
* @param User_Interface $user
|
||||||
* @return ACL
|
* @return ACL
|
||||||
*/
|
*/
|
||||||
public function __construct(User_Interface $user, appbox &$appbox)
|
public function __construct(User_Interface $user, appbox &$appbox)
|
||||||
@@ -111,7 +111,7 @@ class ACL implements cache_cacheableInterface
|
|||||||
/**
|
/**
|
||||||
* Check if a hd grant has been received for a record
|
* Check if a hd grant has been received for a record
|
||||||
*
|
*
|
||||||
* @param record_Interface $record
|
* @param record_Interface $record
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public function has_hd_grant(record_Interface $record)
|
public function has_hd_grant(record_Interface $record)
|
||||||
@@ -179,7 +179,7 @@ class ACL implements cache_cacheableInterface
|
|||||||
/**
|
/**
|
||||||
* Check if a hd grant has been received for a record
|
* Check if a hd grant has been received for a record
|
||||||
*
|
*
|
||||||
* @param record_Interface $record
|
* @param record_Interface $record
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public function has_preview_grant(record_Interface $record)
|
public function has_preview_grant(record_Interface $record)
|
||||||
@@ -225,8 +225,8 @@ class ACL implements cache_cacheableInterface
|
|||||||
/**
|
/**
|
||||||
* Apply a template on user
|
* Apply a template on user
|
||||||
*
|
*
|
||||||
* @param User_Interface $template_user
|
* @param User_Interface $template_user
|
||||||
* @param array $base_ids
|
* @param array $base_ids
|
||||||
* @return ACL
|
* @return ACL
|
||||||
*/
|
*/
|
||||||
public function apply_model(User_Interface $template_user, Array $base_ids)
|
public function apply_model(User_Interface $template_user, Array $base_ids)
|
||||||
@@ -373,8 +373,8 @@ class ACL implements cache_cacheableInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param int $base_id
|
* @param int $base_id
|
||||||
* @param string $right
|
* @param string $right
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public function has_right_on_base($base_id, $right)
|
public function has_right_on_base($base_id, $right)
|
||||||
@@ -397,7 +397,7 @@ class ACL implements cache_cacheableInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param <type> $option
|
* @param <type> $option
|
||||||
* @return <type>
|
* @return <type>
|
||||||
*/
|
*/
|
||||||
public function get_cache_key($option = null)
|
public function get_cache_key($option = null)
|
||||||
@@ -407,7 +407,7 @@ class ACL implements cache_cacheableInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param <type> $option
|
* @param <type> $option
|
||||||
* @return <type>
|
* @return <type>
|
||||||
*/
|
*/
|
||||||
public function delete_data_from_cache($option = null)
|
public function delete_data_from_cache($option = null)
|
||||||
@@ -437,7 +437,7 @@ class ACL implements cache_cacheableInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param <type> $option
|
* @param <type> $option
|
||||||
* @return <type>
|
* @return <type>
|
||||||
*/
|
*/
|
||||||
public function get_data_from_cache($option = null)
|
public function get_data_from_cache($option = null)
|
||||||
@@ -447,9 +447,9 @@ class ACL implements cache_cacheableInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param <type> $value
|
* @param <type> $value
|
||||||
* @param <type> $option
|
* @param <type> $option
|
||||||
* @param <type> $duration
|
* @param <type> $duration
|
||||||
* @return <type>
|
* @return <type>
|
||||||
*/
|
*/
|
||||||
public function set_data_to_cache($value, $option = null, $duration = 0)
|
public function set_data_to_cache($value, $option = null, $duration = 0)
|
||||||
@@ -460,7 +460,7 @@ class ACL implements cache_cacheableInterface
|
|||||||
/**
|
/**
|
||||||
* Return true if user is restricted in download on the collection
|
* Return true if user is restricted in download on the collection
|
||||||
*
|
*
|
||||||
* @param int $base_id
|
* @param int $base_id
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public function is_restricted_download($base_id)
|
public function is_restricted_download($base_id)
|
||||||
@@ -477,7 +477,7 @@ class ACL implements cache_cacheableInterface
|
|||||||
/**
|
/**
|
||||||
* Return the number of remaining downloads on the collection
|
* Return the number of remaining downloads on the collection
|
||||||
*
|
*
|
||||||
* @param int $base_id
|
* @param int $base_id
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function remaining_download($base_id)
|
public function remaining_download($base_id)
|
||||||
@@ -494,8 +494,8 @@ class ACL implements cache_cacheableInterface
|
|||||||
/**
|
/**
|
||||||
* Remove n download from the remainings
|
* Remove n download from the remainings
|
||||||
*
|
*
|
||||||
* @param int $base_id
|
* @param int $base_id
|
||||||
* @param int $n
|
* @param int $n
|
||||||
* @return ACL
|
* @return ACL
|
||||||
*/
|
*/
|
||||||
public function remove_remaining($base_id, $n = 1)
|
public function remove_remaining($base_id, $n = 1)
|
||||||
@@ -518,7 +518,7 @@ class ACL implements cache_cacheableInterface
|
|||||||
/**
|
/**
|
||||||
* Check if the user has the right, at least on one collection
|
* Check if the user has the right, at least on one collection
|
||||||
*
|
*
|
||||||
* @param string $right
|
* @param string $right
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public function has_right($right)
|
public function has_right($right)
|
||||||
@@ -534,8 +534,8 @@ class ACL implements cache_cacheableInterface
|
|||||||
/**
|
/**
|
||||||
* Check if the user has the required right on a database
|
* Check if the user has the required right on a database
|
||||||
*
|
*
|
||||||
* @param <type> $sbas_id
|
* @param <type> $sbas_id
|
||||||
* @param <type> $right
|
* @param <type> $right
|
||||||
* @return <type>
|
* @return <type>
|
||||||
*/
|
*/
|
||||||
public function has_right_on_sbas($sbas_id, $right)
|
public function has_right_on_sbas($sbas_id, $right)
|
||||||
@@ -559,7 +559,7 @@ class ACL implements cache_cacheableInterface
|
|||||||
/**
|
/**
|
||||||
* Retrieve mask AND for user on specified base_id
|
* Retrieve mask AND for user on specified base_id
|
||||||
*
|
*
|
||||||
* @param int $base_id
|
* @param int $base_id
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function get_mask_and($base_id)
|
public function get_mask_and($base_id)
|
||||||
@@ -575,7 +575,7 @@ class ACL implements cache_cacheableInterface
|
|||||||
/**
|
/**
|
||||||
* Retrieve mask XOR for user on specified base_id
|
* Retrieve mask XOR for user on specified base_id
|
||||||
*
|
*
|
||||||
* @param int $base_id
|
* @param int $base_id
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function get_mask_xor($base_id)
|
public function get_mask_xor($base_id)
|
||||||
@@ -591,7 +591,7 @@ class ACL implements cache_cacheableInterface
|
|||||||
/**
|
/**
|
||||||
* Return true if access to base_id is granted
|
* Return true if access to base_id is granted
|
||||||
*
|
*
|
||||||
* @param int $base_id
|
* @param int $base_id
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public function has_access_to_base($base_id)
|
public function has_access_to_base($base_id)
|
||||||
@@ -605,7 +605,7 @@ class ACL implements cache_cacheableInterface
|
|||||||
/**
|
/**
|
||||||
* Return true if access to sbas_id is granted
|
* Return true if access to sbas_id is granted
|
||||||
*
|
*
|
||||||
* @param int $sbas_id
|
* @param int $sbas_id
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public function has_access_to_sbas($sbas_id)
|
public function has_access_to_sbas($sbas_id)
|
||||||
@@ -619,7 +619,7 @@ class ACL implements cache_cacheableInterface
|
|||||||
* Return an array of base_id which are granted, with
|
* Return an array of base_id which are granted, with
|
||||||
* optionnal filter by rights
|
* optionnal filter by rights
|
||||||
*
|
*
|
||||||
* @param Array $rights
|
* @param Array $rights
|
||||||
* @return Array
|
* @return Array
|
||||||
*/
|
*/
|
||||||
public function get_granted_base(Array $rights = array(), array $sbas_ids = null)
|
public function get_granted_base(Array $rights = array(), array $sbas_ids = null)
|
||||||
@@ -665,7 +665,7 @@ class ACL implements cache_cacheableInterface
|
|||||||
* Return an array of sbas_id which are granted, with
|
* Return an array of sbas_id which are granted, with
|
||||||
* optionnal filter by rights
|
* optionnal filter by rights
|
||||||
*
|
*
|
||||||
* @param Array $rights
|
* @param Array $rights
|
||||||
* @return Array
|
* @return Array
|
||||||
*/
|
*/
|
||||||
public function get_granted_sbas($rights = array())
|
public function get_granted_sbas($rights = array())
|
||||||
@@ -976,7 +976,7 @@ class ACL implements cache_cacheableInterface
|
|||||||
/**
|
/**
|
||||||
* Return whether or not the acces to the specified module is OK
|
* Return whether or not the acces to the specified module is OK
|
||||||
*
|
*
|
||||||
* @param String $module_name
|
* @param String $module_name
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public function has_access_to_module($module_name)
|
public function has_access_to_module($module_name)
|
||||||
@@ -1009,7 +1009,7 @@ class ACL implements cache_cacheableInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param array $base_ids
|
* @param array $base_ids
|
||||||
* @return ACL
|
* @return ACL
|
||||||
*/
|
*/
|
||||||
public function revoke_access_from_bases(Array $base_ids)
|
public function revoke_access_from_bases(Array $base_ids)
|
||||||
@@ -1031,7 +1031,7 @@ class ACL implements cache_cacheableInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param array $base_ids
|
* @param array $base_ids
|
||||||
* @return ACL
|
* @return ACL
|
||||||
*/
|
*/
|
||||||
public function give_access_to_base(Array $base_ids)
|
public function give_access_to_base(Array $base_ids)
|
||||||
@@ -1068,7 +1068,7 @@ class ACL implements cache_cacheableInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param array $sbas_ids
|
* @param array $sbas_ids
|
||||||
* @return ACL
|
* @return ACL
|
||||||
*/
|
*/
|
||||||
public function give_access_to_sbas(Array $sbas_ids)
|
public function give_access_to_sbas(Array $sbas_ids)
|
||||||
@@ -1091,8 +1091,8 @@ class ACL implements cache_cacheableInterface
|
|||||||
* @todo Create special toggle 'actif' / not a right like others
|
* @todo Create special toggle 'actif' / not a right like others
|
||||||
* => nested loops when updating right to actif on an inactif account
|
* => nested loops when updating right to actif on an inactif account
|
||||||
*
|
*
|
||||||
* @param <type> $base_id
|
* @param <type> $base_id
|
||||||
* @param <type> $rights
|
* @param <type> $rights
|
||||||
* @return ACL
|
* @return ACL
|
||||||
*/
|
*/
|
||||||
public function update_rights_to_base($base_id, $rights)
|
public function update_rights_to_base($base_id, $rights)
|
||||||
@@ -1159,14 +1159,6 @@ class ACL implements cache_cacheableInterface
|
|||||||
$stmt->execute($params);
|
$stmt->execute($params);
|
||||||
$stmt->closeCursor();
|
$stmt->closeCursor();
|
||||||
|
|
||||||
// $sql = 'DELETE FROM sbasusr
|
|
||||||
// WHERE sbas_id NOT IN
|
|
||||||
// (SELECT distinct sbas_id FROM sbas)';
|
|
||||||
//
|
|
||||||
// $stmt = $this->appbox->get_connection()->prepare($sql);
|
|
||||||
// $stmt->execute();
|
|
||||||
// $stmt->closeCursor();
|
|
||||||
|
|
||||||
$this->delete_data_from_cache(self::CACHE_RIGHTS_SBAS);
|
$this->delete_data_from_cache(self::CACHE_RIGHTS_SBAS);
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
@@ -1174,8 +1166,8 @@ class ACL implements cache_cacheableInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param <type> $sbas_id
|
* @param <type> $sbas_id
|
||||||
* @param <type> $rights
|
* @param <type> $rights
|
||||||
* @return ACL
|
* @return ACL
|
||||||
*/
|
*/
|
||||||
public function update_rights_to_sbas($sbas_id, $rights)
|
public function update_rights_to_sbas($sbas_id, $rights)
|
||||||
@@ -1213,7 +1205,7 @@ class ACL implements cache_cacheableInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param <type> $base_id
|
* @param <type> $base_id
|
||||||
* @return ACL
|
* @return ACL
|
||||||
*/
|
*/
|
||||||
public function remove_quotas_on_base($base_id)
|
public function remove_quotas_on_base($base_id)
|
||||||
@@ -1257,9 +1249,9 @@ class ACL implements cache_cacheableInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param <type> $base_id
|
* @param <type> $base_id
|
||||||
* @param <type> $droits
|
* @param <type> $droits
|
||||||
* @param <type> $restes
|
* @param <type> $restes
|
||||||
* @return ACL
|
* @return ACL
|
||||||
*/
|
*/
|
||||||
public function set_quotas_on_base($base_id, $droits, $restes)
|
public function set_quotas_on_base($base_id, $droits, $restes)
|
||||||
|
@@ -18,7 +18,6 @@
|
|||||||
use Monolog\Handler;
|
use Monolog\Handler;
|
||||||
use Monolog\Logger;
|
use Monolog\Logger;
|
||||||
use Symfony\Component\Console\Input\InputInterface;
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
use Symfony\Component\Console\Input\InputOption;
|
|
||||||
use Symfony\Component\Console\Output\OutputInterface;
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
use Symfony\Component\Console\Command\Command;
|
use Symfony\Component\Console\Command\Command;
|
||||||
|
|
||||||
|
@@ -1650,9 +1650,9 @@ class record_adapter implements record_Interface, cache_cacheableInterface
|
|||||||
/**
|
/**
|
||||||
* Generates subdefs
|
* Generates subdefs
|
||||||
*
|
*
|
||||||
* @param databox $databox The databox
|
* @param databox $databox The databox
|
||||||
* @param \Monolog\Logger $logger A logger for binary operation
|
* @param \Monolog\Logger $logger A logger for binary operation
|
||||||
* @param array $wanted_subdefs An array of subdef names
|
* @param array $wanted_subdefs An array of subdef names
|
||||||
* @return \record_adapter
|
* @return \record_adapter
|
||||||
*/
|
*/
|
||||||
public function generate_subdefs(databox $databox, Logger $logger = null, Array $wanted_subdefs = null)
|
public function generate_subdefs(databox $databox, Logger $logger = null, Array $wanted_subdefs = null)
|
||||||
@@ -1723,9 +1723,9 @@ class record_adapter implements record_Interface, cache_cacheableInterface
|
|||||||
/**
|
/**
|
||||||
* Generate a subdef
|
* Generate a subdef
|
||||||
*
|
*
|
||||||
* @param databox_subdef $subdef_class The related databox subdef
|
* @param databox_subdef $subdef_class The related databox subdef
|
||||||
* @param type $pathdest The destination of the file
|
* @param type $pathdest The destination of the file
|
||||||
* @param Logger $logger A logger for binary operation
|
* @param Logger $logger A logger for binary operation
|
||||||
* @return \record_adapter
|
* @return \record_adapter
|
||||||
*/
|
*/
|
||||||
protected function generate_subdef(databox_subdef $subdef_class, $pathdest, Logger $logger)
|
protected function generate_subdef(databox_subdef $subdef_class, $pathdest, Logger $logger)
|
||||||
|
@@ -487,6 +487,7 @@ class setup
|
|||||||
</form>
|
</form>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -10,7 +10,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
use Monolog\Logger;
|
use Monolog\Logger;
|
||||||
use Symfony\Component\Console\Output\OutputInterface;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@@ -178,6 +178,7 @@ class task_period_archive extends task_abstract
|
|||||||
<?php echo $form ?>.copy_spe.checked = <?php echo p4field::isyes($sxml->copy_spe) ? "true" : "false" ?>;
|
<?php echo $form ?>.copy_spe.checked = <?php echo p4field::isyes($sxml->copy_spe) ? "true" : "false" ?>;
|
||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
return("");
|
return("");
|
||||||
} else { // ... so we NEVER come here
|
} else { // ... so we NEVER come here
|
||||||
// bad xml
|
// bad xml
|
||||||
@@ -208,6 +209,7 @@ class task_period_archive extends task_abstract
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -570,7 +572,8 @@ class task_period_archive extends task_abstract
|
|||||||
if ($this->debug)
|
if ($this->debug)
|
||||||
$this->log("=========== listFilesPhase1 ========== (returned " . $nnew . ")\n" . $dom->saveXML());
|
$this->log("=========== listFilesPhase1 ========== (returned " . $nnew . ")\n" . $dom->saveXML());
|
||||||
|
|
||||||
if ($nnew === 'TOSTOP') { // special case : status has changed to TOSTOP while listing files
|
// special case : status has changed to TOSTOP while listing files
|
||||||
|
if ($nnew === 'TOSTOP') {
|
||||||
return('TOSTOP');
|
return('TOSTOP');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1046,8 +1049,10 @@ class task_period_archive extends task_abstract
|
|||||||
|
|
||||||
$ret = false;
|
$ret = false;
|
||||||
|
|
||||||
if ($depth == 0 && $node->getAttribute('temperature') == 'hot') // if root of hotfolder if hot, die...
|
// if root of hotfolder if hot, die...
|
||||||
|
if ($depth == 0 && $node->getAttribute('temperature') == 'hot') {
|
||||||
return($ret);
|
return($ret);
|
||||||
|
}
|
||||||
|
|
||||||
$nodesToDel = array();
|
$nodesToDel = array();
|
||||||
for ($n = $node->firstChild; $n; $n = $n->nextSibling) {
|
for ($n = $node->firstChild; $n; $n = $n->nextSibling) {
|
||||||
@@ -1263,11 +1268,11 @@ class task_period_archive extends task_abstract
|
|||||||
|
|
||||||
$ret = false;
|
$ret = false;
|
||||||
|
|
||||||
if ($depth == 0 && $node->getAttribute('temperature') == 'hot') { // if root of hotfolder if hot, die...
|
// if root of hotfolder if hot, die...
|
||||||
|
if ($depth == 0 && $node->getAttribute('temperature') == 'hot') {
|
||||||
return($ret);
|
return($ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
//printf("%s : \n", __LINE__);
|
|
||||||
$nodesToDel = array();
|
$nodesToDel = array();
|
||||||
for ($n = $node->firstChild; $n; $n = $n->nextSibling) {
|
for ($n = $node->firstChild; $n; $n = $n->nextSibling) {
|
||||||
if (($iloop ++ % 20) == 0) {
|
if (($iloop ++ % 20) == 0) {
|
||||||
|
@@ -100,6 +100,7 @@ class task_period_ftp extends task_appboxAbstract
|
|||||||
<?php echo $form ?>.period.value = "<?php echo p4string::MakeString($sxml->period, "js", '"') ?>";
|
<?php echo $form ?>.period.value = "<?php echo p4string::MakeString($sxml->period, "js", '"') ?>";
|
||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
return("");
|
return("");
|
||||||
} else { // ... so we NEVER come here
|
} else { // ... so we NEVER come here
|
||||||
// bad xml
|
// bad xml
|
||||||
@@ -131,6 +132,7 @@ class task_period_ftp extends task_appboxAbstract
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -99,6 +99,7 @@ class task_period_ftpPull extends task_appboxAbstract
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
return("");
|
return("");
|
||||||
} else { // ... so we NEVER come here
|
} else { // ... so we NEVER come here
|
||||||
// bad xml
|
// bad xml
|
||||||
|
@@ -290,7 +290,7 @@ class task_period_writemeta extends task_databoxAbstract
|
|||||||
|
|
||||||
if ($meta->is_multi()) {
|
if ($meta->is_multi()) {
|
||||||
$values = array();
|
$values = array();
|
||||||
foreach($datas as $data){
|
foreach ($datas as $data) {
|
||||||
$values[] = $data->getValue();
|
$values[] = $data->getValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user