diff --git a/lib/Alchemy/Phrasea/Application/Admin.php b/lib/Alchemy/Phrasea/Application/Admin.php index e76352f38c..c35ab30562 100644 --- a/lib/Alchemy/Phrasea/Application/Admin.php +++ b/lib/Alchemy/Phrasea/Application/Admin.php @@ -39,5 +39,6 @@ return call_user_func( $app->error(function($e){ return new \Symfony\Component\HttpFoundation\Response($e->getMessage(), 403); }); + return $app; }); diff --git a/lib/Alchemy/Phrasea/Application/Api.php b/lib/Alchemy/Phrasea/Application/Api.php index f7ded9f0e3..4a3b6ad5dd 100644 --- a/lib/Alchemy/Phrasea/Application/Api.php +++ b/lib/Alchemy/Phrasea/Application/Api.php @@ -73,7 +73,7 @@ return call_user_func(function() } catch (\Exception $e) { - + } } $auth = new \Session_Authentication_None($user); diff --git a/lib/Alchemy/Phrasea/Application/OAuth2.php b/lib/Alchemy/Phrasea/Application/OAuth2.php index 3fc2851b5f..e1fa9e30a5 100644 --- a/lib/Alchemy/Phrasea/Application/OAuth2.php +++ b/lib/Alchemy/Phrasea/Application/OAuth2.php @@ -31,7 +31,7 @@ use Symfony\Component\HttpFoundation\Request; return call_user_func(function() { $app = new \Silex\Application(); - + $app['Core'] = \bootstrap::getCore(); $app->register(new \Silex\Provider\ValidatorServiceProvider(), array( @@ -171,7 +171,7 @@ return call_user_func(function() } $account = $oauth2_adapter->updateAccount($session->get_usr_id()); - + $params['account_id'] = $account->get_id(); if ( ! $app_authorized && $action_accept === null) @@ -225,7 +225,7 @@ return call_user_func(function() { throw new HttpException(400, 'require the use of the https', null, array('content-type'=> 'application/json')); } - + $app['oauth']->grantAccessToken(); ob_flush(); flush(); @@ -343,7 +343,7 @@ return call_user_func(function() } catch (\Exception $e) { - + } $Serializer = $app['Core']['Serializer']; @@ -378,7 +378,7 @@ return call_user_func(function() } catch (\Exception $e) { - + } $Serializer = $app['Core']['Serializer']; @@ -404,7 +404,7 @@ return call_user_func(function() } catch (\Exception $e) { - + } $Serializer = $app['Core']['Serializer']; @@ -428,7 +428,7 @@ return call_user_func(function() } catch (\Exception $e) { - + } $Serializer = $app['Core']['Serializer']; @@ -455,13 +455,13 @@ return call_user_func(function() $code = 500; $msg = 'We are sorry, but something went wrong'; $headers = array(); - + if($e instanceof HttpExceptionInterface) { $headers = $e->getHeaders(); $msg = $e->getMessage(); $code = $e->getStatusCode(); - + if(isset($headers['content-type']) && $headers['content-type'] == 'application/json') { $obj = new \stdClass(); @@ -470,7 +470,7 @@ return call_user_func(function() $msg = json_encode($obj); } } - + return new Response($msg, $code, $headers); }); diff --git a/lib/Alchemy/Phrasea/Controller/Prod/Push.php b/lib/Alchemy/Phrasea/Controller/Prod/Push.php index 28f2352cd2..fc16a2b097 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/Push.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/Push.php @@ -444,7 +444,7 @@ class Push implements ControllerProviderInterface } catch (\Exception_NotFound $e) { - + } $Participant = new \Entities\ValidationParticipant(); @@ -641,7 +641,7 @@ class Push implements ControllerProviderInterface } catch (\Exception $e) { - + } if (!$user instanceof \User_Adapter) diff --git a/lib/Alchemy/Phrasea/Controller/Prod/Tools.php b/lib/Alchemy/Phrasea/Controller/Prod/Tools.php index c9a70ed637..89ef11799d 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/Tools.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/Tools.php @@ -88,6 +88,7 @@ class Tools implements ControllerProviderInterface 'metadatasFirst' => $metadatasFirst, 'metadatasSecond' => $metadatasSecond ); + return new Response($app['Core']->getTwig()->render($template, $var)); }); @@ -115,6 +116,7 @@ class Tools implements ControllerProviderInterface } $json = $app['Core']->getSerializer()->serialize($return, 'json'); + return new Response($json, 200, array('content-type' => 'application/json')); }); @@ -143,6 +145,7 @@ class Tools implements ControllerProviderInterface } $json = $app['Core']->getSerializer()->serialize($return, 'json'); + return new Response($json, 200, array('content-type' => 'application/json')); }); @@ -251,6 +254,7 @@ class Tools implements ControllerProviderInterface , 'fileName' => $fileName , 'errorMessage' => $errorMessage ); + return new Response($app['Core']->getTwig()->render($template, $var)); } }); @@ -276,6 +280,7 @@ class Tools implements ControllerProviderInterface } $json = $app['Core']->getSerializer()->serialize($return, 'json'); + return new Response($json, 201, array('content-type' => 'application/json')); }); @@ -307,6 +312,7 @@ class Tools implements ControllerProviderInterface } $json = $app['Core']->getSerializer()->serialize($return, 'json'); + return new Response($json, 201, array('content-type' => 'application/json')); }); diff --git a/lib/Alchemy/Phrasea/Loader/Autoloader.php b/lib/Alchemy/Phrasea/Loader/Autoloader.php index d7a397fe77..6a824c8ca7 100644 --- a/lib/Alchemy/Phrasea/Loader/Autoloader.php +++ b/lib/Alchemy/Phrasea/Loader/Autoloader.php @@ -86,7 +86,7 @@ class Autoloader extends UniversalClassLoader { return $this->classmap[$classname]; } - + $normalized_classname = str_replace('_', '/', $classname); foreach ($this->paths as $path) diff --git a/lib/Alchemy/Phrasea/Media/Subdef/OptionType/Boolean.php b/lib/Alchemy/Phrasea/Media/Subdef/OptionType/Boolean.php index 3977f40cf2..40c064e99c 100644 --- a/lib/Alchemy/Phrasea/Media/Subdef/OptionType/Boolean.php +++ b/lib/Alchemy/Phrasea/Media/Subdef/OptionType/Boolean.php @@ -51,4 +51,4 @@ class Boolean implements OptionType return $this->value; } -} \ No newline at end of file +} diff --git a/lib/Alchemy/Phrasea/Media/Subdef/OptionType/Enum.php b/lib/Alchemy/Phrasea/Media/Subdef/OptionType/Enum.php index 2a06bd548e..0738254195 100644 --- a/lib/Alchemy/Phrasea/Media/Subdef/OptionType/Enum.php +++ b/lib/Alchemy/Phrasea/Media/Subdef/OptionType/Enum.php @@ -69,4 +69,4 @@ class Enum implements OptionType return $this->value; } -} \ No newline at end of file +} diff --git a/lib/Alchemy/Phrasea/Media/Subdef/OptionType/Range.php b/lib/Alchemy/Phrasea/Media/Subdef/OptionType/Range.php index 5a8e556293..7af1410bdc 100644 --- a/lib/Alchemy/Phrasea/Media/Subdef/OptionType/Range.php +++ b/lib/Alchemy/Phrasea/Media/Subdef/OptionType/Range.php @@ -76,4 +76,4 @@ class Range implements OptionType return $this->max_value; } -} \ No newline at end of file +} diff --git a/lib/classes/API/OAuth2/Adapter.class.php b/lib/classes/API/OAuth2/Adapter.class.php index e247ef034e..ed83012e10 100644 --- a/lib/classes/API/OAuth2/Adapter.class.php +++ b/lib/classes/API/OAuth2/Adapter.class.php @@ -195,6 +195,7 @@ class API_OAuth2_Adapter extends OAuth2 $application = API_OAuth2_Application::load_from_client_id($this->appbox, $client_id); if ($client_secret === NULL) + return true; $crypted = $this->crypt_secret($client_secret, $application->get_nonce()); @@ -203,7 +204,7 @@ class API_OAuth2_Adapter extends OAuth2 } catch (Exception $e) { - + } return false; @@ -248,7 +249,7 @@ class API_OAuth2_Adapter extends OAuth2 } catch (Exception $e) { - + } return $result; @@ -321,7 +322,7 @@ class API_OAuth2_Adapter extends OAuth2 } catch (Exception $e) { - + } return null; @@ -375,7 +376,7 @@ class API_OAuth2_Adapter extends OAuth2 } catch (Exception $e) { - + } return null; @@ -498,7 +499,7 @@ class API_OAuth2_Adapter extends OAuth2 $input["redirect_uri"] = $redirect_uri; } - + /** * Check response_type */ @@ -507,7 +508,7 @@ class API_OAuth2_Adapter extends OAuth2 $this->errorDoRedirectUriCallback($input["redirect_uri"], OAUTH2_ERROR_INVALID_REQUEST, 'Invalid response type.', NULL, $input["state"]); } - + /** * Check requested auth response type against the list of supported types */ @@ -521,7 +522,7 @@ class API_OAuth2_Adapter extends OAuth2 if ($this->checkRestrictedAuthResponseType($input["client_id"], $input["response_type"]) === FALSE) $this->errorDoRedirectUriCallback($input["redirect_uri"], OAUTH2_ERROR_UNAUTHORIZED_CLIENT, NULL, NULL, $input["state"]); - + /** * Validate that the requested scope is supported */ @@ -628,7 +629,7 @@ class API_OAuth2_Adapter extends OAuth2 } catch (Exception $e) { - + } return false; @@ -640,11 +641,13 @@ class API_OAuth2_Adapter extends OAuth2 if ($token_param === FALSE) // Access token was not provided + return $exit_not_present ? $this->errorWWWAuthenticateResponseHeader(OAUTH2_HTTP_BAD_REQUEST, $realm, OAUTH2_ERROR_INVALID_REQUEST, 'The request is missing a required parameter, includes an unsupported parameter or parameter value, repeats the same parameter, uses more than one method for including an access token, or is otherwise malformed.', NULL, $scope) : FALSE; // Get the stored token data (from the implementing subclass) $token = $this->getAccessToken($token_param); if ($token === NULL) + return $exit_invalid ? $this->errorWWWAuthenticateResponseHeader(OAUTH2_HTTP_UNAUTHORIZED, $realm, OAUTH2_ERROR_INVALID_TOKEN, 'The access token provided is invalid.', NULL, $scope) : FALSE; if (isset($token['revoked']) && $token['revoked']) @@ -656,11 +659,13 @@ class API_OAuth2_Adapter extends OAuth2 { // Check token expiration (I'm leaving this check separated, later we'll fill in better error messages) if (isset($token["expires"]) && time() > $token["expires"]) + return $exit_expired ? $this->errorWWWAuthenticateResponseHeader(OAUTH2_HTTP_UNAUTHORIZED, $realm, OAUTH2_ERROR_EXPIRED_TOKEN, 'The access token provided has expired.', NULL, $scope) : FALSE; } // Check scope, if provided // If token doesn't have a scope, it's NULL/empty, or it's insufficient, then throw an error if ($scope && ( ! isset($token["scope"]) || ! $token["scope"] || ! $this->checkScope($scope, $token["scope"]))) + return $exit_scope ? $this->errorWWWAuthenticateResponseHeader(OAUTH2_HTTP_FORBIDDEN, $realm, OAUTH2_ERROR_INSUFFICIENT_SCOPE, 'The request requires higher privileges than provided by the access token.', NULL, $scope) : FALSE; //save token's linked ses_id @@ -729,7 +734,7 @@ class API_OAuth2_Adapter extends OAuth2 if ( ! $this->checkRestrictedGrantType($client[0], $input["grant_type"])) $this->errorJsonResponse(OAUTH2_HTTP_BAD_REQUEST, OAUTH2_ERROR_UNAUTHORIZED_CLIENT); - + // Do the granting switch ($input["grant_type"]) { @@ -839,9 +844,9 @@ class API_OAuth2_Adapter extends OAuth2 $auth = new \Session_Authentication_Native($appbox, $username, $password); $auth->challenge_password(); - + $account = API_OAuth2_Account::load_with_user($appbox, $application, $auth->get_user()); - + return array( 'redirect_uri' => $application->get_redirect_uri() , 'client_id' => $application->get_client_id() diff --git a/lib/classes/API/V1/adapter.class.php b/lib/classes/API/V1/adapter.class.php index b39f365d2e..94e64e2f37 100644 --- a/lib/classes/API/V1/adapter.class.php +++ b/lib/classes/API/V1/adapter.class.php @@ -1156,6 +1156,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() diff --git a/lib/classes/API/V1/result.class.php b/lib/classes/API/V1/result.class.php index 163f0aeb11..ee478fe25e 100644 --- a/lib/classes/API/V1/result.class.php +++ b/lib/classes/API/V1/result.class.php @@ -115,6 +115,7 @@ class API_V1_result protected function parse_response_type() { if (trim($this->request->get('callback')) !== '') + return $this->response_type = self::FORMAT_JSONP; $accept = $this->request->getAcceptableContentTypes(); diff --git a/lib/classes/Session/Handler.class.php b/lib/classes/Session/Handler.class.php index 7f818ee165..f14c99d0c4 100644 --- a/lib/classes/Session/Handler.class.php +++ b/lib/classes/Session/Handler.class.php @@ -329,7 +329,7 @@ class Session_Handler $this->phrasea_session->open(); $ses_id = $this->phrasea_session->get_id(); - + $this->storage()->set('usr_id', $user->get_id()); $this->storage()->set('ses_id', $ses_id); } diff --git a/lib/classes/caption/record.class.php b/lib/classes/caption/record.class.php index 01c20a78fa..bb07aa402e 100644 --- a/lib/classes/caption/record.class.php +++ b/lib/classes/caption/record.class.php @@ -224,6 +224,7 @@ class caption_record implements caption_interface, cache_cacheableInterface foreach ($this->get_fields() as $meta_struct_id => $field) { if ($field->get_name() == $fieldname) + return $field; } diff --git a/lib/classes/databox.class.php b/lib/classes/databox.class.php index 8b8f9c075a..b4706bb161 100644 --- a/lib/classes/databox.class.php +++ b/lib/classes/databox.class.php @@ -448,6 +448,7 @@ class databox extends base $stmt->closeCursor(); if ($row) + return self::get_instance((int) $row['sbas_id']); try @@ -701,6 +702,7 @@ class databox extends base } } if ($n > $limit) + return true; return false; @@ -1217,6 +1219,7 @@ class databox extends base public function get_structure() { if ($this->structure) + return $this->structure; $this->structure = $this->retrieve_structure(); @@ -1257,6 +1260,7 @@ class databox extends base public function get_cterms() { if ($this->cterms) + return $this->cterms; $sql = "SELECT value FROM pref WHERE prop='cterms'"; @@ -1423,6 +1427,7 @@ class databox extends base public function get_cgus() { if ($this->cgus) + return $this->cgus; $this->load_cgus(); diff --git a/lib/classes/patch/3604.class.php b/lib/classes/patch/3604.class.php index 2f22f28b93..ae4aabf0fd 100644 --- a/lib/classes/patch/3604.class.php +++ b/lib/classes/patch/3604.class.php @@ -93,7 +93,7 @@ class patch_3604 implements patchInterface { } - + $sql = 'SELECT m . * FROM metadatas_structure s, metadatas m WHERE m.meta_struct_id = s.id diff --git a/lib/classes/record/adapter.class.php b/lib/classes/record/adapter.class.php index 6e1c8ed8d1..e617ec37ee 100644 --- a/lib/classes/record/adapter.class.php +++ b/lib/classes/record/adapter.class.php @@ -1080,7 +1080,7 @@ class record_adapter implements record_Interface, cache_cacheableInterface } catch (Exception $e) { - + } return $this; @@ -1696,6 +1696,7 @@ class record_adapter implements record_Interface, cache_cacheableInterface if ( ! $subdefs) { $Core['monolog']->addInfo(sprintf('Nothing to do for %s', $this->get_type())); + return; } diff --git a/lib/classes/searchEngine/adapter/phrasea/engine.class.php b/lib/classes/searchEngine/adapter/phrasea/engine.class.php index d54cf89b91..dbe5937d20 100644 --- a/lib/classes/searchEngine/adapter/phrasea/engine.class.php +++ b/lib/classes/searchEngine/adapter/phrasea/engine.class.php @@ -646,6 +646,7 @@ class searchEngine_adapter_phrasea_engine extends searchEngine_adapter_abstract ); if ( ! isset($res['results']) || ! is_array($res['results'])) + return array(); $rs = $res['results']; $res = array_shift($rs); diff --git a/lib/classes/set/exportftp.class.php b/lib/classes/set/exportftp.class.php index b803b6356c..347a65963c 100644 --- a/lib/classes/set/exportftp.class.php +++ b/lib/classes/set/exportftp.class.php @@ -138,7 +138,7 @@ class set_exportftp extends set_export . $properties['exportExt']; $bfields = isset($properties['businessfields']) ? $properties['businessfields'] : null; - + $params = array( ':ftp_export_id' => $ftp_export_id , ':base_id' => $file['base_id'] diff --git a/lib/classes/system/file.class.php b/lib/classes/system/file.class.php index 6fcd74823a..ac83d6f2cb 100644 --- a/lib/classes/system/file.class.php +++ b/lib/classes/system/file.class.php @@ -264,6 +264,7 @@ class system_file extends SplFileObject if (in_array($this->get_mime(), $raws)) + return true; return false; } @@ -292,8 +293,10 @@ class system_file extends SplFileObject } if ($lowercase) + return mb_strtolower($extension); else + return $extension; } @@ -486,6 +489,7 @@ class system_file extends SplFileObject $this->technical_datas = array(); if ( ! is_executable($registry->get('GV_mplayer'))) + return $this; $cmd = $registry->get('GV_mplayer') @@ -708,6 +712,7 @@ class system_file extends SplFileObject public function read_uuid() { if ($this->uuid) + return $this->uuid; $datas = exiftool::extract_metadatas($this, exiftool::EXTRACT_XML_RDF); @@ -746,6 +751,7 @@ class system_file extends SplFileObject public function is_new_in_base($sbas_id) { if ( ! $this->uuid) + return true; $connbas = connection::getPDOConnection($sbas_id); @@ -817,6 +823,7 @@ class system_file extends SplFileObject { $value = $base64_encoded ? base64_decode($v->nodeValue) : $v->nodeValue; if (uuid::is_valid($value)) + return $value; } } @@ -921,6 +928,7 @@ class system_file extends SplFileObject public function get_phrasea_tech_field($field) { if (isset($this->phrasea_tech_field[$field])) + return $this->phrasea_tech_field[$field]; return null; } @@ -1255,6 +1263,7 @@ class system_file extends SplFileObject for ($i = strlen($mac); $i;) { if (strpos($macchars, $mac[ -- $i]) !== false) + return(iconv('MACINTOSH', 'UTF-8', $mac)); } @@ -1265,6 +1274,7 @@ class system_file extends SplFileObject for ($i = strlen($s); $i;) { if (strpos($macchars, $s[ -- $i]) !== false) + return(iconv('MACINTOSH', 'UTF-8', $s)); } diff --git a/lib/classes/task/Scheduler.class.php b/lib/classes/task/Scheduler.class.php index 4dd67224c9..929c1dcde0 100644 --- a/lib/classes/task/Scheduler.class.php +++ b/lib/classes/task/Scheduler.class.php @@ -50,6 +50,7 @@ class task_Scheduler { file_put_contents($logdir . "scheduler_l.log", $message . "\n", FILE_APPEND); } + return $this; } diff --git a/lib/classes/task/abstract.class.php b/lib/classes/task/abstract.class.php index 9bc0d32845..3d11aaee2a 100644 --- a/lib/classes/task/abstract.class.php +++ b/lib/classes/task/abstract.class.php @@ -20,7 +20,7 @@ abstract class task_abstract const STATE_MAXMEGSREACHED = 'STATE_MAXMEGS'; const STATE_MAXRECSDONE = 'STATE_MAXRECS'; const STATE_FINISHED = 'STATE_FINISHED'; - + const SIGNAL_SCHEDULER_DIED = 'SIGNAL_SCHEDULER_DIED'; protected $suicidable = false; @@ -89,7 +89,7 @@ abstract class task_abstract */ protected $return_value; protected $runner; - + private $input; private $output; @@ -115,6 +115,7 @@ abstract class task_abstract $stmt->closeCursor(); if(!$row) throw new Exception('Unknown task id'); + return $row['status']; } @@ -169,7 +170,7 @@ $this->log(sprintf("task %d <- %s", $this->get_task_id(), $status)); // // return $this; // } - // 'active' means 'auto-start when scheduler starts' + // 'active' means 'auto-start when scheduler starts' public function set_active($boolean) { $conn = connection::getPDOConnection(); @@ -251,7 +252,7 @@ $this->log(sprintf("task %d <- %s", $this->get_task_id(), $status)); return $this->settings; } - // 'active' means 'auto-start when scheduler starts' + // 'active' means 'auto-start when scheduler starts' public function is_active() { return $this->active; @@ -446,6 +447,7 @@ $this->log(sprintf("task %d <- %s", $this->get_task_id(), $status)); } fclose($fd); } + return $pid; } @@ -532,7 +534,7 @@ $this->log(sprintf("task %d <- %s", $this->get_task_id(), $status)); return $this; } - + public function set_running($stat) { $this->running = $stat; @@ -604,6 +606,7 @@ $this->log(sprintf("task %d <- %s", $this->get_task_id(), $status)); $this->delete(); else $this->set_status($this->return_value); + return $this; } @@ -615,7 +618,7 @@ $this->log(sprintf("task %d <- %s", $this->get_task_id(), $status)); $this->maxrecs = max(10, min(1000, (int) $sx_task_settings->maxrecs)); $this->maxmegs = max(16, min(512, (int) $sx_task_settings->maxmegs)); $this->record_buffer_size = max(1, min(100, (int) $sx_task_settings->flush)); - + return $this; } @@ -682,8 +685,8 @@ $this->log(sprintf("task %d <- %s", $this->get_task_id(), $status)); return $this; } - - + + public static function interfaceAvailable() { return true; @@ -766,7 +769,7 @@ $this->log(sprintf("task %d <- %s", $this->get_task_id(), $status)); } catch(Exception $e) { - + } return $this; diff --git a/lib/classes/task/manager.class.php b/lib/classes/task/manager.class.php index 1387db6e43..b366535e23 100644 --- a/lib/classes/task/manager.class.php +++ b/lib/classes/task/manager.class.php @@ -68,6 +68,7 @@ class task_manager public function get_tasks($refresh = false) { if ($this->tasks && !$refresh) + return $this->tasks; $sql = "SELECT task2.* FROM task2 ORDER BY task_id ASC"; diff --git a/lib/classes/task/period/archive.class.php b/lib/classes/task/period/archive.class.php index c48f898cc7..108785dd03 100644 --- a/lib/classes/task/period/archive.class.php +++ b/lib/classes/task/period/archive.class.php @@ -172,6 +172,7 @@ class task_period_archive extends task_abstract .copy_spe.checked = copy_spe) ? "true" : "false" ?>; return_value = $ret; + return($ret); } @@ -589,6 +592,7 @@ class task_period_archive extends task_abstract $stmt->closeCursor(); if($row && $row['status'] == 'tostop') + return('NORECSTODO'); sleep(2); $cold -= 2; @@ -736,8 +740,10 @@ class task_period_archive extends task_abstract { $magicmethod = strtoupper($sxDotPhrasea->magicfile['method']); if($magicmethod == 'LOCK' && file_exists($path . '/' . $magicfile)) + return; elseif($magicmethod == 'UNLOCK' && !file_exists($path . '/' . $magicfile)) + return; } @@ -790,7 +796,7 @@ class task_period_archive extends task_abstract } catch(Exception $e) { - + } return($nnew); @@ -843,12 +849,14 @@ class task_period_archive extends task_abstract { $magicmethod = strtoupper($sxDotPhrasea->magicfile['method']); if($magicmethod == 'LOCK' && file_exists($path . '/' . $magicfile)) + return; elseif($magicmethod == 'UNLOCK' && !file_exists($path . '/' . $magicfile)) + return; } } - + while(($file = $listFolder->read()) !== NULL) { if($this->isIgnoredFile($file)) @@ -906,7 +914,7 @@ class task_period_archive extends task_abstract } catch(Exception $e) { - + } return; @@ -935,6 +943,7 @@ class task_period_archive extends task_abstract $iloop = 0; if($depth == 0 && ($node->getAttribute('temperature') == 'hot' || $node->getAttribute('cid') == '-1')) + return; $xpath = new DOMXPath($dom); // useful @@ -1093,6 +1102,7 @@ class task_period_archive extends task_abstract $ret = false; if($depth == 0 && $node->getAttribute('temperature') == 'hot') // if root of hotfolder if hot, die... + return($ret); $nodesToDel = array(); @@ -1174,6 +1184,7 @@ class task_period_archive extends task_abstract $iloop = 0; if($node->getAttribute('temperature') == 'hot') + return; $nodesToDel = array(); @@ -1250,6 +1261,7 @@ class task_period_archive extends task_abstract $iloop = 0; if($node->getAttribute('temperature') == 'hot') + return; $ret = 0; @@ -1313,6 +1325,7 @@ class task_period_archive extends task_abstract $ret = false; if($depth == 0 && $node->getAttribute('temperature') == 'hot') // if root of hotfolder if hot, die... + return($ret); //printf("%s : \n", __LINE__); @@ -1696,6 +1709,7 @@ class task_period_archive extends task_abstract { $match = $node->getAttribute('match'); if($match == '*') + return; $file = $node->getAttribute('name'); @@ -1843,7 +1857,7 @@ class task_period_archive extends task_abstract } catch(Exception $e) { - + } } diff --git a/lib/classes/task/period/cindexer.class.php b/lib/classes/task/period/cindexer.class.php index 16067062fd..1ca70f87c8 100644 --- a/lib/classes/task/period/cindexer.class.php +++ b/lib/classes/task/period/cindexer.class.php @@ -183,6 +183,7 @@ class task_period_cindexer extends task_abstract parent.calccmd(); get('GV_RootPath') . 'logs'); $this->return_value = self::RETURNSTATUS_STOPPED; // will be normal ending - + if($this->method == self::METHOD_PROC_OPEN) { $descriptors = array(); @@ -545,7 +547,7 @@ class task_period_cindexer extends task_abstract // $fdERR = fopen($nullfile, 'a+'); $fdOUT = fopen($logdir . "/task_o_" . $this->get_task_id() . ".log", "a+"); $fdERR = fopen($logdir . "/task_e_" . $this->get_task_id() . ".log", "a+"); - + pcntl_exec($cmd, $args); sleep(2); @@ -571,7 +573,7 @@ class task_period_cindexer extends task_abstract break; } } - + $this->check_task_status(); if($this->task_status == self::STATUS_TOSTOP) @@ -579,7 +581,7 @@ class task_period_cindexer extends task_abstract posix_kill($pid, ($sigsent=SIGINT)); sleep(2); } - + $status = NULL; if(pcntl_wait($status, WNOHANG) == $pid) { @@ -622,12 +624,12 @@ class task_period_cindexer extends task_abstract $fdIN = fopen($nullfile, 'r'); $fdOUT = fopen($logdir . "/task_o_" . $this->get_task_id() . ".log", "a+"); $fdERR = fopen($logdir . "/task_e_" . $this->get_task_id() . ".log", "a+"); - + pcntl_exec($cmd, $args); sleep(2); } - + return($this->return_value); } diff --git a/lib/classes/task/period/outofdate.class.php b/lib/classes/task/period/outofdate.class.php index f269f12a90..72cb2ec9d8 100644 --- a/lib/classes/task/period/outofdate.class.php +++ b/lib/classes/task/period/outofdate.class.php @@ -799,7 +799,7 @@ class task_period_outofdate extends task_abstract $sql = "UPDATE prop AS p1 INNER JOIN record USING(record_id) SET " . $sqlset[0] . " WHERE " . $w; - + $ret[] = array('sql'=>$sql, 'params'=>$params); } @@ -882,7 +882,7 @@ class task_period_outofdate extends task_abstract } - + public function facility() { $ret = NULL; diff --git a/templates/web/prod/actions/Tools/confirm.html.twig b/templates/web/prod/actions/Tools/confirm.html.twig index 80c7dd80ad..b6635987dc 100644 --- a/templates/web/prod/actions/Tools/confirm.html.twig +++ b/templates/web/prod/actions/Tools/confirm.html.twig @@ -22,4 +22,4 @@ - \ No newline at end of file + diff --git a/templates/web/prod/actions/Tools/iframeUpload.html.twig b/templates/web/prod/actions/Tools/iframeUpload.html.twig index d03a13b907..692ba2fcda 100644 --- a/templates/web/prod/actions/Tools/iframeUpload.html.twig +++ b/templates/web/prod/actions/Tools/iframeUpload.html.twig @@ -4,4 +4,4 @@ {% trans ' an error occured '%} {{errorMessage}} {% endif %} - \ No newline at end of file + diff --git a/templates/web/prod/actions/Tools/index.html.twig b/templates/web/prod/actions/Tools/index.html.twig index cfc711072e..714bec987a 100644 --- a/templates/web/prod/actions/Tools/index.html.twig +++ b/templates/web/prod/actions/Tools/index.html.twig @@ -20,7 +20,7 @@ {% endfor %}