]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Merge pull request #3909 from wallabag/fix/html-not-defined
authorJérémy Benoist <j0k3r@users.noreply.github.com>
Mon, 18 Mar 2019 08:26:33 +0000 (09:26 +0100)
committerGitHub <noreply@github.com>
Mon, 18 Mar 2019 08:26:33 +0000 (09:26 +0100)
Fix PHP warning

scripts/dev.sh
scripts/install.sh
scripts/update.sh
src/Wallabag/CoreBundle/Helper/EntriesExport.php

index 0703ced1ef9111ef4c08d055db471fb43f50fad3..28453be0d63cadeefbdd0e086e68b7c55bfe810b 100755 (executable)
@@ -3,10 +3,14 @@
 # eg: `sh dev.sh`
 
 COMPOSER_COMMAND='composer'
+REQUIRE_FILE='scripts/require.sh'
 
-DIR="${BASH_SOURCE}"
-if [ ! -d "$DIR" ]; then DIR="$PWD/scripts"; fi
-. "$DIR/require.sh"
+if [ ! -f "$REQUIRE_FILE" ]; then
+  echo "Cannot find $REQUIRE_FILE"
+  exit 1
+fi
+
+. "$REQUIRE_FILE"
 
 $COMPOSER_COMMAND install
 php bin/console wallabag:install
index de1fb8f650b57bf21a1baa67f990ff3f3ae6d6dc..affa715ffb5f802b310cd0878f15ec0be872a662 100755 (executable)
@@ -25,10 +25,14 @@ if [ "$IGNORE_ROOT" -eq 0 ] && [ "$EUID" == "0" ]; then
 fi
 
 COMPOSER_COMMAND='composer'
+REQUIRE_FILE='scripts/require.sh'
 
-DIR="${BASH_SOURCE}"
-if [ ! -d "$DIR" ]; then DIR="$PWD/scripts"; fi
-. "$DIR/require.sh"
+if [ ! -f "$REQUIRE_FILE" ]; then
+  echo "Cannot find $REQUIRE_FILE"
+  exit 1
+fi
+
+. "$REQUIRE_FILE"
 
 TAG=$(git describe --tags $(git rev-list --tags --max-count=1))
 
index e86a76db4729cd722cc26051a6e3a84e69b5f7a1..3ef1043920d3157f76b21f312037047320a91147 100755 (executable)
@@ -28,10 +28,14 @@ set -e
 set -u
 
 COMPOSER_COMMAND='composer'
+REQUIRE_FILE='scripts/require.sh'
 
-DIR="${BASH_SOURCE}"
-if [ ! -d "$DIR" ]; then DIR="$PWD/scripts"; fi
-. "$DIR/require.sh"
+if [ ! -f "$REQUIRE_FILE" ]; then
+  echo "Cannot find $REQUIRE_FILE"
+  exit 1
+fi
+
+. "$REQUIRE_FILE"
 
 rm -rf var/cache/*
 git fetch origin
index a2aa4d134e4aebe60abcbfce631d1cadc40c18cf..f981ee50e61b8a323ae091f97f1139b82896de17 100644 (file)
@@ -188,7 +188,7 @@ class EntriesExport
             foreach ($entry->getTags() as $tag) {
                 $book->setSubject($tag->getLabel());
             }
-            $filename = sha1($entry->getTitle());
+            $filename = sha1(sprintf('%s:%s', $entry->getUrl(), $entry->getTitle()));
 
             $publishedBy = $entry->getPublishedBy();
             $authors = $this->translator->trans('export.unknown');