function preAction() { xoonips_allow_post_method(); if (!$GLOBALS['xoopsGTicket']->check(true, 'xoonips_transfer_admin_list_item', false)) { die('ticket error'); } global $xoopsUser; $from_uid = $this->_formdata->getValue('post', 'from_uid', 'i', true); $to_uid = $this->_formdata->getValue('post', 'to_uid', 'i', true); $to_index_id = $this->_formdata->getValue('post', 'to_index_id', 'i', true); $transfer_item_ids = array_merge($this->get_item_ids_to_transfer(), $this->get_child_item_ids_to_transfer()); if (!xoonips_transfer_is_transferrable($from_uid, $to_uid, $transfer_item_ids)) { redirect_header(XOOPS_URL . '/modules/xoonips/admin/maintenance.php?' . 'page=item&action=transfer_admin_initialize', 3, _AM_XOONIPS_MAINTENANCE_TRANSFER_ITEM_ERROR); } if (xoonips_transfer_is_private_item_number_exceeds_if_transfer($to_uid, $transfer_item_ids)) { redirect_header(XOOPS_URL . '/modules/xoonips/admin/maintenance.php?' . 'page=item&action=transfer_admin_initialize', 3, _AM_XOONIPS_MAINTENANCE_TRANSFER_ITEM_ERROR_ITEM_NUMBER_EXCEEDS); } if (xoonips_transfer_is_private_item_storage_exceeds_if_transfer($to_uid, $transfer_item_ids)) { redirect_header(XOOPS_URL . '/modules/xoonips/admin/maintenance.php?' . 'page=item&action=transfer_admin_initialize', 3, _AM_XOONIPS_MAINTENANCE_TRANSFER_ITEM_ERROR_ITEM_STORAGE_EXCEEDS); } if (!$this->is_equals_group_ids(xoonips_transfer_get_group_ids_of_items($transfer_item_ids), $this->_formdata->getValueArray('post', 'group_ids_to_subscribe', 'i', false))) { redirect_header(XOOPS_URL . '/modules/xoonips/admin/maintenance.php' . '?page=item', 3, _AM_XOONIPS_MAINTENANCE_TRANSFER_ITEM_ERROR_BAD_SUBSCRIBE_GROUP); } $this->_params[] = $transfer_item_ids; $this->_params[] = $from_uid; $this->_params[] = $to_uid; $this->_params[] = $to_index_id; $this->_params[] = xoonips_transfer_get_group_ids_of_items($transfer_item_ids); }
function preAction() { xoonips_deny_guest_access(); xoonips_allow_post_method(); if (!$GLOBALS['xoopsGTicket']->check(true, 'xoonips_transfer_user_requested_item_confirm', false)) { die('ticket error'); } global $xoopsUser; $item_ids = $this->get_item_ids_to_transfer(); if (empty($item_ids)) { redirect_header(XOOPS_URL . '/', 3, _MD_XOONIPS_TRANSFER_USER_ACCEPT_ERROR_NO_ITEM); } $result = array(); foreach ($this->get_item_ids_to_transfer() as $item_id) { foreach ($this->get_notify_uids($item_id) as $uid) { $result[$uid][$this->get_transferer_uid($item_id)][$this->get_transferee_uid($item_id)][] = $item_id; } } $this->_notify_uid_transferer_transferee_item_ids_map = $result; $this->_uid_item_ids_map = $this->getMapOfUidTOItemId($this->get_item_ids_to_transfer()); $item_ids_to_transfer = $this->get_item_ids_to_transfer(); if ($this->get_limit_check_result($xoopsUser->getVar('uid'), $this->get_item_ids_to_transfer())) { redirect_header(XOOPS_URL . '/modules/xoonips/transfer_item.php' . '?action=list_item', 3, _MD_XOONIPS_TRANSFER_USER_ACCEPT_ERROR_NUMBER_OR_STORAGE_EXCEED); } if (!$this->is_user_in_group_of_items($xoopsUser->getVar('uid'), $this->get_item_ids_to_transfer())) { redirect_header(XOOPS_URL . '/', 3, _MD_XOONIPS_TRANSFER_USER_ACCEPT_ERROR_BAD_SUBSCRIBE_GROUP); } $this->_params[] = $this->get_item_ids_to_transfer(); $this->_params[] = $xoopsUser->getVar('uid'); $this->_params[] = $this->_formdata->getValue('post', 'index_id', 'i', false); }
function preAction() { global $xoopsUser; xoonips_allow_post_method(); xoonips_deny_guest_access(); $page = $this->_formdata->getValue('post', 'page', 'i', false); xoonips_validate_request($page > 0); $resolve_flag = $this->_formdata->getValue('post', 'resolve_conflict_flag', 'i', false); xoonips_validate_request(1 == $resolve_flag || 0 == $resolve_flag); $itemtype_handler =& xoonips_getormhandler('xoonips', 'item_type'); foreach ($itemtype_handler->getObjects() as $itemtype) { if ('xoonips_index' == $itemtype->get('name')) { continue; } $handler =& xoonips_gethandler($itemtype->get('name'), 'import_item'); $handler->create(); } $sess_hander =& xoonips_getormhandler('xoonips', 'session'); $sess =& $sess_hander->get(session_id()); $session = unserialize($sess->get('sess_data')); $this->_collection = unserialize(gzuncompress(base64_decode($session['xoonips_import_items']))); xoonips_validate_request($this->_collection); $this->_collection->setImportAsNewOption(!is_null($this->_formdata->getValue('post', 'import_as_new', 'i', false))); $items =& $this->_collection->getItems(); foreach (array_keys($items) as $key) { if (in_array($items[$key]->getPseudoId(), $this->getUpdatablePseudoId())) { // set update flag of displayed item $items[$key]->setUpdateFlag(in_array($items[$key]->getPseudoId(), $this->getUpdatePseudoId())); } } $this->_params[] = $this->_collection->getItems(); $this->_params[] = $xoopsUser->getVar('uid'); $this->_params[] = $this->_collection->getImportAsNewOption(); }
function preAction() { global $xoopsUser; xoonips_deny_guest_access(); xoonips_allow_post_method(); xoonips_validate_request($this->is_valid_transferee_user($this->_formdata->getValue('post', 'to_uid', 'i', false))); xoonips_validate_request($this->is_readable_all_items($this->get_item_ids_to_transfer(), $xoopsUser->getVar('uid'))); }
function preAction() { global $xoopsUser; xoonips_deny_guest_access(); xoonips_allow_post_method(); $extra_params = xoonips_extra_param_restore(); xoonips_validate_request($this->is_valid_transferee_user(@$extra_params['to_uid'])); xoonips_validate_request($this->is_readable_all_items($this->_formdata->getValueArray('post', 'selected_original', 'i', false), $xoopsUser->getVar('uid'))); }
function preAction() { global $xoopsUser; xoonips_deny_guest_access(); xoonips_allow_post_method(); $filetype = $this->_formdata->getValue('post', 'filetype', 's', false); xoonips_validate_request('localfile' == $filetype || 'remotefile' == $filetype && $xoopsUser && $xoopsUser->isAdmin()); xoonips_validate_request($this->_is_importable_index_id($this->_get_xoonips_checked_index_ids($this->_formdata->getValue('post', 'xoonipsCheckedXID', 's', false)))); }
function preAction() { global $xoopsUser; xoonips_deny_guest_access(); xoonips_allow_post_method(); $extra_params = xoonips_extra_param_restore(); xoonips_validate_request($this->is_valid_transferee_user(@$extra_params['to_uid'])); if (count($this->get_selected()) > 0 || count($this->get_selected_hidden()) > 0) { xoonips_validate_request($this->is_readable_all_items(array_merge($this->get_selected(), $this->get_selected_hidden()), $xoopsUser->getVar('uid'))); } }
function preAction() { xoonips_deny_guest_access(); xoonips_allow_post_method(); if (!$GLOBALS['xoopsGTicket']->check(true, 'xoonips_transfer_user_requested_item_confirm', false)) { die('ticket error'); } $item_ids = $this->get_item_ids_to_transfer(); if (empty($item_ids)) { redirect_header(XOOPS_URL . '/', 3, _MD_XOONIPS_TRANSFER_USER_REJECT_ERROR_NO_ITEM); } $this->_params[] = $this->_formdata->getValueArray('post', 'item_ids_to_transfer', 'i', false); }
function preAction() { xoonips_deny_guest_access(); xoonips_allow_post_method(); if (!$GLOBALS['xoopsGTicket']->check(true, 'xoonips_transfer_user_item_confirm', false)) { die('ticket error'); } global $xoopsUser; $all_of_item_ids_to_transfer = array_unique(array_merge($this->get_item_ids_to_transfer(), $this->get_child_item_ids_to_transfer())); if (!xoonips_transfer_is_transferrable($xoopsUser->getVar('uid'), $this->get_to_uid(), $all_of_item_ids_to_transfer)) { redirect_header(XOOPS_URL . '/modules/xoonips/transfer_item.php', 3, _MD_XOONIPS_TRANSFER_USER_REQUEST_ERROR); } if (!$this->is_user_in_group_of_items($this->get_to_uid(), $all_of_item_ids_to_transfer)) { redirect_header(XOOPS_URL . '/modules/xoonips/transfer_item.php', 3, _MD_XOONIPS_TRANSFER_USER_REQUEST_ERROR_BAD_SUBSCRIBE_GROUP); } $this->_params = array($all_of_item_ids_to_transfer, $xoopsUser->getVar('uid'), $this->get_to_uid()); }
function preAction() { xoonips_deny_guest_access(); xoonips_allow_post_method(); if (!$GLOBALS['xoopsGTicket']->check(true, 'import', false)) { die('ticket error'); } $itemtype_handler =& xoonips_getormhandler('xoonips', 'item_type'); foreach ($itemtype_handler->getObjects() as $itemtype) { if ('xoonips_index' == $itemtype->get('name')) { continue; } $handler =& xoonips_gethandler($itemtype->get('name'), 'import_item'); $handler->create(); } $sess_handler =& xoonips_getormhandler('xoonips', 'session'); $sess =& $sess_handler->get(session_id()); $session = unserialize($sess->get('sess_data')); $this->_collection = unserialize(gzuncompress(base64_decode($session['xoonips_import_items']))); xoonips_validate_request($this->_collection); $this->_make_clone_of_update_item($this->_collection); $this->_begin_time = time(); $this->_params[] =& $this->_collection->getItems(); }
function preAction() { xoonips_allow_post_method(); $repository_id = $this->_formdata->getValue('post', 'repository_id', 'i', true); xoonips_validate_request($this->isValidRepositoryId($repository_id)); $order_by = $this->_formdata->getValue('post', 'order_by', 's', false); xoonips_validate_request(in_array($order_by, array('title', 'identifier', 'last_update_date', 'creation_date', 'date'))); $order_dir = $this->_formdata->getValue('post', 'order_dir', 's', false); xoonips_validate_request(in_array($order_dir, array('asc', 'desc'))); $metadata_per_page = $this->_formdata->getValue('post', 'metadata_per_page', 'i', false); xoonips_validate_request(in_array($metadata_per_page, array(20, 50, 100))); $page = $this->_formdata->getValue('post', 'page', 'i', false); xoonips_validate_request($page > 0); $search_flag = $this->_formdata->getValue('post', 'search_flag', 'i', false); xoonips_validate_request(in_array($search_flag, array(0, 1))); $search_cache_id = $this->_formdata->getValue('post', 'search_cache_id', 'i', false); if (!is_null($search_cache_id)) { xoonips_validate_request($this->searchCacheExists($search_cache_id)); } $keyword = $this->_formdata->getValue('post', 'keyword', 's', false); if (0 == $repository_id && '' == $keyword) { $this->_searchCacheId = 0; $this->_logicName = null; return; } $this->_orderDir = $order_dir; $this->_orderBy = $order_by; $this->_metadataPerPage = $metadata_per_page; $this->_page = $page; $this->_searchCacheId = is_null($search_cache_id) ? '0' : $search_cache_id; $this->_params[] = session_id(); $this->_params[] = $repository_id; $this->_params[] = $keyword; $this->_params[] = $this->_orderBy; $this->_params[] = $this->_orderDir; }
function preAction() { xoonips_allow_post_method(); xoonips_validate_request($this->isValidMetadataId($this->_formdata->getValue('post', 'identifier', 's', false))); }
function preAction() { xoonips_allow_post_method(); }