cot_redirect(cot_url('page', $page_urlp, '', true, false, true)); } $out['subtitle'] = $L['i18n_editing']; $t = new XTemplate(cot_tplfile('i18n.page', 'plug')); $t->assign(array('I18N_ACTION' => cot_url('plug', "e=i18n&m=page&a=edit&id={$id}&l={$i18n_locale}"), 'I18N_TITLE' => $L['i18n_editing'], 'I18N_ORIGINAL_LANG' => $i18n_locales[$cfg['defaultlang']], 'I18N_LOCALIZED_LANG' => $i18n_locales[$i18n_locale], 'I18N_PAGE_TITLE' => htmlspecialchars($pag['page_title']), 'I18N_PAGE_DESC' => htmlspecialchars($pag['page_desc']), 'I18N_PAGE_TEXT' => cot_parse($pag['page_text'], $cfg['page']['markup']), 'I18N_IPAGE_TITLE' => htmlspecialchars($pag_i18n['ipage_title']), 'I18N_IPAGE_DESC' => htmlspecialchars($pag_i18n['ipage_desc']), 'I18N_IPAGE_TEXT' => cot_textarea('translate_text', $pag_i18n['ipage_text'], 32, 80, '', 'input_textarea_editor'))); cot_display_messages($t); /* === Hook === */ foreach (cot_getextplugins('i18n.page.edit.tags') as $pl) { include $pl; } /* =============*/ } elseif ($a == 'delete' && ($i18n_admin || $usr['id'] == $pag['ipage_translatorid'])) { // Send to trashcan if available if ($cfg['plugin']['trashcan']['trash_page']) { require_once cot_incfile('trashcan', 'plug'); $row = $db->query("SELECT * FROM {$db_i18n_pages}\n\t\t\t\tWHERE ipage_id = {$id} AND ipage_locale = '{$i18n_locale}'")->fetch(); cot_trash_put('i18n_page', $L['i18n_translation'] . " #{$id} ({$i18n_locale}) " . $row['ipage_title'], $id, $row); } $db->delete($db_i18n_pages, "ipage_id = {$id} AND ipage_locale = '{$i18n_locale}'"); /* === Hook === */ foreach (cot_getextplugins('i18n.page.delete.done') as $pl) { include $pl; } /* =============*/ cot_message('Deleted'); $page_urlp = empty($pag['page_alias']) ? 'c=' . $pag['page_cat'] . "id={$id}" : 'c=' . $pag['page_cat'] . 'al=' . $pag['page_alias']; cot_redirect(cot_url('page', $page_urlp, '', true)); } } else { cot_die(true, true); }
<?php /* ==================== [BEGIN_COT_EXT] Hooks=users.edit.update.delete [END_COT_EXT] ==================== */ /** * Trashcan delete page * * @package TrashCan * @copyright (c) Cotonti Team * @license https://github.com/Cotonti/Cotonti/blob/master/License.txt */ defined('COT_CODE') or die('Wrong URL'); require_once cot_incfile('trashcan', 'plug'); if ($cfg['plugin']['trashcan']['trash_user']) { cot_trash_put('user', $L['User'] . " #" . $id . " " . $row['user_name'], $id, $row1); }
<?php /* ==================== [BEGIN_COT_EXT] Hooks=forums.posts.delete.done [END_COT_EXT] ==================== */ /** * Trashcan delete post * * @package TrashCan * @copyright (c) Cotonti Team * @license https://github.com/Cotonti/Cotonti/blob/master/License.txt */ defined('COT_CODE') or die('Wrong URL'); require_once cot_incfile('trashcan', 'plug'); if ($cfg['plugin']['trashcan']['trash_forum']) { cot_trash_put('forumpost', $L['Post'] . " #" . $p . " from topic #" . $q, $p, $row); }
<?php /* ==================== [BEGIN_COT_EXT] Hooks=page.admin.delete.done [END_COT_EXT] ==================== */ /** * Trashcan delete page * * @package TrashCan * @copyright (c) Cotonti Team * @license https://github.com/Cotonti/Cotonti/blob/master/License.txt */ defined('COT_CODE') or die('Wrong URL'); require_once cot_incfile('trashcan', 'plug'); if ($cfg['plugin']['trashcan']['trash_page']) { cot_trash_put('page', $L['Page'] . " #" . $id . " " . $row['page_title'], $id, $row); }
<?php /* ==================== [BEGIN_COT_EXT] Hooks=forums.functions.prunetopics [END_COT_EXT] ==================== */ /** * Trashcan delete post * * @package TrashCan * @copyright (c) Cotonti Team * @license https://github.com/Cotonti/Cotonti/blob/master/License.txt */ defined('COT_CODE') or die('Wrong URL'); if ($cfg['plugin']['trashcan']['trash_forum']) { // We are inside cot_forum_prunetopics() function, so need some globals global $trash_types, $db_trash, $db_x; require_once cot_incfile('trashcan', 'plug'); $sql = $db->query("SELECT * FROM {$db_forum_topics} WHERE ft_id={$q}"); while ($row = $sql->fetch()) { $parenttrashid = cot_trash_put('forumtopic', $L['Topic'] . " #" . $q, $q, $row); cot_trash_put('forumpost', 'Posts topic #' . $q, 0, "fp_topicid={$q}", $parenttrashid); } $sql->closeCursor(); }
<?php /* ==================== [BEGIN_COT_EXT] Hooks=comments.delete [END_COT_EXT] ==================== */ /** * Trashcan delete page * * @package TrashCan * @copyright (c) Cotonti Team * @license https://github.com/Cotonti/Cotonti/blob/master/License.txt */ defined('COT_CODE') or die('Wrong URL'); require_once cot_incfile('trashcan', 'plug'); if ($cfg['plugin']['trashcan']['trash_comment']) { cot_trash_put('comment', $L['Comment'] . " #" . $id . " (" . $row['com_author'] . ")", $id, $row); }