diff options
author | ArthurHoaro <arthur@hoa.ro> | 2016-11-05 14:13:18 +0100 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2016-11-05 14:30:56 +0100 |
commit | 4df7ef0b3d703ac3380404749e9c0bc801c3e0b8 (patch) | |
tree | bf228fd84a92e03543f898df6a7bb3308333de04 /application | |
parent | 9596cb130d59003deffbd07defbde77dd2bb0368 (diff) | |
download | Shaarli-4df7ef0b3d703ac3380404749e9c0bc801c3e0b8.tar.gz Shaarli-4df7ef0b3d703ac3380404749e9c0bc801c3e0b8.tar.zst Shaarli-4df7ef0b3d703ac3380404749e9c0bc801c3e0b8.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')
-rw-r--r-- | application/Router.php | 6 |
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 | } |