aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/Router.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2016-11-05 14:13:18 +0100
committerArthurHoaro <arthur@hoa.ro>2016-12-16 12:42:13 +0100
commitf4ebd5fed20b29c4fb580983b4be7bd0a52151b9 (patch)
treec102ff1526c467b1869ed72bbd68c6f39997f529 /application/Router.php
parente3ffc8fdee30be41046b985fe6e7034fb580b0c8 (diff)
downloadShaarli-f4ebd5fed20b29c4fb580983b4be7bd0a52151b9.tar.gz
Shaarli-f4ebd5fed20b29c4fb580983b4be7bd0a52151b9.tar.zst
Shaarli-f4ebd5fed20b29c4fb580983b4be7bd0a52151b9.zip
Bugfixes on link deletion, and use a GET form
Use a GET form to delete links: harmonize with edit_link and preparation for #585 Bug fixes: * LinkDB element can't be passed as reference, fix error: PHP Notice: Indirect modification of overloaded element of LinkDB has no effect * Resource cache folder setting wasn't set correctly
Diffstat (limited to 'application/Router.php')
-rw-r--r--application/Router.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/application/Router.php b/application/Router.php
index caed4a28..c9a51912 100644
--- a/application/Router.php
+++ b/application/Router.php
@@ -31,6 +31,8 @@ class Router
31 31
32 public static $PAGE_EDITLINK = 'edit_link'; 32 public static $PAGE_EDITLINK = 'edit_link';
33 33
34 public static $PAGE_DELETELINK = 'delete_link';
35
34 public static $PAGE_EXPORT = 'export'; 36 public static $PAGE_EXPORT = 'export';
35 37
36 public static $PAGE_IMPORT = 'import'; 38 public static $PAGE_IMPORT = 'import';
@@ -120,6 +122,10 @@ class Router
120 return self::$PAGE_EDITLINK; 122 return self::$PAGE_EDITLINK;
121 } 123 }
122 124
125 if (isset($get['delete_link'])) {
126 return self::$PAGE_DELETELINK;
127 }
128
123 if (startsWith($query, 'do='. self::$PAGE_EXPORT)) { 129 if (startsWith($query, 'do='. self::$PAGE_EXPORT)) {
124 return self::$PAGE_EXPORT; 130 return self::$PAGE_EXPORT;
125 } 131 }