[Customisation Database Commits] r1085 - in /trunk/titania: contributions/faq.php includes/objects/post.php includes/tools/message.php includes/tools/posting.php
Nathan Guse
exreaction at phpbb.com
Sun Apr 18 21:08:21 BST 2010
Author: exreaction
Date: Sun Apr 18 21:08:21 2010
New Revision: 1085
Log:
Fixing a few issues
Modified:
trunk/titania/contributions/faq.php
trunk/titania/includes/objects/post.php
trunk/titania/includes/tools/message.php
trunk/titania/includes/tools/posting.php
Modified: trunk/titania/contributions/faq.php
==============================================================================
*** trunk/titania/contributions/faq.php (original)
--- trunk/titania/contributions/faq.php Sun Apr 18 21:08:21 2010
***************
*** 18,25 ****
titania::add_lang('faq');
! $faq_id = request_var('f', 0);
! $action = request_var('action', '');
// Setup faq object
$faq = new titania_faq($faq_id);
--- 18,26 ----
titania::add_lang('faq');
! $faq_id = request_var('f', 0);
! $action = request_var('action', '');
! $error = array();
// Setup faq object
$faq = new titania_faq($faq_id);
***************
*** 58,66 ****
'smilies' => phpbb::$auth->acl_get('u_titania_smilies'),
'attachments' => true,
));
- $message->set_settings(array(
- 'attachments_group' => TITANIA_FAQ,
- ));
// Submit check...handles running $faq->post_data() if required
$submit = $message->submit_check();
--- 59,64 ----
Modified: trunk/titania/includes/objects/post.php
==============================================================================
*** trunk/titania/includes/objects/post.php (original)
--- trunk/titania/includes/objects/post.php Sun Apr 18 21:08:21 2010
***************
*** 151,156 ****
--- 151,157 ----
else
{
$this->topic = new titania_topic;
+ $this->topic->topic_type = $this->post_type;
}
// Hooks
Modified: trunk/titania/includes/tools/message.php
==============================================================================
*** trunk/titania/includes/tools/message.php (original)
--- trunk/titania/includes/tools/message.php Sun Apr 18 21:08:21 2010
***************
*** 76,82 ****
'display_subject' => true, // Display the subject field or not
'display_edit_reason' => false, // Display the edit reason field or not
'display_captcha' => false, // Display the captcha or not
- 'attachments_group' => false, // The attachment extensions group to allow
'attachment_tpl' => 'posting/attachments/default.html', // Attachments template to use for output
'subject_default_override' => false, // Force over-ride the subject with one you specify, false to use the one gotten from the post object
--- 76,81 ----
***************
*** 448,460 ****
}
$for_edit = $this->post_object->generate_text_for_edit();
! if ($this->auth['attachments'] && isset($for_edit['object_type']) && $this->settings['attachments_group'])
{
$this->posting_panels['attach-panel'] = 'ATTACH';
$this->attachments = new titania_attachment($for_edit['object_type'], $for_edit['object_id']);
$this->attachments->load_attachments();
! $this->attachments->upload($this->settings['attachments_group']);
$this->error = array_merge($this->error, $this->attachments->error);
$this->attachments->error = array(); // Empty the error array to prevent showing duplicates
}
--- 447,459 ----
}
$for_edit = $this->post_object->generate_text_for_edit();
! if ($this->auth['attachments'] && isset($for_edit['object_type']))
{
$this->posting_panels['attach-panel'] = 'ATTACH';
$this->attachments = new titania_attachment($for_edit['object_type'], $for_edit['object_id']);
$this->attachments->load_attachments();
! $this->attachments->upload();
$this->error = array_merge($this->error, $this->attachments->error);
$this->attachments->error = array(); // Empty the error array to prevent showing duplicates
}
Modified: trunk/titania/includes/tools/posting.php
==============================================================================
*** trunk/titania/includes/tools/posting.php (original)
--- trunk/titania/includes/tools/posting.php Sun Apr 18 21:08:21 2010
***************
*** 133,139 ****
));
$message_object->set_settings(array(
'display_captcha' => (!phpbb::$user->data['is_registered']) ? true : false,
- 'attachments_group' => $post_object->topic->topic_type,
));
// Call our common posting handler
--- 133,138 ----
***************
*** 195,201 ****
$message_object->set_settings(array(
'display_captcha' => (!phpbb::$user->data['is_registered']) ? true : false,
'subject_default_override' => 'Re: ' . $post_object->topic->topic_subject,
- 'attachments_group' => $post_object->topic->topic_type,
));
// Call our common posting handler
--- 194,199 ----
***************
*** 259,267 ****
'lock_topic' => (phpbb::$auth->acl_get('u_titania_mod_post_mod') || (phpbb::$auth->acl_get('u_titania_post_mod_own') && $post_object->topic->topic_first_post_user_id == phpbb::$user->data['user_id'])) ? true : false,
'attachments' => phpbb::$auth->acl_get('u_titania_post_attach'),
));
- $message_object->set_settings(array(
- 'attachments_group' => $post_object->topic->topic_type,
- ));
// Call our common posting handler
$this->common_post('edit', $post_object, $message_object);
--- 257,262 ----
More information about the customisationdb-commits
mailing list