class_extension : verify that the file does exist
This commit is contained in:
parent
5c26cd14ba
commit
44a4fdf589
1 changed files with 3 additions and 1 deletions
|
|
@ -74,7 +74,9 @@ class Extension
|
|||
// Verify that the elt we want to add is correct
|
||||
if (trim($this->ex_code)=="") throw new Exception('Le code ne peut pas être vide');
|
||||
if (trim($this->ex_name)=="") throw new Exception('Le nom ne peut pas être vide');
|
||||
|
||||
if (trim($this->ex_file)=="") throw new Exception('Chemin incorrect');
|
||||
if (file_exists('..'.DIRECTORY_SEPARATOR.'include'.DIRECTORY_SEPARATOR.'ext'.DIRECTORY_SEPARATOR.$this->ex_file) == false)
|
||||
throw new Exception ('Extension non trouvée, le chemin est-il correct?');
|
||||
}
|
||||
/*!\brief call insert for a new plugin or update if the plugin exist */
|
||||
public function save() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue