From 5409ade28c5f0acf99dbadd4d95e6f8efda5d395 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Thu, 14 Apr 2016 14:20:23 +0200 Subject: Update docs from Wiki --- doc/Datastore-hacks.html | 67 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 48 insertions(+), 19 deletions(-) (limited to 'doc/Datastore-hacks.html') diff --git a/doc/Datastore-hacks.html b/doc/Datastore-hacks.html index 0bf2a493..6273fae0 100644 --- a/doc/Datastore-hacks.html +++ b/doc/Datastore-hacks.html @@ -4,31 +4,49 @@ - Shaarli - Datastore hacks + Shaarli – Datastore hacks - +
@@ -39,18 +57,26 @@ code > span.er { color: #ff0000; font-weight: bold; }
  • Download
  • Server requirements
  • Server configuration
  • +
  • Server security
  • +
  • Shaarli installation
  • Shaarli configuration
  • +
  • Plugin installation & configuration
  • +
  • Docker
  • +
  • Plugin list
  • Usage
  • How To
  • @@ -62,6 +88,7 @@ code > span.er { color: #ff0000; font-weight: bold; }
  • Directory structure
  • 3rd party libraries
  • Plugin System
  • +
  • Release Shaarli
  • Security
  • Static analysis
  • Theming
  • @@ -78,17 +105,19 @@ code > span.er { color: #ff0000; font-weight: bold; }

    Datastore hacks

    Decode datastore content

    To display the array representing the data saved in data/datastore.php, use the following snippet:

    -
    $data = "tZNdb9MwFIb... <Commented content inside datastore.php>";
    +
    $data = "tZNdb9MwFIb... <Commented content inside datastore.php>";
     $out = unserialize(gzinflate(base64_decode($data)));
     echo "<pre>"; // Pretty printing is love, pretty printing is life
     print_r($out);
     echo "</pre>";
    -exit;
    +exit;

    This will output the internal representation of the datastore, "unobfuscated" (if this can really be considered obfuscation).

    +

    Alternatively, you can transform to JSON format (and pretty-print if you have jq installed):

    +
    php -r 'print(json_encode(unserialize(gzinflate(base64_decode(preg_replace("!.*/\* (.+) \*/.*!", "$1", file_get_contents("data/datastore.php")))))));' | jq .
    -- cgit v1.2.3 From 08dcd8ea58c07cd8258567ca14260aa18ba2660f Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Sat, 14 May 2016 11:37:28 +0200 Subject: Doc update Signed-off-by: ArthurHoaro --- doc/Datastore-hacks.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'doc/Datastore-hacks.html') diff --git a/doc/Datastore-hacks.html b/doc/Datastore-hacks.html index 6273fae0..88639402 100644 --- a/doc/Datastore-hacks.html +++ b/doc/Datastore-hacks.html @@ -60,10 +60,9 @@ code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Inf
  • Server security
  • Shaarli installation
  • Shaarli configuration
  • -
  • Plugin installation & configuration
  • +
  • Plugins
  • Docker
  • -
  • Plugin list
  • Usage