mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-15 00:14:10 +01:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
84767692b0 | ||
|
|
d484614c0f | ||
|
|
b403bace6c | ||
|
|
0b751a9dd6 |
@@ -150,7 +150,7 @@ abstract class AsyncTask extends DBObject
|
||||
public function GetRetryDelay($iErrorCode = null)
|
||||
{
|
||||
$iRetryDelay = 600;
|
||||
$aRetries = MetaModel::GetConfig()->Get('async_task_retries', array());
|
||||
$aRetries = MetaModel::GetConfig()->Get('async_task_retries');
|
||||
if (is_array($aRetries) && array_key_exists(get_class($this), $aRetries))
|
||||
{
|
||||
$aConfig = $aRetries[get_class($this)];
|
||||
@@ -162,12 +162,13 @@ abstract class AsyncTask extends DBObject
|
||||
public function GetMaxRetries($iErrorCode = null)
|
||||
{
|
||||
$iMaxRetries = 0;
|
||||
$aRetries = MetaModel::GetConfig()->Get('async_task_retries', array());
|
||||
$aRetries = MetaModel::GetConfig()->Get('async_task_retries');
|
||||
if (is_array($aRetries) && array_key_exists(get_class($this), $aRetries))
|
||||
{
|
||||
$aConfig = $aRetries[get_class($this)];
|
||||
$iMaxRetries = $aConfig['max_retries'];
|
||||
}
|
||||
return $iMaxRetries;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -380,6 +381,6 @@ class AsyncSendEmail extends AsyncTask
|
||||
case EMAIL_SEND_ERROR:
|
||||
return "Failed: ".implode(', ', $aIssues);
|
||||
}
|
||||
return '';
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -384,7 +384,7 @@
|
||||
success(term,parsed);
|
||||
}
|
||||
// if an AJAX url has been supplied, try loading the data now
|
||||
} else if( (typeof options.url == "string") && (options.url.length > 0) ){
|
||||
} else if( (typeof options.url == "string") && (options.url.length > 0) && (term.length > 0) ){
|
||||
|
||||
var extraParams = {
|
||||
timestamp: +new Date()
|
||||
@@ -479,7 +479,7 @@
|
||||
minChars: 1,
|
||||
delay: 400,
|
||||
matchCase: false,
|
||||
matchSubset: true,
|
||||
matchSubset: false,
|
||||
matchContains: false,
|
||||
cacheLength: 100,
|
||||
max: 1000,
|
||||
@@ -640,7 +640,10 @@
|
||||
});
|
||||
}
|
||||
}
|
||||
return csub;
|
||||
if ( csub.length > 0 ) {
|
||||
return csub;
|
||||
}
|
||||
return null;
|
||||
} else
|
||||
// if the exact item exists, use it
|
||||
if (data[q]){
|
||||
|
||||
Reference in New Issue
Block a user