aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/functions.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/functions.php')
-rw-r--r--inc/functions.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/inc/functions.php b/inc/functions.php
index ec5b3d6a..205f3968 100644
--- a/inc/functions.php
+++ b/inc/functions.php
@@ -125,6 +125,7 @@ function prepare_url($url)
125 } 125 }
126 } 126 }
127 127
128 $msg->add('e', 'error during url preparation');
128 logm('error during url preparation'); 129 logm('error during url preparation');
129 return FALSE; 130 return FALSE;
130} 131}
@@ -236,7 +237,7 @@ function remove_directory($directory)
236 237
237function display_view($view, $id = 0, $full_head = 'yes') 238function display_view($view, $id = 0, $full_head = 'yes')
238{ 239{
239 global $tpl, $store; 240 global $tpl, $store, $msg;
240 241
241 switch ($view) 242 switch ($view)
242 { 243 {
@@ -300,7 +301,7 @@ function display_view($view, $id = 0, $full_head = 'yes')
300 */ 301 */
301function action_to_do($action, $url, $id = 0) 302function action_to_do($action, $url, $id = 0)
302{ 303{
303 global $store; 304 global $store, $msg;
304 305
305 switch ($action) 306 switch ($action)
306 { 307 {
@@ -315,9 +316,11 @@ function action_to_do($action, $url, $id = 0)
315 if (DOWNLOAD_PICTURES) { 316 if (DOWNLOAD_PICTURES) {
316 $content = filtre_picture($parametres_url['content'], $url, $last_id); 317 $content = filtre_picture($parametres_url['content'], $url, $last_id);
317 } 318 }
319 $msg->add('s', 'the link has been added successfully');
318 } 320 }
319 } 321 }
320 else { 322 else {
323 $msg->add('e', 'the link has been added successfully');
321 logm($url . ' is not a valid url'); 324 logm($url . ' is not a valid url');
322 } 325 }
323 326
@@ -326,14 +329,17 @@ function action_to_do($action, $url, $id = 0)
326 case 'delete': 329 case 'delete':
327 remove_directory(ABS_PATH . $id); 330 remove_directory(ABS_PATH . $id);
328 $store->deleteById($id); 331 $store->deleteById($id);
332 $msg->add('s', 'the link has been deleted successfully');
329 logm('delete link #' . $id); 333 logm('delete link #' . $id);
330 break; 334 break;
331 case 'toggle_fav' : 335 case 'toggle_fav' :
332 $store->favoriteById($id); 336 $store->favoriteById($id);
337 $msg->add('s', 'the favorite toggle has been done successfully');
333 logm('mark as favorite link #' . $id); 338 logm('mark as favorite link #' . $id);
334 break; 339 break;
335 case 'toggle_archive' : 340 case 'toggle_archive' :
336 $store->archiveById($id); 341 $store->archiveById($id);
342 $msg->add('s', 'the archive toggle has been done successfully');
337 logm('archive link #' . $id); 343 logm('archive link #' . $id);
338 break; 344 break;
339 default: 345 default: