aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2021-05-15 21:33:43 +0200
committerGravatar GitHub <noreply@github.com> 2021-05-15 21:33:43 +0200
commit97ba6261a8eb7f94963ecc91043e5a2d54ffd248 (patch)
treeb58419a63e8ce687d5132a038bd7cbde5e1fa8d1 /lib
parentffb0e30dde98bcef1b3fa0bfb020c3a478c6a402 (diff)
git update auto change to edge branch (#3589)
* git update auto change to edge branch For existing installations using automatic git update, checkout *edge* branch if it was still using *master* or *dev*. * One more prune * Fix several small issues * theirs does not work here * Use migration mechanism * Better handling of Migration errors * Test details * Fix tests * Do not use new migration system for now
Diffstat (limited to 'lib')
-rw-r--r--lib/Minz/Migrator.php2
-rw-r--r--lib/lib_rss.php20
2 files changed, 16 insertions, 6 deletions
diff --git a/lib/Minz/Migrator.php b/lib/Minz/Migrator.php
index f6e9f8298..eac1bac5b 100644
--- a/lib/Minz/Migrator.php
+++ b/lib/Minz/Migrator.php
@@ -103,7 +103,7 @@ class Minz_Migrator
if (!$migrator->upToDate()) {
// still not up to date? It means last migration failed.
- return 'A migration failed to be applied, please see previous logs';
+ return trim('A migration failed to be applied, please see previous logs.' . "\n" . implode("\n", $results));
}
return true;
diff --git a/lib/lib_rss.php b/lib/lib_rss.php
index 3cacc8390..602576256 100644
--- a/lib/lib_rss.php
+++ b/lib/lib_rss.php
@@ -548,15 +548,25 @@ function getNonStandardShortcuts($shortcuts) {
}
function errorMessage($errorTitle, $error = '') {
- // Prevent empty <h2> tags by checking if error isn't empty first
- if ('' !== $error) {
+ $errorTitle = htmlspecialchars($errorTitle, ENT_NOQUOTES, 'UTF-8');
+
+ $message = '';
+ $details = '';
+ // Prevent empty tags by checking if error isn not empty first
+ if ($error) {
$error = htmlspecialchars($error, ENT_NOQUOTES, 'UTF-8');
- $error = "<h2>{$error}</h2>";
+
+ // First line is the main message, other lines are the details
+ list($message, $details) = explode("\n", $error, 2);
+
+ $message = "<h2>{$message}</h2>";
+ $details = "<pre>{$details}</pre>";
}
- $errorTitle = htmlspecialchars($errorTitle, ENT_NOQUOTES, 'UTF-8');
+
return <<<MSG
<h1>{$errorTitle}</h1>
- {$error}
+ {$message}
+ {$details}
<h2>Check the logs</h2>
<p>FreshRSS logs are located in <code>./FreshRSS/data/users/*/log*.txt</code></p>
<p><em>N.B.:</em> A typical problem is wrong file permissions in the <code>./FreshRSS/data/</code> folder