| 152 | | // we remove the dissociated images if we are currently displaying the |
| 153 | | // category to dissociate from. |
| 154 | | // |
| 155 | | // TODO we can display the photo of a given album without the $_GET['cat'] |
| 156 | | if (is_numeric($_GET['cat']) and $_POST['dissociate'] == $_GET['cat']) |
| 157 | | { |
| 158 | | $page['cat_elements_id'] = array_diff( |
| 159 | | $page['cat_elements_id'], |
| 160 | | $dissociables |
| 161 | | ); |
| 162 | | } |
| 163 | | } |
| 164 | | |
| 165 | | update_category($_POST['dissociate']); |
| | 160 | update_category($_POST['dissociate']); |
| | 161 | |
| | 162 | $_SESSION['page_infos'] = array( |
| | 163 | l10n('Information data registered in database') |
| | 164 | ); |
| | 165 | |
| | 166 | // let's refresh the page because we the current set might be modified |
| | 167 | $redirect_url = get_root_url().'admin.php?page='.$_GET['page']; |
| | 168 | redirect($redirect_url); |
| | 169 | } |