Bladeren bron

use an array for warnings in admin panel

tags/3.5.1
Tobias Diekershoff 4 jaren geleden
bovenliggende
commit
b03009d962
2 gewijzigde bestanden met toevoegingen van 5 en 3 verwijderingen
  1. +2
    -2
      mod/admin.php
  2. +3
    -1
      view/templates/admin_summary.tpl

+ 2
- 2
mod/admin.php Bestand weergeven

@@ -431,10 +431,10 @@ function admin_page_summary(&$a) {
// are there MyISAM tables in the DB? If so, trigger a warning message
$r = q("SELECT `engine` FROM `information_schema`.`tables` WHERE `engine`='myisam' LIMIT 1");
$showwarning = false;
$warningtext = "";
$warningtext = array();
if (dbm::is_result($r)) {
$showwarning = true;
$warningtext = sprintf(t('Your DB still runs with MyISAM tables. You should change the engine type to InnoDB. As Friendica will use InnoDB only features in the future, you should change this! See <a href="%s">here</a> for a guide that may be helpful converting the table engines. You may also use the <tt>convert_innodb.sql</tt> in the <tt>/util</tt> directory of your Friendica installation.<br />'), 'https://dev.mysql.com/doc/refman/5.7/en/converting-tables-to-innodb.html');
$warningtext[] = sprintf(t('Your DB still runs with MyISAM tables. You should change the engine type to InnoDB. As Friendica will use InnoDB only features in the future, you should change this! See <a href="%s">here</a> for a guide that may be helpful converting the table engines. You may also use the <tt>convert_innodb.sql</tt> in the <tt>/util</tt> directory of your Friendica installation.<br />'), 'https://dev.mysql.com/doc/refman/5.7/en/converting-tables-to-innodb.html');
}
$r = q("SELECT `page-flags`, COUNT(`uid`) AS `count` FROM `user` GROUP BY `page-flags`");
$accounts = array(


+ 3
- 1
view/templates/admin_summary.tpl Bestand weergeven

@@ -3,7 +3,9 @@
<h1>{{$title}} - {{$page}}</h1>
{{if $showwarning}}
<div id="admin-warning-message-wrapper">
<p id="admin-warning-message" class="warning-message">{{$warningtext}}</p>
{{foreach $warningtext as $wt}}
<p class="warning-message">{{$wt}}</p>
{{/foreach}}
</div>
{{/if}}



Laden…
Annuleren
Opslaan