- if (SQL_HASZERONUMS($result)) {
- // Create new entry (to all admins)
- SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_admins_mails` (`admin_id`,`mail_template`) VALUES (0, '%s')",
- array($template), __FUNCTION__, __LINE__);
+ if (ifSqlHasZeroNums($result)) {
+ // Is ext-admins' version at least 0.7.9?
+ if (isExtensionInstalledAndNewer('admins', '0.7.9')) {
+ // Create new entry (to all admins)
+ sqlQueryEscaped("INSERT INTO `{?_MYSQL_PREFIX?}_admins_mails` (`admin_id`, `mail_template`) VALUES (NULL, '%s')",
+ array($template), __FUNCTION__, __LINE__);
+ } // END - if
+
+ // Select all email adresses (default)
+ $result = sqlQuery('SELECT `email` FROM `{?_MYSQL_PREFIX?}_admins` ORDER BY `id` ASC',
+ __FUNCTION__, __LINE__);