Changeset 2189:eda746478da6 for admin/categories.php
- Timestamp:
- 10/01/13 16:39:40 (12 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/categories.php
r2166 r2189 23 23 $c = $core->blog->getCategory((integer) $cat_id); 24 24 if ($c->isEmpty()) { 25 http::redirect('categories.php?unknown=1'); 26 } 25 dcPage::addErrorNotice(__('This category does not exist.')); 26 http::redirect('categories.php'); 27 } 28 $name = $c->cat_title; 27 29 unset($c); 28 30 … … 30 32 # Delete category 31 33 $core->blog->delCategory($cat_id); 32 http::redirect('categories.php?del=1'); 34 dcPage::addSuccessNotice(sprintf(__('The category "%s" has been successfully deleted.'),html::escapeHTML($name))); 35 http::redirect('categories.php'); 33 36 } catch (Exception $e) { 34 37 $core->error->add($e->getMessage()); … … 50 53 throw new Exception(__('Category where to move posts does not exist')); 51 54 } 55 $name = $c->cat_title; 52 56 unset($c); 53 57 } … … 56 60 $core->blog->changePostsCategory($cat_id,$mov_cat); 57 61 } 58 http::redirect('categories.php?move=1'); 62 dcPage::addSuccessNotice(sprintf(__('The entries have been successfully moved to category "%s"'), 63 html::escapeHTML($name))); 64 http::redirect('categories.php'); 59 65 } catch (Exception $e) { 60 66 $core->error->add($e->getMessage()); … … 81 87 { 82 88 $core->blog->resetCategoriesOrder(); 83 http::redirect('categories.php?reord=1'); 89 dcPage::addSuccessNotice(__('Categories have been successfully reordered.')); 90 http::redirect('categories.php'); 84 91 } 85 92 catch (Exception $e) … … 116 123 if (!empty($_GET['reord'])) { 117 124 dcPage::success(__('Categories have been successfully reordered.')); 118 }119 if (!empty($_GET['unknown'])) {120 dcPage::error(__('This category does not exist.'));121 125 } 122 126 if (!empty($_GET['move'])) {
Note: See TracChangeset
for help on using the changeset viewer.