[Customisation Database Commits] r626 - in /trunk/titania: includes/core/titania.php includes/objects/queue.php language/en/manage.php manage/queue.php styles/default/template/common/confirm_body.html
Nathan Guse
exreaction at phpbb.com
Sat Feb 20 20:13:12 GMT 2010
Author: exreaction
Date: Sat Feb 20 20:13:12 2010
New Revision: 626
Log:
Moving queue_status works
Modified:
trunk/titania/includes/core/titania.php
trunk/titania/includes/objects/queue.php
trunk/titania/language/en/manage.php
trunk/titania/manage/queue.php
trunk/titania/styles/default/template/common/confirm_body.html
Modified: trunk/titania/includes/core/titania.php
==============================================================================
*** trunk/titania/includes/core/titania.php (original)
--- trunk/titania/includes/core/titania.php Sat Feb 20 20:13:12 2010
***************
*** 483,489 ****
* @param string $post Hidden POST variables
* @param string $html_body Template used for confirm box
*/
! public static function confirm_box($check, $title = '', $u_action = '', $post = array(), $html_body = 'confirm_body.html')
{
$hidden = build_hidden_fields($post);
--- 483,489 ----
* @param string $post Hidden POST variables
* @param string $html_body Template used for confirm box
*/
! public static function confirm_box($check, $title = '', $u_action = '', $post = array(), $html_body = 'common/confirm_body.html')
{
$hidden = build_hidden_fields($post);
***************
*** 552,559 ****
}
else
{
! $u_action = reapply_sid(PHPBB_ROOT_PATH . str_replace('&', '&', phpbb::$user->page['page']));
! $u_action .= ((strpos($u_action, '?') === false) ? '?' : '&') . 'confirm_key=' . $confirm_key;
}
phpbb::$template->assign_vars(array(
--- 552,558 ----
}
else
{
! $u_action = titania_url::$current_page_url;
}
phpbb::$template->assign_vars(array(
Modified: trunk/titania/includes/objects/queue.php
==============================================================================
*** trunk/titania/includes/objects/queue.php (original)
--- trunk/titania/includes/objects/queue.php Sat Feb 20 20:13:12 2010
***************
*** 76,82 ****
));
}
! public function submit()
{
if (!$this->queue_id)
{
--- 76,82 ----
));
}
! public function submit($update_first_post = true)
{
if (!$this->queue_id)
{
***************
*** 102,108 ****
titania::add_lang('manage');
$this->update_first_queue_post(phpbb::$user->lang['VALIDATION'] . ' - ' . $row['contrib_name'] . ' - ' . $row['revision_version'], $contrib);
}
! else
{
$this->update_first_queue_post();
}
--- 102,108 ----
titania::add_lang('manage');
$this->update_first_queue_post(phpbb::$user->lang['VALIDATION'] . ' - ' . $row['contrib_name'] . ' - ' . $row['revision_version'], $contrib);
}
! else if ($update_first_post)
{
$this->update_first_queue_post();
}
Modified: trunk/titania/language/en/manage.php
==============================================================================
*** trunk/titania/language/en/manage.php (original)
--- trunk/titania/language/en/manage.php Sat Feb 20 20:13:12 2010
***************
*** 54,57 ****
--- 54,59 ----
'APPROVE' => 'Approve',
'DENY' => 'Deny',
'ALTER_NOTES' => 'Alter Validation Notes',
+ 'MOVE_QUEUE' => 'Move Queue',
+ 'MOVE_QUEUE_CONFIRM' => 'Select the new queue location and confirm.',
));
Modified: trunk/titania/manage/queue.php
==============================================================================
*** trunk/titania/manage/queue.php (original)
--- trunk/titania/manage/queue.php Sat Feb 20 20:13:12 2010
***************
*** 87,97 ****
phpbb::$user->add_lang('viewforum');
$action = request_var('action', '');
switch ($action)
{
case 'approve' :
! $queue = get_queue_object($queue_id, true);
if (!titania_types::$types[$contrib->contrib_type]->acl_get('validate'))
{
titania::needs_auth();
--- 87,98 ----
phpbb::$user->add_lang('viewforum');
$action = request_var('action', '');
+ $submit = (isset($_POST['submit'])) ? true : false;
switch ($action)
{
case 'approve' :
! $queue = queue_overlord::get_queue_object($queue_id, true);
if (!titania_types::$types[$contrib->contrib_type]->acl_get('validate'))
{
titania::needs_auth();
***************
*** 99,105 ****
break;
case 'deny' :
! $queue = get_queue_object($queue_id, true);
if (!titania_types::$types[$contrib->contrib_type]->acl_get('validate'))
{
titania::needs_auth();
--- 100,106 ----
break;
case 'deny' :
! $queue = queue_overlord::get_queue_object($queue_id, true);
if (!titania_types::$types[$contrib->contrib_type]->acl_get('validate'))
{
titania::needs_auth();
***************
*** 107,117 ****
break;
case 'notes' :
! $queue = get_queue_object($queue_id, true);
break;
case 'move' :
! $queue = get_queue_object($queue_id, true);
break;
}
--- 108,144 ----
break;
case 'notes' :
! $queue = queue_overlord::get_queue_object($queue_id, true);
break;
case 'move' :
! $queue = queue_overlord::get_queue_object($queue_id, true);
!
! $tags = titania::$cache->get_tags(TITANIA_QUEUE);
!
! if (titania::confirm_box(true))
! {
! $new_tag = request_var('move_to', 0);
! if (!isset($tags[$new_tag]))
! {
! trigger_error('NO_TAG');
! }
!
! $queue->queue_status = $new_tag;
! $queue->submit(false);
! }
! else
! {
! $extra = '<select name="move_to">';
! foreach ($tags as $tag_id => $row)
! {
! $extra .= '<option value="' . $tag_id . '">' . ((isset(phpbb::$user->lang[$row['tag_field_name']])) ? phpbb::$user->lang[$row['tag_field_name']] : $row['tag_field_name']) . '</option>';
! }
! $extra .= '</select>';
! phpbb::$template->assign_var('CONFIRM_EXTRA', $extra);
!
! titania::confirm_box(false, 'MOVE_QUEUE');
! }
break;
}
Modified: trunk/titania/styles/default/template/common/confirm_body.html
==============================================================================
*** trunk/titania/styles/default/template/common/confirm_body.html (original)
--- trunk/titania/styles/default/template/common/confirm_body.html Sat Feb 20 20:13:12 2010
***************
*** 1,20 ****
! <!-- INCLUDE common/overall_header.html -->
!
! <form id="confirm" action="{S_CONFIRM_ACTION}" method="post">
! <div class="panel">
! <div class="inner"><span class="corners-top"><span></span></span>
!
! <h2>{MESSAGE_TITLE}</h2>
! <p>{MESSAGE_TEXT}</p>
!
! <fieldset class="submit-buttons">
! {S_HIDDEN_FIELDS}
! <input type="submit" name="confirm" value="{L_YES}" class="button2" />
! <input type="submit" name="cancel" value="{L_NO}" class="button2" />
! </fieldset>
!
! <span class="corners-bottom"><span></span></span></div>
! </div>
! </form>
!
! <!-- INCLUDE common/overall_footer.html -->
--- 1,22 ----
! <!-- INCLUDE common/overall_header.html -->
!
! <form id="confirm" action="{S_CONFIRM_ACTION}" method="post">
! <div class="panel">
! <div class="inner"><span class="corners-top"><span></span></span>
!
! <h2>{MESSAGE_TITLE}</h2>
! <p>{MESSAGE_TEXT}</p>
!
! <!-- IF CONFIRM_EXTRA --><p>{CONFIRM_EXTRA}</p><!-- ENDIF -->
!
! <fieldset class="submit-buttons">
! {S_HIDDEN_FIELDS}
! <input type="submit" name="confirm" value="{L_YES}" class="button2" />
! <input type="submit" name="cancel" value="{L_NO}" class="button2" />
! </fieldset>
!
! <span class="corners-bottom"><span></span></span></div>
! </div>
! </form>
!
! <!-- INCLUDE common/overall_footer.html -->
More information about the customisationdb-commits
mailing list