Example #1
0
 /**
  * Create queue item
  *
  * @param bool $allow_repack		Whether author has allowed repacking.
  * @param string $test_account	Test account details.
  * @return null
  */
 protected function create_queue_item($allow_repack, $test_account)
 {
     // Create the queue
     $this->revision->update_queue();
     $this->queue = $this->revision->get_queue();
     // Load the message object
     $this->get_message();
     $this->queue->queue_allow_repack = $allow_repack;
     if ($test_account) {
         $this->queue->queue_notes .= "\n\n[b]" . $this->user->lang('TEST_ACCOUNT') . "[/b]\n" . $test_account;
     }
     $this->queue->submit();
 }
Example #2
0
            phpbb::$template->assign_var('S_PASSED_TRANSLATION_VALIDATION', true);
            break;
        case 5:
            $revision = new titania_revision(titania::$contrib, $revision_id);
            if (!$revision->load()) {
                trigger_error('NO_REVISION');
            }
            // Repack if that's what we want
            if ($repack) {
                $revision->repack($old_revision);
            }
            // Update the revision to be submitted, which unhides the queue topic and updates the contrib_last_update time
            $revision->revision_submitted = true;
            $revision->submit();
            // Update the queue (make visible)
            $revision->update_queue();
            if ($repack && titania::$config->use_queue && titania_types::$types[titania::$contrib->contrib_type]->use_queue) {
                redirect(titania_url::build_url('manage/queue', array('q' => $revision->revision_queue_id)));
            }
            // Subscriptions
            $queue = $revision->get_queue();
            if ($queue) {
                $email_vars = array('NAME' => phpbb::$user->lang['VALIDATION'] . ' - ' . titania::$contrib->contrib_name . ' - ' . $revision->revision_version, 'U_VIEW' => titania_url::build_url('manage/queue', array('q' => $queue->queue_id)));
                titania_subscriptions::send_notifications(TITANIA_QUEUE, titania::$contrib->contrib_type, 'subscribe_notify_forum.txt', $email_vars, phpbb::$user->data['user_id']);
            }
            redirect(titania::$contrib->get_url());
            break;
    }
} while ($try_again);
phpbb::$template->assign_vars(array('ERROR_MSG' => sizeof($error) ? implode('<br />', $error) : '', 'NEXT_STEP' => $next_step, 'REVISION_ID' => $revision_id, 'AGREEMENT_NOTICE' => titania_types::$types[titania::$contrib->contrib_type]->upload_agreement ? isset(phpbb::$user->lang[titania_types::$types[titania::$contrib->contrib_type]->upload_agreement]) ? nl2br(phpbb::$user->lang[titania_types::$types[titania::$contrib->contrib_type]->upload_agreement]) : nl2br(titania_types::$types[titania::$contrib->contrib_type]->upload_agreement) : false, 'QUEUE_ALLOW_REPACK' => true, 'S_POST_ACTION' => $repack ? titania_url::append_url(titania::$contrib->get_url('revision'), array('repack' => $repack)) : titania::$contrib->get_url('revision')));
// Output the available license options