if (isset($Params['BrowseSelected']) && $Params['BrowseSelected'] == 'article') { if ($http->hasPostVariable('SelectedObjectIDArray')) { $articlePoolNodeID = $http->postVariable('SelectedObjectIDArray'); if (isset($articlePoolNodeID) && !$http->hasPostVariable('BrowseCancelButton')) { $newsletterType->setAttribute('article_pool_object_id', $articlePoolNodeID[0]); $newsletterType->store(); } } } else { if (isset($Params['BrowseSelected']) && $Params['BrowseSelected'] == 'inbox') { if ($http->hasPostVariable('SelectedObjectIDArray')) { $inboxNodeID = $http->postVariable('SelectedObjectIDArray'); if (isset($inboxNodeID) && !$http->hasPostVariable('BrowseCancelButton')) { $newsletterType->setAttribute('inbox_id', $inboxNodeID[0]); $newsletterType->store(); } } } } $tpl = eZNewsletterTemplateWrapper::templateInit(); $tpl->setVariable('warning', $warning); $tpl->setVariable('newsletter_type', $newsletterType); $tpl->setVariable('contentclass_list', eZNewsletterType::unserializeArray($newsletterType->attribute('contentclass_list'))); $tpl->setVariable('selected_designs', eZNewsletterType::unserializeArray($newsletterType->attribute('allowed_designs'))); // countAll(eZSendNewsletterItem::definition()) ) ) erzeugt einen sql fehler $tpl->setVariable('subscription_list_array', eZSubscriptionList::fetchList(0, eZSubscriptionList::countAll(eZSubscriptionList::StatusPublished))); $Result = array(); $Result['newsletter_menu'] = 'design:parts/content/newsletter_menu.tpl'; $Result['left_menu'] = 'design:parts/content/eznewsletter_menu.tpl'; $Result['content'] = $tpl->fetch("design:{$extension}/edit_newslettertype.tpl"); $Result['path'] = array(array('url' => false, 'text' => ezpI18n::tr('eznewsletter/edit_newslettertype', 'Edit newsletter type')));
/*! \file view_newslettertype.php */ $extension = 'eznewsletter'; $base = eZExtension::baseDirectory(); $baseDir = "{$base}/{$extension}/classes/"; $http = eZHTTPTool::instance(); $newsletterTypeID = $Params['NewsletterTypeID']; $Module = $Params['Module']; $newsletterType = eZNewsletterType::fetch($newsletterTypeID); if (!$newsletterType) { return $Module->handleError(eZError::KERNEL_NOT_AVAILABLE, 'kernel'); } $userParameters = $Params['UserParameters']; $offset = isset($userParameters['offset']) ? $userParameters['offset'] : 0; $limitKey = isset($userParameters['limit']) ? $userParameters['limit'] : '1'; $limitList = array('1' => 10, '2' => 25, '3' => 50); $limit = $limitList[(string) $limitKey]; $viewParameters = array('offset' => $offset); $tpl = eZNewsletterTemplateWrapper::templateInit(); $tpl->setVariable('limit', $limit); $tpl->setVariable('limitKey', $limitKey); $tpl->setVariable('offset', $offset); $tpl->setVariable('view_parameters', $viewParameters); $tpl->setVariable('newsletter_type', $newsletterType); //unserialize the contentclass_list, which is stored as imploded arrays $tpl->setVariable('contentclass_list', eZNewsletterType::unserializeArray($newsletterType->attribute('contentclass_list'))); $Result = array(); $Result['newsletter_menu'] = 'design:parts/content/newsletter_menu.tpl'; $Result['left_menu'] = 'design:parts/content/eznewsletter_menu.tpl'; $Result['content'] = $tpl->fetch("design:{$extension}/list_inprogress.tpl"); $Result['path'] = array(array('url' => false, 'text' => ezpI18n::tr('eznewsletter/list_inprogress', 'View newsletter type')));