Version 3.1.4
This commit is contained in:
1 parent
1d4720f3e2
commit
ae5c01cc78
2563 files changed
+283048
-240689
No files matched your search
@@ -1,20 +1,20 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* IP.Board v3.1.4
|
||||
* Posting
|
||||
* Last Updated: $Date: 2009-09-28 18:04:38 -0400 (Mon, 28 Sep 2009) $
|
||||
* Last Updated: $Date: 2010-10-20 09:03:17 -0400 (Wed, 20 Oct 2010) $
|
||||
* </pre>
|
||||
* File Created By: Matt Mecham
|
||||
*
|
||||
* @author $Author: josh $
|
||||
* @author $Author: ips_terabyte $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Forums
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @version $Rev: 5170 $
|
||||
*
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 7003 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
@@ -28,7 +28,6 @@ class public_forums_post_post extends ipsCommand
|
||||
/**
|
||||
* Post Class
|
||||
*
|
||||
* @access protected
|
||||
* @var object Post Class
|
||||
*/
|
||||
protected $_postClass;
|
||||
@@ -36,7 +35,6 @@ class public_forums_post_post extends ipsCommand
|
||||
/**
|
||||
* Post Form Class
|
||||
*
|
||||
* @access protected
|
||||
* @var object Post Class
|
||||
*/
|
||||
protected $_postFormClass;
|
||||
@@ -44,7 +42,6 @@ class public_forums_post_post extends ipsCommand
|
||||
/**
|
||||
* Controller run function
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry
|
||||
* @return void
|
||||
*/
|
||||
@@ -88,10 +85,9 @@ class public_forums_post_post extends ipsCommand
|
||||
//-----------------------------------------
|
||||
|
||||
require_once( IPSLib::getAppDir( 'forums' ) . '/sources/classes/post/classPost.php' );
|
||||
require_once( IPSLib::getAppDir( 'forums' ) . '/sources/classes/post/classPostForms.php' );
|
||||
|
||||
$this->_postClass = new classPostForms( $registry );
|
||||
|
||||
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . '/sources/classes/post/classPostForms.php', 'classPostForms', 'forums' );
|
||||
$this->_postClass = new $classToLoad( $registry );
|
||||
|
||||
//-----------------------------------------
|
||||
// Set up some stuff
|
||||
//-----------------------------------------
|
||||
@@ -175,7 +171,7 @@ class public_forums_post_post extends ipsCommand
|
||||
{
|
||||
if ( $this->memberData['restrict_post'] == 1 )
|
||||
{
|
||||
$this->registry->getClass('output')->showError( 'posting_restricted', 103126 );
|
||||
$this->registry->getClass('output')->showError( 'posting_restricted', 103126, null, null, 403 );
|
||||
}
|
||||
|
||||
$post_arr = IPSMember::processBanEntry( $this->memberData['restrict_post'] );
|
||||
@@ -190,7 +186,7 @@ class public_forums_post_post extends ipsCommand
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->registry->getClass('output')->showError( array( 'posting_off_susp', $this->registry->getClass( 'class_localization')->getDate( $post_arr['date_end'], 'LONG', 1 ) ), 103127 );
|
||||
$this->registry->getClass('output')->showError( array( 'posting_off_susp', $this->registry->getClass( 'class_localization')->getDate( $post_arr['date_end'], 'LONG', 1 ) ), 103127, null, null, 403 );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -206,7 +202,7 @@ class public_forums_post_post extends ipsCommand
|
||||
{
|
||||
if ( time() - $this->memberData['last_post'] < $this->settings['flood_control'] )
|
||||
{
|
||||
$this->registry->getClass('output')->showError( array( 'flood_control', $this->settings['flood_control'] ), 103128 );
|
||||
$this->registry->getClass('output')->showError( array( 'flood_control', $this->settings['flood_control'] ), 103128, null, null, 403 );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -214,7 +210,7 @@ class public_forums_post_post extends ipsCommand
|
||||
}
|
||||
else if ( $this->member->is_not_human == 1 )
|
||||
{
|
||||
$this->registry->getClass('output')->showError( 'posting_restricted', 103129 );
|
||||
$this->registry->getClass('output')->showError( 'posting_restricted', 103129, null, null, 403 );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -229,7 +225,7 @@ class public_forums_post_post extends ipsCommand
|
||||
|
||||
if ( $this->request['auth_key'] != $this->member->form_hash )
|
||||
{
|
||||
$this->registry->getClass('output')->showError( 'posting_bad_auth_key', 20310 );
|
||||
$this->registry->getClass('output')->showError( 'posting_bad_auth_key', 20310, null, null, 403 );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -264,7 +260,6 @@ class public_forums_post_post extends ipsCommand
|
||||
/**
|
||||
* Save the form
|
||||
*
|
||||
* @access public
|
||||
* @param string Type of form to show
|
||||
* @return void
|
||||
*/
|
||||
@@ -296,12 +291,20 @@ class public_forums_post_post extends ipsCommand
|
||||
}
|
||||
else
|
||||
{
|
||||
$permissions['softDelete'] = $this->registry->getClass('class_forums')->canSoftDeletePosts( $topic['forum_id'], $topic );
|
||||
$permissions['softDeleteSee'] = $this->registry->getClass('class_forums')->canSeeSoftDeletedPosts( $topic['forum_id'] );
|
||||
|
||||
$posts = $topic['posts'] + 1;
|
||||
|
||||
if( $this->moderator['post_q'] OR $this->memberData['g_is_supmod'] )
|
||||
{
|
||||
$posts += $topic['topic_queuedposts'];
|
||||
}
|
||||
|
||||
if ( $permissions['softDelete'] AND $permissions['softDeleteSee'] )
|
||||
{
|
||||
$posts += $topic['topic_deleted_posts'];
|
||||
}
|
||||
|
||||
if( ( $posts % $this->settings['display_max_posts'] ) == 0 )
|
||||
{
|
||||
@@ -378,7 +381,6 @@ class public_forums_post_post extends ipsCommand
|
||||
/**
|
||||
* Show the Form
|
||||
*
|
||||
* @access public
|
||||
* @param string Type of form to show
|
||||
* @param string Error message
|
||||
* @return null [ Returns HTML to the output engine for immediate printing ]
|
||||
@@ -398,7 +400,7 @@ class public_forums_post_post extends ipsCommand
|
||||
{
|
||||
$_l = $this->_fetchPpdError();
|
||||
|
||||
$this->registry->output->showError( $_l, 0 );
|
||||
$this->registry->output->showError( $_l, 103153, null, null, 403 );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -421,7 +423,7 @@ class public_forums_post_post extends ipsCommand
|
||||
{
|
||||
$_l = $this->_fetchPpdError();
|
||||
|
||||
$this->registry->output->showError( $_l, 0 );
|
||||
$this->registry->output->showError( $_l, 103153 );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -440,7 +442,7 @@ class public_forums_post_post extends ipsCommand
|
||||
{
|
||||
$_l = $this->_fetchPpdError();
|
||||
|
||||
$this->registry->output->showError( $_l, 0 );
|
||||
$this->registry->output->showError( $_l, 103153 );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -454,9 +456,8 @@ class public_forums_post_post extends ipsCommand
|
||||
/**
|
||||
* Check for double post
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
**/
|
||||
*/
|
||||
public function checkDoublePost()
|
||||
{
|
||||
if( ! $this->_postClass->getIsPreview() )
|
||||
@@ -495,9 +496,9 @@ class public_forums_post_post extends ipsCommand
|
||||
/**
|
||||
* Check for guest's name being in use
|
||||
*
|
||||
* @access private
|
||||
* @return void
|
||||
**/
|
||||
* @deprecated As far as I can see this function is not used anywhere, we should remove it for 3.2
|
||||
*/
|
||||
private function _check_guest_name()
|
||||
{
|
||||
/* is this even used anymore?
|
||||
@@ -545,7 +546,6 @@ class public_forums_post_post extends ipsCommand
|
||||
* Checks to see if this member is forced to have their posts
|
||||
* moderated
|
||||
*
|
||||
* @access private
|
||||
* @param string Type of post (new, reply, edit, poll)
|
||||
* @return boolean Whether to PUBLISH this topic or not
|
||||
*/
|
||||
@@ -616,7 +616,6 @@ class public_forums_post_post extends ipsCommand
|
||||
/**
|
||||
* Fetch post per day error
|
||||
*
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
private function _fetchPpdError()
|
||||
@@ -624,11 +623,11 @@ class public_forums_post_post extends ipsCommand
|
||||
$_g = $this->caches['group_cache'][ $this->memberData['member_group_id'] ];
|
||||
$_l = sprintf( $this->lang->words['NO_POSTING_PPD'], $_g['g_ppd_limit'] );
|
||||
|
||||
if ( $_g['g_ppd_unit'] )
|
||||
if ( $_g['g_ppd_unit'] )
|
||||
{
|
||||
if ( $_g['gbw_ppd_unit_type'] )
|
||||
{
|
||||
$_l .= "<br />" . sprintf( $this->lang->words['NO_PPD_DAYS'], $this->lang->getDate( ( time() + ( 86400 * $_g['g_ppd_unit'] ) ) - $this->memberData['joined'], 'LONG' ) );
|
||||
$_l .= "<br />" . sprintf( $this->lang->words['NO_PPD_DAYS'], $this->lang->getDate( ( $this->memberData['joined'] + ( 86400 * $_g['g_ppd_unit'] ) ) , 'LONG' ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -638,4 +637,4 @@ class public_forums_post_post extends ipsCommand
|
||||
|
||||
return $_l;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user