Call the configured download webhook when new downloads are created
or existing downloads are updated. This feature is sponsored by Scilab.
This commit is contained in:
@@ -96,7 +96,7 @@ class IDF_Form_UpdateUpload extends Pluf_Form
|
||||
$this->cleaned_data['label'.$i] = trim($this->cleaned_data['label'.$i]);
|
||||
if (strpos($this->cleaned_data['label'.$i], ':') !== false) {
|
||||
list($class, $name) = explode(':', $this->cleaned_data['label'.$i], 2);
|
||||
list($class, $name) = array(mb_strtolower(trim($class)),
|
||||
list($class, $name) = array(mb_strtolower(trim($class)),
|
||||
trim($name));
|
||||
} else {
|
||||
$class = 'other';
|
||||
@@ -146,6 +146,9 @@ class IDF_Form_UpdateUpload extends Pluf_Form
|
||||
$this->upload->modif_dtime = gmdate('Y-m-d H:i:s');
|
||||
$this->upload->update();
|
||||
$this->upload->batchAssoc('IDF_Tag', $tags);
|
||||
|
||||
// Send the notification
|
||||
$this->upload->notify($this->project->getConf(), false);
|
||||
/**
|
||||
* [signal]
|
||||
*
|
||||
@@ -166,7 +169,7 @@ class IDF_Form_UpdateUpload extends Pluf_Form
|
||||
*
|
||||
*/
|
||||
$params = array('upload' => $this->upload);
|
||||
Pluf_Signal::send('IDF_Upload::update',
|
||||
Pluf_Signal::send('IDF_Upload::update',
|
||||
'IDF_Form_UpdateUpload', $params);
|
||||
return $this->upload;
|
||||
}
|
||||
|
Reference in New Issue
Block a user