Parcourir la source

Fixed bug in job view

spficklin il y a 14 ans
Parent
commit
bb02d4f0f6
1 fichiers modifiés avec 7 ajouts et 3 suppressions
  1. 7 3
      tripal_core/jobs.php

+ 7 - 3
tripal_core/jobs.php

@@ -268,9 +268,13 @@ function tripal_core_preprocess_tripal_core_job_view (&$variables){
    // arguments as they are
    // arguments as they are
    $args = preg_split("/::/",$job->arguments);
    $args = preg_split("/::/",$job->arguments);
    $arg_hook = $job->modulename."_job_describe_args";
    $arg_hook = $job->modulename."_job_describe_args";
-   $new_args = call_user_func_array($arg_hook,array($job->callback,$args));
+   if(is_callable($arg_hook)){
-   if(is_array($new_args) and count($new_args)){
+      $new_args = call_user_func_array($arg_hook,array($job->callback,$args));
-      $job->arguments = $new_args;
+      if(is_array($new_args) and count($new_args)){
+         $job->arguments = $new_args;
+      } else {
+         $job->arguments = $args;
+      }
    } else {
    } else {
       $job->arguments = $args;
       $job->arguments = $args;
    }
    }