add check for missing 'changes' in conf.php, add warnings

This commit is contained in:
Uwe Steinmann 2025-11-21 11:55:27 +01:00
parent 7dfd511a1d
commit e7e2fde718

View File

@ -85,6 +85,12 @@ class ExtensionMgr {
*/
protected $errmsgs;
/**
* @var string[] $warnmsg list of warning message from last operation
* @access protected
*/
protected $warnmsgs;
/*
* Name of json file containg available extension from repository
*/
@ -431,6 +437,7 @@ $EXT_CONF = '.var_export($EXT_CONF, true).';');
}
$this->errmsgs = array();
$this->warnmsgs = array();
if(!isset($extconf['constraints']['depends']['seeddms'])) {
$this->errmsgs[] = "Missing dependency on SeedDMS";
@ -447,6 +454,9 @@ $EXT_CONF = '.var_export($EXT_CONF, true).';');
if(!isset($extconf['author'])) {
$this->errmsgs[] = "Missing author";
}
if(!isset($extconf['changes'])) {
$this->warnmsgs[] = "Missing changes";
}
if(!isset($options['noconstraints']) || $options['noconstraints'] == false) {
if(isset($extconf['constraints']['depends'])) {
@ -749,4 +759,13 @@ $EXT_CONF = '.var_export($EXT_CONF, true).';');
public function getErrorMsgs() { /* {{{ */
return $this->errmsgs;
} /* }}} */
/**
* Return all warning messages
*
* @return string[]
*/
public function getWarningMsgs() { /* {{{ */
return $this->warnmsgs;
} /* }}} */
}