diff --git a/ecrire/inc/queue.php b/ecrire/inc/queue.php index 2ba5f6ded81492da4b8a7f102cc0773bec6de579..d166f7b499e062fb71325ff54ec224ccc791fd61 100644 --- a/ecrire/inc/queue.php +++ b/ecrire/inc/queue.php @@ -57,12 +57,12 @@ function queue_add_job($function, $description, $arguments = array(), $file = '' if ( $no_duplicate AND - sql_countsel('spip_jobs', + $id_job = sql_getfetsel('id_job','spip_jobs', 'status='.intval(_JQ_SCHEDULED).' AND fonction='.sql_quote($function) .(($no_duplicate==='function_only')?'': ' AND md5args='.sql_quote($md5args).' AND inclure='.sql_quote($file))) ) - return false; + return $id_job; // si pas de date programee, des que possible if (!$time) diff --git a/ecrire/inc/utils.php b/ecrire/inc/utils.php index 25154378d920362b18fb8b89a73c15dba30461c6..2c11309341415465b7a3a3a4484fe1eced807bb6 100644 --- a/ecrire/inc/utils.php +++ b/ecrire/inc/utils.php @@ -597,7 +597,8 @@ function cron ($taches=array(), $taches_old= array()) { * @param $arguments * Optional array of arguments to pass to the function. * @param $file - * Optional file path which needs to be included for $fucntion. + * Optional file path which needs to be included for $function. + * if ends with '/', will do charger_fonction($function,$file); * @param $no_duplicate * If TRUE, do not add the job to the queue if one with the same function and * arguments already exists. diff --git a/prive/squelettes/contenu/job_queue.html b/prive/squelettes/contenu/job_queue.html index e4a0c7a8f333493452ddbdfd67a06fa0cc7a59bf..b3be03eca00efcc0d37512ba9896d53528a72a87 100644 --- a/prive/squelettes/contenu/job_queue.html +++ b/prive/squelettes/contenu/job_queue.html @@ -22,7 +22,7 @@ genie_queue_watch_dist(); [(#AUTORISER{'annuler','job',#ID_JOB}|oui) <div class="actions"> [(#BOUTON_ACTION{<:annuler:>,#URL_ACTION_AUTEUR{annuler_job,#ID_JOB,#SELF},ajax})] - [(#BOUTON_ACTION{<:queue_executer_maintenant:>,#URL_ACTION_AUTEUR{forcer_job,#ID_JOB,#SELF},ajax})] + [(#BOUTON_ACTION{<:queue_executer_maintenant:>,#URL_ACTION_AUTEUR{forcer_job,#ID_JOB,#SELF}})] </div> ] </li>