Fix issue with archive handler if no add_status method.
This commit is contained in:
parent
3183ef59b3
commit
c0e87ae2ae
@ -35,9 +35,11 @@ class ArchiveFileHandler extends Extension {
|
|||||||
exec($cmd);
|
exec($cmd);
|
||||||
$results = add_dir($tmpdir);
|
$results = add_dir($tmpdir);
|
||||||
if(count($results) > 0) {
|
if(count($results) > 0) {
|
||||||
// FIXME no theme?
|
// Not all themes have the add_status() method, so need to check before calling.
|
||||||
|
if (method_exists($this->theme, "add_status")) {
|
||||||
$this->theme->add_status("Adding files", $results);
|
$this->theme->add_status("Adding files", $results);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
deltree($tmpdir);
|
deltree($tmpdir);
|
||||||
$event->image_id = -2; // default -1 = upload wasn't handled
|
$event->image_id = -2; // default -1 = upload wasn't handled
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user