Version 3.3.4
This commit is contained in:
1 parent
78706903a2
commit
fb6b5baabc
2206 files changed
+409828
-382984
No files matched your search
@@ -3,11 +3,11 @@
|
||||
* @file group_form.php Core group editing form
|
||||
*~TERABYTE_DOC_READY~
|
||||
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
||||
* $License: This is NULLED!
|
||||
* $License: http://www.invisionpower.com/company/standards.php#license$
|
||||
* $Author: bfarber $
|
||||
* @since -
|
||||
* $LastChangedDate: 2011-07-20 20:19:22 -0400 (Wed, 20 Jul 2011) $
|
||||
* @version v3.2.3
|
||||
* @version v3.3.4
|
||||
* $Revision: 9296 $
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,95 +1,95 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.2.3
|
||||
* Member property updater (AJAX)
|
||||
* Last Updated: $Date: 2010-12-17 07:40:13 -0500 (Fri, 17 Dec 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: ips_terabyte $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Core
|
||||
* @link http://hatynka.in
|
||||
* @since 1st march 2002
|
||||
* @version $Revision: 7442 $
|
||||
*
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class admin_member_form__core implements admin_member_form
|
||||
{
|
||||
/**
|
||||
* Tab name
|
||||
* This can be left blank and the application title will
|
||||
* be used
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $tab_name = "";
|
||||
|
||||
|
||||
/**
|
||||
* Returns sidebar links for this tab
|
||||
* You may return an empty array or FALSE to not have
|
||||
* any links show in the sidebar for this block.
|
||||
*
|
||||
* The links must have 'section=xxxxx&module=xxxxx[&do=xxxxxx]'. The rest of the URL
|
||||
* is added automatically.
|
||||
*
|
||||
* The image must be a full URL or blank to use a default image.
|
||||
*
|
||||
* Use the format:
|
||||
* $array[] = array( 'img' => '', 'url' => '', 'title' => '' );
|
||||
*
|
||||
* @author Matt Mecham
|
||||
* @param array Member data
|
||||
* @return array Array of links
|
||||
*/
|
||||
public function getSidebarLinks( $member=array() )
|
||||
{
|
||||
$array = array();
|
||||
|
||||
if( $member['failed_login_count'] )
|
||||
{
|
||||
$array[] = array( 'img' => '',
|
||||
'url' => "app=members&module=members&section=tools&do=do_locked&auth_key=".ipsRegistry::member()->form_hash."&mid_{$member['member_id']}=1&type=unlock",
|
||||
'title' => ipsRegistry::getClass('class_localization')->words['reset_failed_logins'] );
|
||||
}
|
||||
|
||||
return $array;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns content for the page.
|
||||
*
|
||||
* @author Matt Mecham
|
||||
* @param array Member data
|
||||
* @return array Array of tabs, content
|
||||
*/
|
||||
public function getDisplayContent( $member=array(), $tabsUsed=5 )
|
||||
{
|
||||
return array( 'tabs' => '', 'content' => '', 'tabsUsed' => 0 );
|
||||
}
|
||||
|
||||
/**
|
||||
* Process the entries for saving and return
|
||||
*
|
||||
* @author Brandon Farber
|
||||
* @return array Multi-dimensional array (core, extendedProfile) for saving
|
||||
*/
|
||||
public function getForSave()
|
||||
{
|
||||
return array( 'core' => array(), 'extendedProfile' => array() );
|
||||
}
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* Member property updater (AJAX)
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @subpackage Core
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 1st march 2002
|
||||
* @version $Revision: 10914 $
|
||||
*
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class admin_member_form__core implements admin_member_form
|
||||
{
|
||||
/**
|
||||
* Tab name
|
||||
* This can be left blank and the application title will
|
||||
* be used
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $tab_name = "";
|
||||
|
||||
|
||||
/**
|
||||
* Returns sidebar links for this tab
|
||||
* You may return an empty array or FALSE to not have
|
||||
* any links show in the sidebar for this block.
|
||||
*
|
||||
* The links must have 'section=xxxxx&module=xxxxx[&do=xxxxxx]'. The rest of the URL
|
||||
* is added automatically.
|
||||
*
|
||||
* The image must be a full URL or blank to use a default image.
|
||||
*
|
||||
* Use the format:
|
||||
* $array[] = array( 'img' => '', 'url' => '', 'title' => '' );
|
||||
*
|
||||
* @author Matt Mecham
|
||||
* @param array Member data
|
||||
* @return array Array of links
|
||||
*/
|
||||
public function getSidebarLinks( $member=array() )
|
||||
{
|
||||
$array = array();
|
||||
|
||||
if( $member['failed_login_count'] )
|
||||
{
|
||||
$array[] = array( 'img' => '',
|
||||
'url' => "app=members&module=members&section=tools&do=do_locked&auth_key=".ipsRegistry::member()->form_hash."&mid_{$member['member_id']}=1&type=unlock",
|
||||
'title' => ipsRegistry::getClass('class_localization')->words['reset_failed_logins'] );
|
||||
}
|
||||
|
||||
return $array;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns content for the page.
|
||||
*
|
||||
* @author Matt Mecham
|
||||
* @param array Member data
|
||||
* @return array Array of tabs, content
|
||||
*/
|
||||
public function getDisplayContent( $member=array(), $tabsUsed=5 )
|
||||
{
|
||||
return array( 'tabs' => '', 'content' => '', 'tabsUsed' => 0 );
|
||||
}
|
||||
|
||||
/**
|
||||
* Process the entries for saving and return
|
||||
*
|
||||
* @author Brandon Farber
|
||||
* @return array Multi-dimensional array (core, extendedProfile) for saving
|
||||
*/
|
||||
public function getForSave()
|
||||
{
|
||||
return array( 'core' => array(), 'extendedProfile' => array() );
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,340 +1,319 @@
|
||||
<?php
|
||||
/**
|
||||
* Report center comments class
|
||||
*
|
||||
* @author $author$
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license This is NULLED!
|
||||
* @package IP.Downloads
|
||||
* @link http://hatynka.in
|
||||
* @version $Rev: 9229 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class comments_core_reports extends classes_comments_renderer
|
||||
{
|
||||
/**
|
||||
* Internal remap array
|
||||
*
|
||||
* @param array
|
||||
*/
|
||||
protected $_remap = array( 'comment_id' => 'id',
|
||||
'comment_author_id' => 'comment_by',
|
||||
'comment_author_name' => 'author_name',
|
||||
'comment_text' => 'comment',
|
||||
'comment_ip_address' => 'ip_address',
|
||||
'comment_edit_date' => 'edit_date',
|
||||
'comment_date' => 'comment_date',
|
||||
'comment_approved' => 'approved',
|
||||
'comment_parent_id' => 'rid' );
|
||||
|
||||
/**
|
||||
* Internal parent remap array
|
||||
*
|
||||
* @param array
|
||||
*/
|
||||
protected $_parentRemap = array( 'parent_id' => 'id',
|
||||
'parent_owner_id' => 'updated_by',
|
||||
'parent_parent_id' => 'uid',
|
||||
'parent_title' => 'title',
|
||||
'parent_seo_title' => 'seoname',
|
||||
'parent_date' => 'date_created' );
|
||||
|
||||
/**
|
||||
* Parent SEO template
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function seoTemplate()
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Who am I?
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function whoAmI()
|
||||
{
|
||||
return 'core-reports';
|
||||
}
|
||||
|
||||
/**
|
||||
* Comment table
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function table()
|
||||
{
|
||||
return 'rc_comments';
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable reputation?
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function reputationEnabled()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch parent
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function fetchParent( $id )
|
||||
{
|
||||
static $cachedReports = array();
|
||||
|
||||
if( !isset($cachedReports[ $id ]) )
|
||||
{
|
||||
$cachedReports[ $id ] = $this->DB->buildAndFetch( array(
|
||||
'select' => 'i.*',
|
||||
'from' => array( 'rc_reports_index' => 'i' ),
|
||||
'where' => "i.id=" . intval($id),
|
||||
'add_join' => array(
|
||||
array(
|
||||
'select' => 'c.*',
|
||||
'from' => array( 'rc_classes' => 'c' ),
|
||||
'where' => 'c.com_id=i.rc_class',
|
||||
'type' => 'left',
|
||||
)
|
||||
)
|
||||
) );
|
||||
}
|
||||
|
||||
return $cachedReports[ $id ];
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch settings
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function settings()
|
||||
{
|
||||
return array( 'urls-showParent' => "app=core&module=reports&do=show_report&rid=%s",
|
||||
'urls-report' => '' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Number of items per page
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function perPage()
|
||||
{
|
||||
return 100;
|
||||
}
|
||||
|
||||
/**
|
||||
* Pre save
|
||||
* Accepts an array of GENERIC data and allows manipulation before it's added to DB
|
||||
*
|
||||
* @param string Type of save (edit/add)
|
||||
* @param array Array of GENERIC data (comment_xxxx)
|
||||
* @param int Comment id (if available)
|
||||
* @param int Parent id
|
||||
* @return array Array of GENERIC data
|
||||
*/
|
||||
public function preSave( $type, array $array, $commentId=0, $parentId=0 )
|
||||
{
|
||||
return $array;
|
||||
}
|
||||
|
||||
/**
|
||||
* Post save
|
||||
* Accepts an array of GENERIC data and allows manipulation after it's added to DB
|
||||
*
|
||||
* @param string Type of action (edit/add)
|
||||
* @param array Array of GENERIC data (comment_xxxx)
|
||||
* @param int Comment id (if available)
|
||||
* @param int Parent id
|
||||
* @return array Array of GENERIC data
|
||||
*/
|
||||
public function postSave( $type, array $array, $commentId=0, $parentId=0 )
|
||||
{
|
||||
$_cnt = $this->DB->buildAndFetch( array( 'select' => 'count(*) as total', 'from' => 'rc_comments', 'where' => 'rid=' . $parentId ) );
|
||||
$this->DB->update( 'rc_reports_index', array( 'num_comments' => $_cnt['total'], 'date_updated' => time(), 'updated_by' => $array['comment_author_id'] ), "id=" . $parentId );
|
||||
|
||||
//$this->DB->setDataType( 'num_comments', 'int' );
|
||||
//$this->DB->update( 'rc_reports_index', array( 'num_comments' => 'plus:1', 'date_updated' => time(), 'updated_by' => $array['comment_author_id'] ), "id=" . $parentId );
|
||||
|
||||
//-----------------------------------------
|
||||
// Notify other moderators
|
||||
//-----------------------------------------
|
||||
|
||||
$report = $this->fetchParent( $parentId );
|
||||
|
||||
$this->registry->class_localization->loadLanguageFile( array( 'public_reports' ) );
|
||||
|
||||
$this->DB->loadCacheFile( IPSLib::getAppDir('core') . '/sql/' . ips_DBRegistry::getDriverType() . '_report_queries.php', 'report_sql_queries' );
|
||||
|
||||
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir('core') .'/sources/classes/reportLibrary.php', 'reportLibrary' );
|
||||
$this->registry->setClass( 'reportLibrary', new $classToLoad( $this->registry ) );
|
||||
|
||||
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir('core') . '/sources/classes/reportNotifications.php', 'reportNotifications' );
|
||||
$notify = new $classToLoad( $this->registry );
|
||||
|
||||
$this->registry->getClass('reportLibrary')->loadPlugin( $report['my_class'], $report['app'] );
|
||||
|
||||
if( is_object($this->registry->getClass('reportLibrary')->plugins[ $report['my_class'] ]) )
|
||||
{
|
||||
if( $report['extra_data'] && $report['extra_data'] != 'N;' )
|
||||
{
|
||||
$this->registry->getClass('reportLibrary')->plugins[ $report['my_class'] ]->_extra = unserialize( $report['extra_data'] );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->registry->getClass('reportLibrary')->plugins[ $report['my_class'] ]->_extra = array();
|
||||
}
|
||||
|
||||
$report_data = $this->registry->getClass('reportLibrary')->plugins[ $report['my_class'] ]->formatReportData( $report );
|
||||
|
||||
$notify->initNotify( $this->registry->getClass('reportLibrary')->plugins[ $report['my_class'] ]->getNotificationList( IPSText::cleanPermString( $report['mod_group_perm'] ), $report_data ), $report_data );
|
||||
$notify->sendReplyNotifications( $array['comment_text'] );
|
||||
}
|
||||
|
||||
return $array;
|
||||
}
|
||||
|
||||
/**
|
||||
* Post delete. Can do stuff and that
|
||||
*
|
||||
* @param array Array of comment IDs to be deleted
|
||||
* @param int Parent ID
|
||||
* @return void
|
||||
*/
|
||||
public function postDelete( $commentIds, $parentId )
|
||||
{
|
||||
/* Determine most recent comment or report... */
|
||||
$_comment = $this->DB->buildAndFetch( array( 'select' => 'comment_by, comment_date', 'from' => 'rc_comments', 'where' => 'approved=1 AND rid=' . $parentId, 'order' => 'comment_date DESC', 'limit' => array( 1 ) ) );
|
||||
$_report = $this->DB->buildAndFetch( array( 'select' => 'report_by, date_reported', 'from' => 'rc_reports', 'where' => 'rid=' . $parentId, 'order' => 'date_reported DESC', 'limit' => array( 1 ) ) );
|
||||
|
||||
$_date_updated = 0;
|
||||
$_updated_by = 0;
|
||||
|
||||
if( $_comment['comment_date'] )
|
||||
{
|
||||
$_date_updated = $_comment['comment_date'];
|
||||
$_updated_by = $_comment['comment_by'];
|
||||
}
|
||||
|
||||
if( $_report['date_reported'] > $_date_updated )
|
||||
{
|
||||
$_date_updated = $_report['date_reported'];
|
||||
$_updated_by = $_report['report_by'];
|
||||
}
|
||||
|
||||
$_cnt = $this->DB->buildAndFetch( array( 'select' => 'count(*) as total', 'from' => 'rc_comments', 'where' => 'rid=' . $parentId ) );
|
||||
$this->DB->update( 'rc_reports_index', array( 'num_comments' => $_cnt['total'], 'date_updated' => $_date_updated, 'updated_by' => $_updated_by ), "id=" . $parentId );
|
||||
|
||||
//$this->DB->setDataType( 'num_comments', 'int' );
|
||||
//$this->DB->update( 'rc_reports_index', array( 'num_comments' => 'minus:' . count($commentIds) ), "id=" . $parentId );
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggles visibility
|
||||
*
|
||||
* @param string on/off
|
||||
* @param array Array of comment IDs to be deleted
|
||||
* @param int Parent ID
|
||||
* @return void
|
||||
*/
|
||||
public function postVisibility( $toggle, $commentIds, $parentId )
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch a total count of comments we can see
|
||||
*
|
||||
* @param mixed parent Id or parent array
|
||||
* @return int
|
||||
*/
|
||||
public function count( $parent )
|
||||
{
|
||||
/* Get parent */
|
||||
if ( is_numeric( $parent ) )
|
||||
{
|
||||
$parent = $this->fetchParent( $parent );
|
||||
}
|
||||
|
||||
return intval($parent['num_comments']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform a permission check
|
||||
*
|
||||
* @param string Type of check (add/edit/delete/editall/deleteall/approve all)
|
||||
* @param array Array of GENERIC data
|
||||
* @return true or string to be used in exception
|
||||
*/
|
||||
public function can( $type, array $array )
|
||||
{
|
||||
/* Init */
|
||||
$comment = array();
|
||||
|
||||
/* Got data? */
|
||||
if ( empty( $array['comment_parent_id'] ) )
|
||||
{
|
||||
trigger_error( "No parent ID passed to " . __FILE__, E_USER_WARNING );
|
||||
}
|
||||
|
||||
/* Get the file */
|
||||
$event = $this->fetchParent( $array['comment_parent_id'] );
|
||||
|
||||
/* Fetch comment */
|
||||
if ( $array['comment_id'] )
|
||||
{
|
||||
$comment = $this->fetchById( $array['comment_id'] );
|
||||
}
|
||||
|
||||
/* Check permissions */
|
||||
switch( $type )
|
||||
{
|
||||
case 'view':
|
||||
return true;
|
||||
break;
|
||||
|
||||
case 'edit':
|
||||
if( $this->memberData['g_is_supmod'] OR $this->memberData['member_id'] != $comment['comment_mid'] )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return 'NO_PERMISSION';
|
||||
break;
|
||||
|
||||
case 'add':
|
||||
return true;
|
||||
break;
|
||||
|
||||
case 'delete':
|
||||
return $this->memberData['g_is_supmod'] ? true : 'NO_PERMISSION';
|
||||
break;
|
||||
|
||||
case 'visibility':
|
||||
case 'moderate':
|
||||
return 'NO_PERMISSION';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns remap keys (generic => local)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function remapKeys( $type='comment' )
|
||||
{
|
||||
return ( $type == 'comment' ) ? $this->_remap : $this->_parentRemap;
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* Report center comments class
|
||||
*
|
||||
* @author $author$
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Downloads
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 10914 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class comments_core_reports extends classes_comments_renderer
|
||||
{
|
||||
/**
|
||||
* Internal remap array
|
||||
*
|
||||
* @param array
|
||||
*/
|
||||
protected $_remap = array( 'comment_id' => 'id',
|
||||
'comment_author_id' => 'comment_by',
|
||||
'comment_author_name' => 'author_name',
|
||||
'comment_text' => 'comment',
|
||||
'comment_ip_address' => 'ip_address',
|
||||
'comment_edit_date' => 'edit_date',
|
||||
'comment_date' => 'comment_date',
|
||||
'comment_approved' => 'approved',
|
||||
'comment_parent_id' => 'rid' );
|
||||
|
||||
/**
|
||||
* Internal parent remap array
|
||||
*
|
||||
* @param array
|
||||
*/
|
||||
protected $_parentRemap = array( 'parent_id' => 'id',
|
||||
'parent_owner_id' => 'updated_by',
|
||||
'parent_parent_id' => 'uid',
|
||||
'parent_title' => 'title',
|
||||
'parent_seo_title' => 'seoname',
|
||||
'parent_date' => 'date_created' );
|
||||
|
||||
/**
|
||||
* Who am I?
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function whoAmI()
|
||||
{
|
||||
return 'core-reports';
|
||||
}
|
||||
|
||||
/**
|
||||
* Comment table
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function table()
|
||||
{
|
||||
return 'rc_comments';
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable reputation?
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function reputationEnabled()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch parent
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function fetchParent( $id )
|
||||
{
|
||||
static $cachedReports = array();
|
||||
|
||||
if( !isset($cachedReports[ $id ]) )
|
||||
{
|
||||
$cachedReports[ $id ] = $this->DB->buildAndFetch( array(
|
||||
'select' => 'i.*',
|
||||
'from' => array( 'rc_reports_index' => 'i' ),
|
||||
'where' => "i.id=" . intval($id),
|
||||
'add_join' => array(
|
||||
array(
|
||||
'select' => 'c.*',
|
||||
'from' => array( 'rc_classes' => 'c' ),
|
||||
'where' => 'c.com_id=i.rc_class',
|
||||
'type' => 'left',
|
||||
)
|
||||
)
|
||||
) );
|
||||
}
|
||||
|
||||
return $cachedReports[ $id ];
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch settings
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function settings()
|
||||
{
|
||||
return array( 'urls-showParent' => "app=core&module=reports&do=show_report&rid=%s",
|
||||
'urls-report' => '' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Number of items per page
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function perPage()
|
||||
{
|
||||
return 100;
|
||||
}
|
||||
|
||||
/**
|
||||
* Pre save
|
||||
* Accepts an array of GENERIC data and allows manipulation before it's added to DB
|
||||
*
|
||||
* @param string $type Type of save (edit/add)
|
||||
* @param array $array Array of GENERIC data (comment_xxxx)
|
||||
* @param integer $commentId Comment ID (only for edits)
|
||||
* @param integer $parentId Parent content ID
|
||||
* @return @e array Array of GENERIC data
|
||||
*/
|
||||
public function preSave( $type, array $array, $commentId=0, $parentId=0 )
|
||||
{
|
||||
/**
|
||||
* Always approve comments in report center
|
||||
*
|
||||
* @link http://community.invisionpower.com/tracker/issue-36632-report-comments-cant-be-approved/
|
||||
*/
|
||||
$array['comment_approved'] = 1;
|
||||
|
||||
return $array;
|
||||
}
|
||||
|
||||
/**
|
||||
* Post save
|
||||
* Accepts an array of GENERIC data and allows manipulation after it's added to DB
|
||||
*
|
||||
* @param string Type of action (edit/add)
|
||||
* @param array Array of GENERIC data (comment_xxxx)
|
||||
* @param int Comment id (if available)
|
||||
* @param int Parent id
|
||||
* @return array Array of GENERIC data
|
||||
*/
|
||||
public function postSave( $type, array $array, $commentId=0, $parentId=0 )
|
||||
{
|
||||
$_cnt = $this->DB->buildAndFetch( array( 'select' => 'count(*) as total', 'from' => 'rc_comments', 'where' => 'rid=' . $parentId ) );
|
||||
$this->DB->update( 'rc_reports_index', array( 'num_comments' => intval($_cnt['total']), 'date_updated' => IPS_UNIX_TIME_NOW, 'updated_by' => $array['comment_author_id'] ), "id=" . $parentId );
|
||||
|
||||
//-----------------------------------------
|
||||
// Notify other moderators
|
||||
//-----------------------------------------
|
||||
|
||||
$report = $this->fetchParent( $parentId );
|
||||
|
||||
$this->registry->class_localization->loadLanguageFile( array( 'public_reports' ) );
|
||||
|
||||
$this->DB->loadCacheFile( IPSLib::getAppDir('core') . '/sql/' . ips_DBRegistry::getDriverType() . '_report_queries.php', 'report_sql_queries' );
|
||||
|
||||
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir('core') .'/sources/classes/reportLibrary.php', 'reportLibrary' );
|
||||
$this->registry->setClass( 'reportLibrary', new $classToLoad( $this->registry ) );
|
||||
|
||||
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir('core') . '/sources/classes/reportNotifications.php', 'reportNotifications' );
|
||||
$notify = new $classToLoad( $this->registry );
|
||||
|
||||
$this->registry->getClass('reportLibrary')->loadPlugin( $report['my_class'], $report['app'] );
|
||||
|
||||
if( is_object($this->registry->getClass('reportLibrary')->plugins[ $report['my_class'] ]) )
|
||||
{
|
||||
if( $report['extra_data'] && $report['extra_data'] != 'N;' )
|
||||
{
|
||||
$this->registry->getClass('reportLibrary')->plugins[ $report['my_class'] ]->_extra = unserialize( $report['extra_data'] );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->registry->getClass('reportLibrary')->plugins[ $report['my_class'] ]->_extra = array();
|
||||
}
|
||||
|
||||
$report_data = $this->registry->getClass('reportLibrary')->plugins[ $report['my_class'] ]->formatReportData( $report );
|
||||
|
||||
$notify->initNotify( $this->registry->getClass('reportLibrary')->plugins[ $report['my_class'] ]->getNotificationList( IPSText::cleanPermString( $report['mod_group_perm'] ), $report_data ), $report_data );
|
||||
$notify->sendReplyNotifications( $array['comment_text'] );
|
||||
}
|
||||
|
||||
return $array;
|
||||
}
|
||||
|
||||
/**
|
||||
* Post delete. Can do stuff and that
|
||||
*
|
||||
* @param array Array of comment IDs to be deleted
|
||||
* @param int Parent ID
|
||||
* @return void
|
||||
*/
|
||||
public function postDelete( $commentIds, $parentId )
|
||||
{
|
||||
/* Determine most recent comment or report... */
|
||||
$_comment = $this->DB->buildAndFetch( array( 'select' => 'comment_by, comment_date', 'from' => 'rc_comments', 'where' => 'approved=1 AND rid=' . $parentId, 'order' => 'comment_date DESC', 'limit' => array( 1 ) ) );
|
||||
$_report = $this->DB->buildAndFetch( array( 'select' => 'report_by, date_reported', 'from' => 'rc_reports', 'where' => 'rid=' . $parentId, 'order' => 'date_reported DESC', 'limit' => array( 1 ) ) );
|
||||
|
||||
$_date_updated = 0;
|
||||
$_updated_by = 0;
|
||||
|
||||
if( $_comment['comment_date'] )
|
||||
{
|
||||
$_date_updated = $_comment['comment_date'];
|
||||
$_updated_by = $_comment['comment_by'];
|
||||
}
|
||||
|
||||
if( $_report['date_reported'] > $_date_updated )
|
||||
{
|
||||
$_date_updated = $_report['date_reported'];
|
||||
$_updated_by = $_report['report_by'];
|
||||
}
|
||||
|
||||
$_cnt = $this->DB->buildAndFetch( array( 'select' => 'count(*) as total', 'from' => 'rc_comments', 'where' => 'rid=' . $parentId ) );
|
||||
$this->DB->update( 'rc_reports_index', array( 'num_comments' => intval($_cnt['total']), 'date_updated' => $_date_updated, 'updated_by' => $_updated_by ), "id=" . $parentId );
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch a total count of comments we can see
|
||||
*
|
||||
* @param mixed parent Id or parent array
|
||||
* @return int
|
||||
*/
|
||||
public function count( $parent )
|
||||
{
|
||||
/* Get parent */
|
||||
if ( is_numeric( $parent ) )
|
||||
{
|
||||
$parent = $this->fetchParent( $parent );
|
||||
}
|
||||
|
||||
return intval($parent['num_comments']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform a permission check
|
||||
*
|
||||
* @param string Type of check (add/edit/delete/editall/deleteall/approve all)
|
||||
* @param array Array of GENERIC data
|
||||
* @return true or string to be used in exception
|
||||
*/
|
||||
public function can( $type, array $array )
|
||||
{
|
||||
/* Init */
|
||||
$comment = array();
|
||||
|
||||
/* Got data? */
|
||||
if ( empty( $array['comment_parent_id'] ) )
|
||||
{
|
||||
trigger_error( "No parent ID passed to " . __FILE__, E_USER_WARNING );
|
||||
}
|
||||
|
||||
/* Get the file */
|
||||
$event = $this->fetchParent( $array['comment_parent_id'] );
|
||||
|
||||
/* Fetch comment */
|
||||
if ( $array['comment_id'] )
|
||||
{
|
||||
$comment = $this->fetchById( $array['comment_id'] );
|
||||
}
|
||||
|
||||
/* Check permissions */
|
||||
switch( $type )
|
||||
{
|
||||
case 'view':
|
||||
return true;
|
||||
break;
|
||||
|
||||
case 'edit':
|
||||
if( $this->memberData['g_is_supmod'] OR $this->memberData['member_id'] != $comment['comment_mid'] )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return 'NO_PERMISSION';
|
||||
break;
|
||||
|
||||
case 'add':
|
||||
return true;
|
||||
break;
|
||||
|
||||
case 'delete':
|
||||
return $this->memberData['g_is_supmod'] ? true : 'NO_PERMISSION';
|
||||
break;
|
||||
|
||||
case 'visibility':
|
||||
case 'moderate':
|
||||
return 'NO_PERMISSION';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns remap keys (generic => local)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function remapKeys( $type='comment' )
|
||||
{
|
||||
return ( $type == 'comment' ) ? $this->_remap : $this->_parentRemap;
|
||||
}
|
||||
}
|
||||
@@ -1,207 +1,207 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.2.3
|
||||
* Core Sessions
|
||||
* Last Updated: $Date: 2011-09-15 17:04:35 -0400 (Thu, 15 Sep 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Core
|
||||
* @link http://hatynka.in
|
||||
* @since 20th February 2002
|
||||
* @version $Rev: 9495 $
|
||||
*
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
||||
exit();
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.2.3
|
||||
* Item Marking
|
||||
* Last Updated: $Date: 2011-09-15 17:04:35 -0400 (Thu, 15 Sep 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license This is NULLED!
|
||||
* @package IP.Downloads
|
||||
* @link http://hatynka.in
|
||||
* @version $Rev: 9495 $
|
||||
*
|
||||
*/
|
||||
|
||||
class itemMarking__core
|
||||
{
|
||||
/**#@+
|
||||
* Registry Object Shortcuts
|
||||
*
|
||||
* @var object
|
||||
*/
|
||||
protected $registry;
|
||||
protected $DB;
|
||||
protected $settings;
|
||||
protected $request;
|
||||
protected $lang;
|
||||
protected $member;
|
||||
protected $memberData;
|
||||
protected $cache;
|
||||
protected $caches;
|
||||
/**#@-*/
|
||||
|
||||
/**
|
||||
* I'm a constructor, twisted constructor
|
||||
*
|
||||
* @param object ipsRegistry reference
|
||||
* @return @e void
|
||||
*/
|
||||
public function __construct( ipsRegistry $registry )
|
||||
{
|
||||
/* Make objects */
|
||||
$this->registry = $registry;
|
||||
$this->DB = $this->registry->DB();
|
||||
$this->settings =& $this->registry->fetchSettings();
|
||||
$this->request =& $this->registry->fetchRequest();
|
||||
$this->lang = $this->registry->getClass('class_localization');
|
||||
$this->member = $this->registry->member();
|
||||
$this->memberData =& $this->registry->member()->fetchMemberData();
|
||||
$this->cache = $this->registry->cache();
|
||||
$this->caches =& $this->registry->cache()->fetchCaches();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert Data
|
||||
* Takes an array of app specific data and remaps it to the DB table fields
|
||||
*
|
||||
* @param array
|
||||
* @return array
|
||||
*/
|
||||
public function convertData( $data )
|
||||
{
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch unread count
|
||||
*
|
||||
* Grab the number of items truly unread
|
||||
* This is called upon by 'markRead' when the number of items
|
||||
* left hits zero (or less).
|
||||
*
|
||||
*
|
||||
* @param array Array of data
|
||||
* @param array Array of read itemIDs
|
||||
* @param int Last global reset
|
||||
* @return integer Last unread count
|
||||
*/
|
||||
public function fetchUnreadCount( $data, $readItems, $lastReset )
|
||||
{
|
||||
$readItems = is_array( $readItems ) ? $readItems : array( 0 );
|
||||
|
||||
$_count = $this->DB->buildAndFetch( array(
|
||||
'select' => 'COUNT(*) as cnt, MIN(date_updated) AS lastItem',
|
||||
'from' => 'rc_reports_index',
|
||||
'where' => "id NOT IN(" . implode( ",", array_keys( $readItems ) ) . ") AND date_updated > " . intval($lastReset)
|
||||
) );
|
||||
|
||||
return array( 'count' => intval( $_count['cnt'] ),
|
||||
'lastItem' => intval( $_count['lastItem'] ) );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Main loader class
|
||||
*/
|
||||
class publicSessions__core
|
||||
{
|
||||
/**
|
||||
* Return session variables for this application
|
||||
*
|
||||
* current_appcomponent, current_module and current_section are automatically
|
||||
* stored. This function allows you to add specific variables in.
|
||||
*
|
||||
* @author Matt Mecham
|
||||
* @return array
|
||||
*/
|
||||
public function getSessionVariables()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$array = array( 'location_1_type' => '',
|
||||
'location_1_id' => 0,
|
||||
'location_2_type' => '',
|
||||
'location_2_id' => 0 );
|
||||
|
||||
/* @link http://community.invisionpower.com/tracker/issue-33345-start-new-topic-reply-to-this-topic-online-list-location */
|
||||
if( ipsRegistry::$request['module'] == 'attach' )
|
||||
{
|
||||
define( 'NO_SESSION_UPDATE', true );
|
||||
}
|
||||
|
||||
return $array;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse/format the online list data for the records
|
||||
*
|
||||
* @author Brandon Farber
|
||||
* @param array Online list rows to check against
|
||||
* @return array Online list rows parsed
|
||||
*/
|
||||
public function parseOnlineEntries( $rows )
|
||||
{
|
||||
if( !is_array($rows) OR !count($rows) )
|
||||
{
|
||||
return $rows;
|
||||
}
|
||||
|
||||
$final = array();
|
||||
|
||||
foreach( $rows as $row )
|
||||
{
|
||||
if( $row['current_appcomponent'] == 'core' )
|
||||
{
|
||||
if( $row['current_module'] == 'global' )
|
||||
{
|
||||
if( $row['current_section'] == 'login' )
|
||||
{
|
||||
$row['where_line'] = ipsRegistry::getClass( 'class_localization' )->words['WHERE_login'];
|
||||
}
|
||||
}
|
||||
else if( $row['current_module'] == 'search' )
|
||||
{
|
||||
$row['where_line'] = ipsRegistry::getClass( 'class_localization' )->words['WHERE_search'];
|
||||
}
|
||||
else if( $row['current_module'] == 'reports' )
|
||||
{
|
||||
$rcCache = ipsRegistry::cache()->getCache('report_cache');
|
||||
|
||||
if( is_array( $rcCache ) )
|
||||
{
|
||||
if( $rcCache['group_access'][ ipsRegistry::member()->getProperty('member_group_id') ] == true )
|
||||
{
|
||||
$row['where_line'] = ipsRegistry::getClass( 'class_localization' )->words['WHERE_reports'];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$final[ $row['id'] ] = $row;
|
||||
}
|
||||
|
||||
return $final;
|
||||
}
|
||||
}
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* Core Sessions
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @subpackage Core
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 20th February 2002
|
||||
* @version $Rev: 10914 $
|
||||
*
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
||||
exit();
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* Item Marking
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Downloads
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 10914 $
|
||||
*
|
||||
*/
|
||||
|
||||
class itemMarking__core
|
||||
{
|
||||
/**#@+
|
||||
* Registry Object Shortcuts
|
||||
*
|
||||
* @var object
|
||||
*/
|
||||
protected $registry;
|
||||
protected $DB;
|
||||
protected $settings;
|
||||
protected $request;
|
||||
protected $lang;
|
||||
protected $member;
|
||||
protected $memberData;
|
||||
protected $cache;
|
||||
protected $caches;
|
||||
/**#@-*/
|
||||
|
||||
/**
|
||||
* I'm a constructor, twisted constructor
|
||||
*
|
||||
* @param object ipsRegistry reference
|
||||
* @return @e void
|
||||
*/
|
||||
public function __construct( ipsRegistry $registry )
|
||||
{
|
||||
/* Make objects */
|
||||
$this->registry = $registry;
|
||||
$this->DB = $this->registry->DB();
|
||||
$this->settings =& $this->registry->fetchSettings();
|
||||
$this->request =& $this->registry->fetchRequest();
|
||||
$this->lang = $this->registry->getClass('class_localization');
|
||||
$this->member = $this->registry->member();
|
||||
$this->memberData =& $this->registry->member()->fetchMemberData();
|
||||
$this->cache = $this->registry->cache();
|
||||
$this->caches =& $this->registry->cache()->fetchCaches();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert Data
|
||||
* Takes an array of app specific data and remaps it to the DB table fields
|
||||
*
|
||||
* @param array
|
||||
* @return array
|
||||
*/
|
||||
public function convertData( $data )
|
||||
{
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch unread count
|
||||
*
|
||||
* Grab the number of items truly unread
|
||||
* This is called upon by 'markRead' when the number of items
|
||||
* left hits zero (or less).
|
||||
*
|
||||
*
|
||||
* @param array Array of data
|
||||
* @param array Array of read itemIDs
|
||||
* @param int Last global reset
|
||||
* @return integer Last unread count
|
||||
*/
|
||||
public function fetchUnreadCount( $data, $readItems, $lastReset )
|
||||
{
|
||||
$readItems = is_array( $readItems ) ? $readItems : array( 0 );
|
||||
|
||||
$_count = $this->DB->buildAndFetch( array(
|
||||
'select' => 'COUNT(*) as cnt, MIN(date_updated) AS lastItem',
|
||||
'from' => 'rc_reports_index',
|
||||
'where' => "id NOT IN(" . implode( ",", array_keys( $readItems ) ) . ") AND date_updated > " . intval($lastReset)
|
||||
) );
|
||||
|
||||
return array( 'count' => intval( $_count['cnt'] ),
|
||||
'lastItem' => intval( $_count['lastItem'] ) );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Main loader class
|
||||
*/
|
||||
class publicSessions__core
|
||||
{
|
||||
/**
|
||||
* Return session variables for this application
|
||||
*
|
||||
* current_appcomponent, current_module and current_section are automatically
|
||||
* stored. This function allows you to add specific variables in.
|
||||
*
|
||||
* @author Matt Mecham
|
||||
* @return array
|
||||
*/
|
||||
public function getSessionVariables()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$array = array( 'location_1_type' => '',
|
||||
'location_1_id' => 0,
|
||||
'location_2_type' => '',
|
||||
'location_2_id' => 0 );
|
||||
|
||||
/* @link http://community.invisionpower.com/tracker/issue-33345-start-new-topic-reply-to-this-topic-online-list-location */
|
||||
if( ipsRegistry::$request['module'] == 'attach' )
|
||||
{
|
||||
define( 'NO_SESSION_UPDATE', true );
|
||||
}
|
||||
|
||||
return $array;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse/format the online list data for the records
|
||||
*
|
||||
* @author Brandon Farber
|
||||
* @param array Online list rows to check against
|
||||
* @return array Online list rows parsed
|
||||
*/
|
||||
public function parseOnlineEntries( $rows )
|
||||
{
|
||||
if( !is_array($rows) OR !count($rows) )
|
||||
{
|
||||
return $rows;
|
||||
}
|
||||
|
||||
$final = array();
|
||||
|
||||
foreach( $rows as $row )
|
||||
{
|
||||
if( $row['current_appcomponent'] == 'core' )
|
||||
{
|
||||
if( $row['current_module'] == 'global' )
|
||||
{
|
||||
if( $row['current_section'] == 'login' )
|
||||
{
|
||||
$row['where_line'] = ipsRegistry::getClass( 'class_localization' )->words['WHERE_login'];
|
||||
}
|
||||
}
|
||||
else if( $row['current_module'] == 'search' )
|
||||
{
|
||||
$row['where_line'] = ipsRegistry::getClass( 'class_localization' )->words['WHERE_search'];
|
||||
}
|
||||
else if( $row['current_module'] == 'reports' )
|
||||
{
|
||||
$rcCache = ipsRegistry::cache()->getCache('report_cache');
|
||||
|
||||
if( is_array( $rcCache ) )
|
||||
{
|
||||
if( $rcCache['group_access'][ ipsRegistry::member()->getProperty('member_group_id') ] == true )
|
||||
{
|
||||
$row['where_line'] = ipsRegistry::getClass( 'class_localization' )->words['WHERE_reports'];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$final[ $row['id'] ] = $row;
|
||||
}
|
||||
|
||||
return $final;
|
||||
}
|
||||
}
|
||||
@@ -2,19 +2,19 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.2.3
|
||||
* IP.Board v3.3.4
|
||||
* Core registered caches, redirect resets and bitwise settings
|
||||
* Last Updated: $Date: 2011-03-15 18:03:09 -0400 (Tue, 15 Mar 2011) $
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license This is NULLED!
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @subpackage Core
|
||||
* @link http://hatynka.in
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 20th February 2002
|
||||
* @version $Rev: 8085 $
|
||||
* @version $Rev: 10914 $
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,323 +1,231 @@
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.2.3
|
||||
* Dashboard Notifications
|
||||
* Last Updated: $Date
|
||||
*
|
||||
* @author $Author: ips_terabyte $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Core
|
||||
* @link http://hatynka.in
|
||||
* @version $Rev: 9551 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
||||
exit();
|
||||
}
|
||||
|
||||
/**
|
||||
* Main loader class
|
||||
*/
|
||||
class dashboardNotifications__core
|
||||
{
|
||||
/**
|
||||
* Registry Object Shortcuts
|
||||
*
|
||||
* @var object
|
||||
*/
|
||||
public $settings;
|
||||
public $lang;
|
||||
public $cache;
|
||||
public $caches;
|
||||
public $DB;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->settings = ipsRegistry::fetchSettings();
|
||||
$this->lang = ipsRegistry::getClass('class_localization');
|
||||
$this->caches =& ipsRegistry::cache()->fetchCaches();
|
||||
$this->cache = ipsRegistry::cache();
|
||||
$this->DB = ipsRegistry::DB();
|
||||
}
|
||||
|
||||
public function get()
|
||||
{
|
||||
/* INIT */
|
||||
$entries = array();
|
||||
|
||||
if( ! $this->settings['ipb_reg_number'] )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['lc_title_nokey'], sprintf( $this->lang->words['lc_msg_nokey'], "{$this->settings['base_url']}module=tools&section=licensekey" ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
/* We need a classFileManagement object */
|
||||
$classToLoad = IPSLib::loadLibrary( IPS_KERNEL_PATH . 'classFileManagement.php', 'classFileManagement' );
|
||||
$classFileManagement = new $classToLoad();
|
||||
|
||||
/* Try to automatically update if expired */
|
||||
$licenseData = $this->cache->getCache( 'licenseData' );
|
||||
|
||||
if( ! $licenseData || ( $licenseData['key']['_expires'] != 9999999999 AND $licenseData['key']['_expires'] < IPS_UNIX_TIME_NOW ) )
|
||||
{
|
||||
/* Query the api */
|
||||
$response = $classFileManagement->getFileContents( "http://myipb.in/license.php?lk={$this->settings['ipb_reg_number']}&url={$this->settings['board_url']}&flush=1" );
|
||||
|
||||
/* Get License Data */
|
||||
$licenseData = json_decode( $response, true );
|
||||
|
||||
/* Copyright Removal? */
|
||||
if ( $licenseData['cr'] )
|
||||
{
|
||||
IPSLib::updateSettings( array( 'ipb_copy_number' => $licenseData['cr'], 'ips_cp_purchase' => 1 ) );
|
||||
}
|
||||
elseif ( $this->settings['ips_cp_purchase'] )
|
||||
{
|
||||
IPSLib::updateSettings( array( 'ips_cp_purchase' => 0 ) );
|
||||
}
|
||||
|
||||
/* Save to cache */
|
||||
$licenseData['_cached_date'] = time();
|
||||
$licenseData['key']['_expires'] = $licenseData['key']['_expires'] ? $licenseData['key']['_expires'] : 9999999999;
|
||||
$licenseData['key']['expires'] = $licenseData['key']['expires'] ? $licenseData['key']['expires'] : 9999999999;
|
||||
|
||||
$this->cache->setCache( 'licenseData', $licenseData, array( 'array' => 1 ) );
|
||||
|
||||
}
|
||||
|
||||
/* Query the api */
|
||||
$response = $classFileManagement->getFileContents("http://myipb.in/license.php?api=checkService&service=ipb&lk={$this->settings['ipb_reg_number']}&domain={$this->settings['board_url']}" );
|
||||
|
||||
/* Get License Data */
|
||||
$response = json_decode( $response, true );
|
||||
|
||||
/* Is the Spam Service Working? */
|
||||
if ( $this->settings['spam_service_enabled'] )
|
||||
{
|
||||
//$lastLog = $this->DB->buildAndFetch( array( 'select' => 'log_code', 'from' => 'spam_service_log', 'order' => 'id DESC', 'limit' => 1 ) ); // Order on ID since log_date has no index
|
||||
|
||||
//if ( $lastLog['log_code'] === '0' )
|
||||
|
||||
/* Get last 5 logs, and if all 5 are errors, show message */
|
||||
$_errors = 0;
|
||||
$_entries = 0;
|
||||
$_lastError = '';
|
||||
|
||||
$this->DB->build( array( 'select' => 'log_code, log_msg', 'from' => 'spam_service_log', 'order' => 'id DESC', 'limit' => 5 ) );
|
||||
$this->DB->execute();
|
||||
|
||||
while( $_r = $this->DB->fetch() )
|
||||
{
|
||||
$_entries++;
|
||||
|
||||
if( $_r['log_code'] === '0' )
|
||||
{
|
||||
$_errors++;
|
||||
|
||||
if( !$_lastError )
|
||||
{
|
||||
$_lastError = $_r['log_msg'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( $_entries > 0 && $_errors == $_entries )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['spam_service_error'], sprintf( $this->lang->words['spam_service_error_msg'], $_lastError ) );
|
||||
}
|
||||
}
|
||||
/* If it's disabled, are we entitiled to it? */
|
||||
else
|
||||
{
|
||||
$licenseData = $this->cache->getCache( 'licenseData' );
|
||||
|
||||
if ( is_array( $licenseData['ipbMain'] ) && count( $licenseData['ipbMain'] ) )
|
||||
{
|
||||
foreach ( $licenseData['ipbMain'] as $data )
|
||||
{
|
||||
if ( $data['name'] == 'Spam Monitoring Service' && $data['status'] == 'Ok' )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['spam_service_disabled'], $this->lang->words['spam_service_disabled_msg'] );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* FURL cache OOD? */
|
||||
if ( is_file( IPS_CACHE_PATH . 'cache/furlCache.php' ) )
|
||||
{
|
||||
$mtime = intval( @filemtime( IPS_CACHE_PATH . 'cache/furlCache.php' ) );
|
||||
|
||||
/* Check mtimes on extensions.. */
|
||||
foreach( ipsRegistry::$applications as $app_dir => $application )
|
||||
{
|
||||
if ( is_file( IPSLib::getAppDir( $app_dir ) . '/extensions/furlTemplates.php' ) )
|
||||
{
|
||||
$_mtime = intval( @filemtime( IPSLib::getAppDir( $app_dir ) . '/extensions/furlTemplates.php' ) );
|
||||
|
||||
if ( $_mtime > $mtime )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['furlcache_outofdate'], sprintf( $this->lang->words['furlcache_outofdate_desc'], $application['app_title'] ) . "<a href='" . $this->settings['base_url'] . "app=core&module=applications&section=applications&do=seoRebuild'>{$this->lang->words['rebuild_furl_cache']}</a>" );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Sphinx cache OOD? */
|
||||
if ( $this->settings['search_method'] == 'sphinx' )
|
||||
{
|
||||
$mtime = intval( $this->cache->getCache('sphinx_config') );
|
||||
|
||||
/* Check mtimes on extensions.. */
|
||||
foreach( ipsRegistry::$applications as $app_dir => $application )
|
||||
{
|
||||
if ( is_file( IPSLib::getAppDir( $app_dir ) . '/extensions/sphinxTemplate.php' ) )
|
||||
{
|
||||
$_mtime = intval( @filemtime( IPSLib::getAppDir( $app_dir ) . '/extensions/sphinxTemplate.php' ) );
|
||||
|
||||
if ( !$mtime OR $_mtime > $mtime )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['sphinxconfig_outofdate'], $this->lang->words['sphinxconfig_outofdate_desc'] . ' ' . "<a href='" . $this->settings['base_url'] . "app=core&module=applications&section=applications&do=applications_overview'>{$this->lang->words['rebuild_sphinx_config']}</a>" );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Minify on but /cache/tmp not writeable? */
|
||||
if ( !empty( $this->settings['_use_minify'] ) )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['minifywrite_head'], $this->lang->words['minifynot_writeable'] );
|
||||
}
|
||||
|
||||
/* Installer Check */
|
||||
if( @is_file( IPS_ROOT_PATH . 'install/index.php' ) )
|
||||
{
|
||||
if ( ! @is_file( DOC_IPS_ROOT_PATH . 'cache/installer_lock.php' ) )
|
||||
{
|
||||
$this->lang->words['cp_unlocked_warning'] = sprintf( $this->lang->words['cp_unlocked_warning'], CP_DIRECTORY );
|
||||
$entries[] = array( $this->lang->words['cp_unlockedinstaller'], $this->lang->words['cp_unlocked_warning'] );
|
||||
}
|
||||
}
|
||||
|
||||
/* Unfinished Upgrade */
|
||||
require_once( IPS_ROOT_PATH . '/setup/sources/base/setup.php' );/*noLibHook*/
|
||||
$versions = IPSSetUp::fetchAppVersionNumbers( 'core' );
|
||||
|
||||
if( $versions['current'][0] != $versions['latest'][0] )
|
||||
{
|
||||
$this->lang->words['cp_upgrade_warning'] = sprintf( $this->lang->words['cp_upgrade_warning'], $versions['current'][1], $versions['latest'][1], $this->settings['base_acp_url'] );
|
||||
|
||||
$entries[] = array( $this->lang->words['cp_unfinishedupgrade'], $this->lang->words['cp_upgrade_warning'] );
|
||||
}
|
||||
|
||||
/* PHP Version Check */
|
||||
if( PHP_VERSION < '5.1.0' )
|
||||
{
|
||||
$entries[] = array( sprintf( $this->lang->words['cp_yourphpversion'], PHP_VERSION ), $this->lang->words['cp_php_warning'] );
|
||||
}
|
||||
|
||||
/* Outgoing email address specified */
|
||||
if ( !$this->settings['email_out'] OR !$this->settings['email_in'] )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['cp_missingemail'], "{$this->lang->words['cp_missingemail1']}<br /><br />{$this->lang->words['_raquo']} <a href='" . $this->settings['base_url'] . "&module=settings&section=settings&do=findsetting&key=email'>{$this->lang->words['cp_missingemail2']}</a>" );
|
||||
}
|
||||
|
||||
/* Board Offline Check */
|
||||
if ( $this->settings['board_offline'] )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['cp_boardoffline'], "{$this->lang->words['cp_boardoffline1']}<br /><br />{$this->lang->words['_raquo']} <a href='" . $this->settings['base_url'] . "&module=settings&section=settings&do=findsetting&key=boardoffline'>{$this->lang->words['cp_boardoffline2']}</a>" );
|
||||
}
|
||||
|
||||
/* Fulltext Check */
|
||||
if( $this->settings['search_method'] == 'traditional' AND !$this->settings['use_fulltext'] AND !$this->settings['hide_ftext_note'] )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['fulltext_off'], "{$this->lang->words['fulltext_turnon']}<br /><br />{$this->lang->words['_raquo']} <a href='" . $this->settings['base_url'] . "&module=settings&section=settings&do=findsetting&key=searchsetup'>{$this->lang->words['fulltext_find']}</a>" );
|
||||
}
|
||||
|
||||
/* Make sure the profile directory is writable */
|
||||
if( ! is_dir( $this->settings['upload_dir'] . '/profile/' ) || ! is_writable( $this->settings['upload_dir'] . '/profile/' ) )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['cp_profilephotoerr_title'], sprintf( $this->lang->words['cp_profilephotoerr_msg'], $this->settings['upload_dir'] . '/profile/' ) );
|
||||
}
|
||||
|
||||
/* Check for upgrade finish folder */
|
||||
if( is_dir( IPS_ROOT_PATH . 'upgradeFinish/' ) )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['cp_upgradefinishfolder'], sprintf( $this->lang->words['cp_upgradefinishfolder_msg'], IPS_ROOT_PATH . 'upgradeFinish/' ) );
|
||||
}
|
||||
|
||||
/* Check to see if GD is intalled */
|
||||
if(! extension_loaded( 'gd' ) || ! function_exists( 'gd_info' ) )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['cp_gdnotinstalled_title'], $this->lang->words['cp_gdnotinstalled_msg'] );
|
||||
}
|
||||
|
||||
/* Performance mode check */
|
||||
$perfMode = $this->cache->getCache('performanceCache');
|
||||
|
||||
if( is_array( $perfMode ) && count( $perfMode ) )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['cp_perfmodeon_title'], $this->lang->words['cp_perfmodeon_msg'] );
|
||||
}
|
||||
|
||||
/* Suhosin check */
|
||||
if( extension_loaded( 'suhosin' ) )
|
||||
{
|
||||
$_postMaxVars = @ini_get('suhosin.post.max_vars');
|
||||
$_reqMaxVars = @ini_get('suhosin.request.max_vars');
|
||||
$_postMaxLen = @ini_get('suhosin.post.max_value_length');
|
||||
$_reqMaxLen = @ini_get('suhosin.request.max_value_length');
|
||||
|
||||
if( $_postMaxVars < 4096 )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['suhosin_notification'], sprintf( $this->lang->words['suhosin_badvalue1'], $_postMaxVars ) );
|
||||
}
|
||||
|
||||
if( $_reqMaxVars < 4096 )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['suhosin_notification'], sprintf( $this->lang->words['suhosin_badvalue2'], $_reqMaxVars ) );
|
||||
}
|
||||
|
||||
if( $_postMaxLen < 1000000 )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['suhosin_notification'], sprintf( $this->lang->words['suhosin_badvalue3'], $_postMaxLen ) );
|
||||
}
|
||||
|
||||
if( $_reqMaxLen < 1000000 )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['suhosin_notification'], sprintf( $this->lang->words['suhosin_badvalue4'], $_reqMaxLen ) );
|
||||
}
|
||||
}
|
||||
|
||||
/* SQL error check */
|
||||
/*if ( is_file( IPS_CACHE_PATH . 'cache/sql_error_latest.cgi' ) )
|
||||
{
|
||||
$unix = @filemtime( IPS_CACHE_PATH . 'cache/sql_error_latest.cgi' );
|
||||
|
||||
if ( $unix )
|
||||
{
|
||||
$mtime = gmdate( 'd-j-Y', $unix );
|
||||
$now = gmdate( 'd-j-Y', time() );
|
||||
|
||||
if ( $mtime == $now )
|
||||
{
|
||||
// Display a message
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
return $entries;
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* Dashboard Notifications
|
||||
* Last Updated: 11.07.2012
|
||||
*
|
||||
* @author $Author: ips_terabyte $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @subpackage Core
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 11026 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
||||
exit();
|
||||
}
|
||||
|
||||
/**
|
||||
* Main loader class
|
||||
* DO NOT MODIFY!
|
||||
*/
|
||||
class dashboardNotifications__core
|
||||
{
|
||||
/**
|
||||
* Registry Object Shortcuts
|
||||
*
|
||||
* @var object
|
||||
*/
|
||||
public $settings;
|
||||
public $lang;
|
||||
public $cache;
|
||||
public $caches;
|
||||
public $DB;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->settings = ipsRegistry::fetchSettings();
|
||||
$this->lang = ipsRegistry::getClass('class_localization');
|
||||
$this->caches =& ipsRegistry::cache()->fetchCaches();
|
||||
$this->cache = ipsRegistry::cache();
|
||||
$this->DB = ipsRegistry::DB();
|
||||
}
|
||||
|
||||
public function get()
|
||||
{
|
||||
/* INIT! */
|
||||
$entries = array();
|
||||
|
||||
if( ! $this->settings['ipb_reg_number'] )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['lc_title_nokey'], sprintf( $this->lang->words['lc_msg_nokey'], "{$this->settings['base_url']}module=tools&section=licensekey" ) );
|
||||
}
|
||||
|
||||
/* FURL cache OOD? */
|
||||
if ( is_file( IPS_CACHE_PATH . 'cache/furlCache.php' ) )
|
||||
{
|
||||
$mtime = intval( @filemtime( IPS_CACHE_PATH . 'cache/furlCache.php' ) );
|
||||
|
||||
/* Check mtimes on extensions.. */
|
||||
foreach( ipsRegistry::$applications as $app_dir => $application )
|
||||
{
|
||||
if ( is_file( IPSLib::getAppDir( $app_dir ) . '/extensions/furlTemplates.php' ) )
|
||||
{
|
||||
$_mtime = intval( @filemtime( IPSLib::getAppDir( $app_dir ) . '/extensions/furlTemplates.php' ) );
|
||||
|
||||
if ( $_mtime > $mtime )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['furlcache_outofdate'], sprintf( $this->lang->words['furlcache_outofdate_desc'], $application['app_title'] ) . "<a href='" . $this->settings['base_url'] . "app=core&module=applications&section=applications&do=seoRebuild'>{$this->lang->words['rebuild_furl_cache']}</a>" );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Sphinx cache OOD? */
|
||||
if ( $this->settings['search_method'] == 'sphinx' )
|
||||
{
|
||||
$mtime = intval( $this->cache->getCache('sphinx_config') );
|
||||
|
||||
/* Check mtimes on extensions.. */
|
||||
foreach( ipsRegistry::$applications as $app_dir => $application )
|
||||
{
|
||||
if ( is_file( IPSLib::getAppDir( $app_dir ) . '/extensions/sphinxTemplate.php' ) )
|
||||
{
|
||||
$_mtime = intval( @filemtime( IPSLib::getAppDir( $app_dir ) . '/extensions/sphinxTemplate.php' ) );
|
||||
|
||||
if ( !$mtime OR $_mtime > $mtime )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['sphinxconfig_outofdate'], $this->lang->words['sphinxconfig_outofdate_desc'] . ' ' . "<a href='" . $this->settings['base_url'] . "app=core&module=applications&section=applications&do=applications_overview'>{$this->lang->words['rebuild_sphinx_config']}</a>" );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Minify on but /cache/tmp not writeable? */
|
||||
if ( !empty( $this->settings['_use_minify'] ) )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['minifywrite_head'], $this->lang->words['minifynot_writeable'] );
|
||||
}
|
||||
|
||||
/* Installer Check */
|
||||
if( @is_file( IPS_ROOT_PATH . 'install/index.php' ) )
|
||||
{
|
||||
if ( ! @is_file( DOC_IPS_ROOT_PATH . 'cache/installer_lock.php' ) )
|
||||
{
|
||||
$this->lang->words['cp_unlocked_warning'] = sprintf( $this->lang->words['cp_unlocked_warning'], CP_DIRECTORY );
|
||||
$entries[] = array( $this->lang->words['cp_unlockedinstaller'], $this->lang->words['cp_unlocked_warning'] );
|
||||
}
|
||||
}
|
||||
|
||||
/* Unfinished Upgrade */
|
||||
require_once( IPS_ROOT_PATH . '/setup/sources/base/setup.php' );/*noLibHook*/
|
||||
$versions = IPSSetUp::fetchAppVersionNumbers( 'core' );
|
||||
|
||||
if( $versions['current'][0] != $versions['latest'][0] )
|
||||
{
|
||||
$this->lang->words['cp_upgrade_warning'] = sprintf( $this->lang->words['cp_upgrade_warning'], $versions['current'][1], $versions['latest'][1], $this->settings['base_acp_url'] );
|
||||
|
||||
$entries[] = array( $this->lang->words['cp_unfinishedupgrade'], $this->lang->words['cp_upgrade_warning'] );
|
||||
}
|
||||
|
||||
/**
|
||||
* PHP Version Check
|
||||
*
|
||||
* @todo Remove this for 4.0? Installer/upgrader already do check for this anyway...
|
||||
*/
|
||||
if( PHP_VERSION < '5.2.0' )
|
||||
{
|
||||
$entries[] = array( sprintf( $this->lang->words['cp_yourphpversion'], PHP_VERSION ), $this->lang->words['cp_php_warning'] );
|
||||
}
|
||||
|
||||
/* Outgoing email address specified */
|
||||
if ( !$this->settings['email_out'] OR !$this->settings['email_in'] )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['cp_missingemail'], "{$this->lang->words['cp_missingemail1']}<br /><br />{$this->lang->words['_raquo']} <a href='" . $this->settings['base_url'] . "&module=settings&section=settings&do=findsetting&key=email'>{$this->lang->words['cp_missingemail2']}</a>" );
|
||||
}
|
||||
|
||||
/* Board Offline Check */
|
||||
if ( $this->settings['board_offline'] )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['cp_boardoffline'], "{$this->lang->words['cp_boardoffline1']}<br /><br />{$this->lang->words['_raquo']} <a href='" . $this->settings['base_url'] . "&module=settings&section=settings&do=findsetting&key=boardoffline'>{$this->lang->words['cp_boardoffline2']}</a>" );
|
||||
}
|
||||
|
||||
/* Fulltext Check */
|
||||
if( $this->settings['search_method'] == 'traditional' AND !$this->settings['use_fulltext'] AND !$this->settings['hide_ftext_note'] )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['fulltext_off'], "{$this->lang->words['fulltext_turnon']}<br /><br />{$this->lang->words['_raquo']} <a href='" . $this->settings['base_url'] . "&module=settings&section=settings&do=findsetting&key=searchsetup'>{$this->lang->words['fulltext_find']}</a>" );
|
||||
}
|
||||
|
||||
/* Make sure the profile directory is writable */
|
||||
if( ! is_dir( $this->settings['upload_dir'] . '/profile/' ) || ! is_writable( $this->settings['upload_dir'] . '/profile/' ) )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['cp_profilephotoerr_title'], sprintf( $this->lang->words['cp_profilephotoerr_msg'], $this->settings['upload_dir'] . '/profile/' ) );
|
||||
}
|
||||
|
||||
/* Check for upgrade finish folder */
|
||||
if( is_dir( IPS_ROOT_PATH . 'upgradeFinish/' ) )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['cp_upgradefinishfolder'], sprintf( $this->lang->words['cp_upgradefinishfolder_msg'], IPS_ROOT_PATH . 'upgradeFinish/' ) );
|
||||
}
|
||||
|
||||
/* Check to see if GD is intalled */
|
||||
if(! extension_loaded( 'gd' ) || ! function_exists( 'gd_info' ) )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['cp_gdnotinstalled_title'], $this->lang->words['cp_gdnotinstalled_msg'] );
|
||||
}
|
||||
|
||||
/* Performance mode check */
|
||||
$perfMode = $this->cache->getCache('performanceCache');
|
||||
|
||||
if( is_array( $perfMode ) && count( $perfMode ) )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['cp_perfmodeon_title'], $this->lang->words['cp_perfmodeon_msg'] );
|
||||
}
|
||||
|
||||
/* Suhosin check */
|
||||
if( extension_loaded( 'suhosin' ) )
|
||||
{
|
||||
$_postMaxVars = @ini_get('suhosin.post.max_vars');
|
||||
$_reqMaxVars = @ini_get('suhosin.request.max_vars');
|
||||
$_postMaxLen = @ini_get('suhosin.post.max_value_length');
|
||||
$_reqMaxLen = @ini_get('suhosin.request.max_value_length');
|
||||
|
||||
if( $_postMaxVars < 4096 )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['suhosin_notification'], sprintf( $this->lang->words['suhosin_badvalue1'], $_postMaxVars ) );
|
||||
}
|
||||
|
||||
if( $_reqMaxVars < 4096 )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['suhosin_notification'], sprintf( $this->lang->words['suhosin_badvalue2'], $_reqMaxVars ) );
|
||||
}
|
||||
|
||||
if( $_postMaxLen < 1000000 )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['suhosin_notification'], sprintf( $this->lang->words['suhosin_badvalue3'], $_postMaxLen ) );
|
||||
}
|
||||
|
||||
if( $_reqMaxLen < 1000000 )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['suhosin_notification'], sprintf( $this->lang->words['suhosin_badvalue4'], $_reqMaxLen ) );
|
||||
}
|
||||
}
|
||||
|
||||
/* SQL error check */
|
||||
/*if ( is_file( IPS_CACHE_PATH . 'cache/sql_error_latest.cgi' ) )
|
||||
{
|
||||
$unix = @filemtime( IPS_CACHE_PATH . 'cache/sql_error_latest.cgi' );
|
||||
|
||||
if ( $unix )
|
||||
{
|
||||
$mtime = gmdate( 'd-j-Y', $unix );
|
||||
$now = gmdate( 'd-j-Y', time() );
|
||||
|
||||
if ( $mtime == $now )
|
||||
{
|
||||
// Display a message
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
return $entries;
|
||||
}
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.2.3
|
||||
* Define data hook locations (core)
|
||||
* Last Updated: $Date: 2011-05-18 04:49:10 -0400 (Wed, 18 May 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: ips_terabyte $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Core
|
||||
* @link http://hatynka.in
|
||||
* @version $Rev: 8812 $
|
||||
*/
|
||||
|
||||
$dataHookLocations = array(
|
||||
|
||||
/* POSTING LIBRARY DATA LOCATIONS */
|
||||
array( 'warnLogs', 'Insert Warn Log' ),
|
||||
|
||||
|
||||
);
|
||||
@@ -1,36 +1,36 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.2.3
|
||||
* BBCode Management : Determines if bbcode can be used in this section
|
||||
* Last Updated: $LastChangedDate: 2011-04-20 18:01:37 -0400 (Wed, 20 Apr 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Core
|
||||
* @link http://hatynka.in
|
||||
* @version $Rev: 8419 $
|
||||
*
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
|
||||
exit();
|
||||
}
|
||||
|
||||
/*
|
||||
* An array of key => value pairs
|
||||
* When going to parse, the key should be passed to the editor
|
||||
* to determine which bbcodes should be parsed in the section
|
||||
*
|
||||
*/
|
||||
$BBCODE = array(
|
||||
'reports' => ipsRegistry::getClass('class_localization')->words['ctype__reports'],
|
||||
'global_comments' => ipsRegistry::getClass('class_localization')->words['ctype__comments'],
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* BBCode Management : Determines if bbcode can be used in this section
|
||||
* Last Updated: $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @subpackage Core
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 10914 $
|
||||
*
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
|
||||
exit();
|
||||
}
|
||||
|
||||
/*
|
||||
* An array of key => value pairs
|
||||
* When going to parse, the key should be passed to the editor
|
||||
* to determine which bbcodes should be parsed in the section
|
||||
*
|
||||
*/
|
||||
$BBCODE = array(
|
||||
'reports' => ipsRegistry::getClass('class_localization')->words['ctype__reports'],
|
||||
'global_comments' => ipsRegistry::getClass('class_localization')->words['ctype__comments'],
|
||||
);
|
||||
@@ -1,70 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.2
|
||||
* Sets up SEO templates
|
||||
* Last Updated: $Date: 2010-07-01 18:13:46 -0400 (Thu, 01 Jul 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Core
|
||||
* @link http://hatynka.in
|
||||
* @since 20th February 2002
|
||||
* @version $Rev: 6596 $
|
||||
*
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
||||
exit();
|
||||
}
|
||||
|
||||
/**
|
||||
* SEO templates
|
||||
*
|
||||
* 'allowRedirect' is a flag to tell IP.Board whether to check the incoming link and if not formatted correctly, redirect the correct one
|
||||
*
|
||||
* OUT FORMAT REGEX:
|
||||
* First array element is a regex to run to see if we've a match for the URL
|
||||
* The second array element is the template to use the results of the parenthesis capture
|
||||
*
|
||||
* Special variable #{__title__} is replaced with the $title data passed to output->formatUrl( $url, $title)
|
||||
*
|
||||
* IMPORTANT: Remember that when these regex are used, the output has not been fully parsed so you will get:
|
||||
* showuser={$data['member_id']} NOT showuser=1 so do not try and match numerics only!
|
||||
*
|
||||
* IN FORMAT REGEX
|
||||
*
|
||||
* This allows the registry to piece back together a URL based on the template regex
|
||||
* So, for example: "/user/(\d+?)/", 'matches' => array( array( 'showuser' => '$1' ) )tells IP.Board to populate 'showuser' with the result
|
||||
* of the parenthesis capture #1
|
||||
*/
|
||||
$_SEOTEMPLATES = array(
|
||||
|
||||
'section=register' => array( 'app' => 'core',
|
||||
'allowRedirect' => 0,
|
||||
'out' => array( '#app=core(&|&)module=global(&|&)section=register(&|&|$)#i', 'register/$3' ),
|
||||
'in' => array( 'regex' => "#/register(/|$|\?)#i",
|
||||
'matches' => array( array( 'app', 'core' ), array( 'module', 'global' ), array( 'section', 'register' ) ) ) ),
|
||||
|
||||
'section=rss' => array( 'app' => 'core',
|
||||
'allowRedirect' => 0,
|
||||
'out' => array( '#app=core(&|&)module=global(&|&)section=rss(&|&)type=(\w+?)$#i', 'rss/$4/' ),
|
||||
'in' => array( 'regex' => "#/rss/(\w+?)/$#i",
|
||||
'matches' => array( array( 'app', 'core' ), array( 'module', 'global' ), array( 'section', 'rss' ), array( 'type', '$1' ) ) ) ),
|
||||
|
||||
'section=rss2' => array( 'app' => 'core',
|
||||
'allowRedirect' => 0,
|
||||
'out' => array( '#app=core(&|&)module=global(&|&)section=rss(&|&)type=(\w+?)(&|&)id=(\w+?)$#i', 'rss/$4/$6-#{__title__}/' ),
|
||||
'in' => array( 'regex' => "#/rss/(\w+?)/(\w+?)-#i",
|
||||
'matches' => array( array( 'app', 'core' ), array( 'module', 'global' ), array( 'section', 'rss' ), array( 'type', '$1' ), array( 'id', '$2' ) ) ) ),
|
||||
|
||||
# Changed section=rss2 id matching to use \w for more flexibility
|
||||
|
||||
);
|
||||
|
||||
@@ -2,19 +2,19 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.2.3
|
||||
* IP.Board v3.3.4
|
||||
* Sets up SEO templates
|
||||
* Last Updated: $Date: 2011-09-16 07:16:26 -0400 (Fri, 16 Sep 2011) $
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: mmecham $
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license This is NULLED!
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @subpackage Core
|
||||
* @link http://hatynka.in
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 20th February 2002
|
||||
* @version $Rev: 9496 $
|
||||
* @version $Rev: 10914 $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -51,11 +51,29 @@ $_SEOTEMPLATES = array(
|
||||
'out' => array( '#app=core(&|&)module=global(&|&)section=register(&|&|$)#i', 'register/$3' ),
|
||||
'in' => array( 'regex' => "#/register(/|$|\?)#i",
|
||||
'matches' => array( array( 'app', 'core' ), array( 'module', 'global' ), array( 'section', 'register' ) ) ) ),
|
||||
|
||||
'tags' => array( 'app' => 'core',
|
||||
'allowRedirect' => 0,
|
||||
'out' => array( '#app=core(&|&)module=search(&|&)do=search(&|&)search_tags=(\S+?)(&|&)search_app=(\S+?)(&|&|$)#i', 'tags/$6/$4/$7' ),
|
||||
'in' => array( 'regex' => "#/tags/(\S+?)/(\S+?)/#i",
|
||||
'matches' => array( array( 'app', 'core' ), array( 'module', 'search' ), array( 'do', 'search' ), array( 'search_tags', '$2' ), array( 'search_app', '$1' ) ) ) ),
|
||||
|
||||
'privacy' => array( 'app' => 'core',
|
||||
'allowRedirect' => 0,
|
||||
'out' => array( '#app=core(&|&)module=global(&|&)section=privacy(&|&|$)#i', 'privacypolicy/$4/' ),
|
||||
'in' => array( 'regex' => "#/privacypolicy/#i",
|
||||
'matches' => array( array( 'app', 'core' ), array( 'module', 'global' ), array( 'section', 'privacy' ) ) ) ),
|
||||
|
||||
'likeunsubscribe' => array( 'app' => 'core',
|
||||
'allowRedirect' => 0,
|
||||
'out' => array( '#app=core(&|&)module=global(&|&)section=like(&|&)do=unsubscribe(&|&)key=(\S+?)(&|&|$)#i', 'unsubscribe/$5/' ),
|
||||
'in' => array( 'regex' => "#/unsubscribe/(\S+?)/$#i",
|
||||
'matches' => array( array( 'app', 'core' ), array( 'module', 'global' ), array( 'section', 'like' ), array( 'do', 'unsubscribe' ), array( 'key', '$1' ) ) ) ),
|
||||
'matches' => array( array( 'app', 'core' ), array( 'module', 'global' ), array( 'section', 'like' ), array( 'do', 'unsubscribe' ), array( 'key', '$1' ) ) ) ),
|
||||
'findcomment' => array( 'app' => 'core',
|
||||
'allowRedirect' => 0,
|
||||
'out' => array( '#app=core(&|&)module=global(&|&)section=comments(&|&)do=findComment(&|&)fromApp=(\S+?)(&|&)parentId=(\d+?)(&|&)commentId=(\d+?)(&|&|$)#i', 'findComment/$5/$7-$9' ),
|
||||
'in' => array( 'regex' => "#/findComment/(\S+?-\S+?)/(\d+?)-(\d+?)$#i",
|
||||
'matches' => array( array( 'app', 'core' ), array( 'module', 'global' ), array( 'section', 'comments' ), array( 'do', 'findComment' ), array( 'fromApp', '$1' ), array( 'parentId', '$2' ), array( 'commentId', '$3' ) ) ) ),
|
||||
'section=rss' => array( 'app' => 'core',
|
||||
'allowRedirect' => 0,
|
||||
'out' => array( '#app=core(&|&)module=global(&|&)section=rss(&|&)type=(\w+?)$#i', 'rss/$4/' ),
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
/**
|
||||
* @file default.php Core like class (Core application)
|
||||
*~TERABYTE_DOC_READY~
|
||||
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
||||
* $License: http://www.invisionpower.com/company/standards.php#license$
|
||||
* $Author: mark $
|
||||
* $LastChangedDate: 2011-12-08 16:43:34 +0000 (Thu, 08 Dec 2011) $
|
||||
* @version v3.3.4
|
||||
* $Revision: 9971 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
||||
exit();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @class like_core_default_composite
|
||||
* @brief Core default like class (core application)
|
||||
*/
|
||||
class like_core_composite extends classes_like_composite
|
||||
{
|
||||
/**
|
||||
* Registry Object Shortcuts
|
||||
*
|
||||
* @var $registry
|
||||
* @var $DB
|
||||
* @var $settings
|
||||
* @var $request
|
||||
* @var $lang
|
||||
* @var $member
|
||||
* @var $memberData
|
||||
* @var $cache
|
||||
* @var $caches
|
||||
*/
|
||||
protected $registry;
|
||||
protected $DB;
|
||||
protected $settings;
|
||||
protected $request;
|
||||
protected $lang;
|
||||
protected $member;
|
||||
protected $memberData;
|
||||
protected $cache;
|
||||
protected $caches;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @return @e void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
/* Make registry objects */
|
||||
$this->registry = ipsRegistry::instance();
|
||||
$this->DB = $this->registry->DB();
|
||||
$this->settings =& $this->registry->fetchSettings();
|
||||
$this->request =& $this->registry->fetchRequest();
|
||||
$this->lang = $this->registry->getClass('class_localization');
|
||||
$this->member = $this->registry->member();
|
||||
$this->memberData =& $this->registry->member()->fetchMemberData();
|
||||
$this->cache = $this->registry->cache();
|
||||
$this->caches =& $this->registry->cache()->fetchCaches();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -3,11 +3,11 @@
|
||||
* @file generate.php Navigation plugin: attachments
|
||||
*~TERABYTE_DOC_READY~
|
||||
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
||||
* $License: This is NULLED!
|
||||
* $License: http://www.invisionpower.com/company/standards.php#license$
|
||||
* $Author: bfarber $
|
||||
* @since 3/8/2011
|
||||
* $LastChangedDate: 2011-05-12 22:28:10 -0400 (Thu, 12 May 2011) $
|
||||
* @version v3.2.3
|
||||
* @version v3.3.4
|
||||
* $Revision: 8754 $
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com/">IP.Board</a>
|
||||
</body>
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com/">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,50 +1,50 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.2.3
|
||||
* Define the core notification types
|
||||
* Last Updated: $Date: 2011-03-11 06:59:39 -0500 (Fri, 11 Mar 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: ips_terabyte $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Core
|
||||
* @link http://hatynka.in
|
||||
* @since 20th February 2002
|
||||
* @version $Rev: 8031 $
|
||||
*
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
|
||||
class core_notifications
|
||||
{
|
||||
public function getConfiguration()
|
||||
{
|
||||
/**
|
||||
* Notification types - Needs to be a method so when require_once is used, $_NOTIFY isn't empty
|
||||
*/
|
||||
$_NOTIFY = array(
|
||||
// Future...
|
||||
// array( 'key' => 'reputation_received', 'default' => array( 'inline' ), 'disabled' => array() ),
|
||||
array( 'key' => 'report_center', 'default' => array( 'email' ), 'disabled' => array(), 'show_callback' => TRUE, 'icon' => 'notify_reportcenter' ),
|
||||
array( 'key' => 'new_comment' , 'default' => array( 'email' ), 'disabled' => array(), 'show_callback' => false, 'icon' => 'notify_profilecomment' ),
|
||||
);/*noLibHook*/
|
||||
return $_NOTIFY;
|
||||
}
|
||||
|
||||
public function report_center()
|
||||
{
|
||||
return $this->memberData['access_report_center'];
|
||||
}
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* Define the core notification types
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @subpackage Core
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 20th February 2002
|
||||
* @version $Rev: 10914 $
|
||||
*
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
|
||||
class core_notifications
|
||||
{
|
||||
public function getConfiguration()
|
||||
{
|
||||
/**
|
||||
* Notification types - Needs to be a method so when require_once is used, $_NOTIFY isn't empty
|
||||
*/
|
||||
$_NOTIFY = array(
|
||||
// Future...
|
||||
// array( 'key' => 'reputation_received', 'default' => array( 'inline' ), 'disabled' => array() ),
|
||||
array( 'key' => 'report_center', 'default' => array( 'email' ), 'disabled' => array(), 'show_callback' => TRUE, 'icon' => 'notify_reportcenter' ),
|
||||
array( 'key' => 'new_comment' , 'default' => array( 'email' ), 'disabled' => array(), 'show_callback' => false, 'icon' => 'notify_profilecomment' ),
|
||||
);/*noLibHook*/
|
||||
return $_NOTIFY;
|
||||
}
|
||||
|
||||
public function report_center()
|
||||
{
|
||||
return $this->memberData['access_report_center'];
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,10 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,118 +1,118 @@
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.2.3
|
||||
* RSS output plugin :: report center
|
||||
* Last Updated: $Date: 2011-03-10 16:00:38 -0500 (Thu, 10 Mar 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Core
|
||||
* @link http://hatynka.in
|
||||
* @since 6/24/2008
|
||||
* @version $Revision: 8021 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class rss_output_core
|
||||
{
|
||||
/**
|
||||
* Expiration date
|
||||
*
|
||||
* @var integer Expiration timestamp
|
||||
*/
|
||||
protected $expires = 0;
|
||||
|
||||
/**
|
||||
* Grab the RSS links
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getRssLinks()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// As this is member specific, hardcoded
|
||||
// into output library
|
||||
//-----------------------------------------
|
||||
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Grab the RSS document content and return it
|
||||
*
|
||||
* @return string RSS document
|
||||
*/
|
||||
public function returnRSSDocument()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$member_id = intval( ipsRegistry::$request['member_id'] );
|
||||
$secure_key = IPSText::md5Clean( ipsRegistry::$request['rss_key'] );
|
||||
$rss_data = array();
|
||||
$to_print = '';
|
||||
|
||||
if( $secure_key and $member_id )
|
||||
{
|
||||
if( $member_id == ipsRegistry::member()->getProperty('member_id') )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Get RSS export
|
||||
//-----------------------------------------
|
||||
|
||||
$rss_data = ipsRegistry::DB()->buildAndFetch( array( 'select' => 'rss_cache',
|
||||
'from' => 'rc_modpref',
|
||||
'where' => "mem_id=" . $member_id . " AND rss_key='" . $secure_key . "'"
|
||||
) );
|
||||
|
||||
//-----------------------------------------
|
||||
// Got one?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $rss_data['rss_cache'] )
|
||||
{
|
||||
return $rss_data['rss_cache'];
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Create a dummy one
|
||||
//-----------------------------------------
|
||||
|
||||
ipsRegistry::getClass('class_localization')->loadLanguageFile( array( 'public_reports' ), 'core' );
|
||||
|
||||
$classToLoad = IPSLib::loadLibrary( IPS_KERNEL_PATH . 'classRss.php', 'classRss' );
|
||||
$rss = new $classToLoad();
|
||||
|
||||
$channel_id = $rss->createNewChannel( array( 'title' => ipsRegistry::getClass('class_localization')->words['rss_feed_title'],
|
||||
'link' => ipsRegistry::$settings['board_url'],
|
||||
'description' => ipsRegistry::getClass('class_localization')->words['reports_rss_desc'],
|
||||
'pubDate' => $rss->formatDate( time() )
|
||||
) );
|
||||
$rss->createRssDocument();
|
||||
|
||||
return $rss->rss_document;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Grab the RSS document expiration timestamp
|
||||
*
|
||||
* @return integer Expiration timestamp
|
||||
*/
|
||||
public function grabExpiryDate()
|
||||
{
|
||||
return time() + 3600;
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* RSS output plugin :: report center
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @subpackage Core
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 6/24/2008
|
||||
* @version $Revision: 10914 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class rss_output_core
|
||||
{
|
||||
/**
|
||||
* Expiration date
|
||||
*
|
||||
* @var integer Expiration timestamp
|
||||
*/
|
||||
protected $expires = 0;
|
||||
|
||||
/**
|
||||
* Grab the RSS links
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getRssLinks()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// As this is member specific, hardcoded
|
||||
// into output library
|
||||
//-----------------------------------------
|
||||
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Grab the RSS document content and return it
|
||||
*
|
||||
* @return string RSS document
|
||||
*/
|
||||
public function returnRSSDocument()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$member_id = intval( ipsRegistry::$request['member_id'] );
|
||||
$secure_key = IPSText::md5Clean( ipsRegistry::$request['rss_key'] );
|
||||
$rss_data = array();
|
||||
$to_print = '';
|
||||
|
||||
if( $secure_key and $member_id )
|
||||
{
|
||||
if( $member_id == ipsRegistry::member()->getProperty('member_id') )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Get RSS export
|
||||
//-----------------------------------------
|
||||
|
||||
$rss_data = ipsRegistry::DB()->buildAndFetch( array( 'select' => 'rss_cache',
|
||||
'from' => 'rc_modpref',
|
||||
'where' => "mem_id=" . $member_id . " AND rss_key='" . $secure_key . "'"
|
||||
) );
|
||||
|
||||
//-----------------------------------------
|
||||
// Got one?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $rss_data['rss_cache'] )
|
||||
{
|
||||
return $rss_data['rss_cache'];
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Create a dummy one
|
||||
//-----------------------------------------
|
||||
|
||||
ipsRegistry::getClass('class_localization')->loadLanguageFile( array( 'public_reports' ), 'core' );
|
||||
|
||||
$classToLoad = IPSLib::loadLibrary( IPS_KERNEL_PATH . 'classRss.php', 'classRss' );
|
||||
$rss = new $classToLoad();
|
||||
|
||||
$channel_id = $rss->createNewChannel( array( 'title' => ipsRegistry::getClass('class_localization')->words['rss_feed_title'],
|
||||
'link' => ipsRegistry::$settings['board_url'],
|
||||
'description' => ipsRegistry::getClass('class_localization')->words['reports_rss_desc'],
|
||||
'pubDate' => $rss->formatDate( time() )
|
||||
) );
|
||||
$rss->createRssDocument();
|
||||
|
||||
return $rss->rss_document;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Grab the RSS document expiration timestamp
|
||||
*
|
||||
* @return integer Expiration timestamp
|
||||
*/
|
||||
public function grabExpiryDate()
|
||||
{
|
||||
return time() + 3600;
|
||||
}
|
||||
}
|
||||
@@ -1,33 +1,33 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.2.3
|
||||
* Config file
|
||||
* Last Updated: $Date: 2011-04-13 23:15:13 -0400 (Wed, 13 Apr 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $author$
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Forums
|
||||
* @link http://hatynka.in
|
||||
* @version $Rev: 8333 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
||||
exit();
|
||||
}
|
||||
|
||||
/* Can search with this app */
|
||||
$CONFIG['can_search'] = 1;
|
||||
|
||||
/* Can view new content with this app */
|
||||
$CONFIG['can_viewNewContent'] = 0;
|
||||
|
||||
/* Can fetch user generated content */
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* Config file
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $author$
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @subpackage Forums
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 10914 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
||||
exit();
|
||||
}
|
||||
|
||||
/* Can search with this app */
|
||||
$CONFIG['can_search'] = 1;
|
||||
|
||||
/* Can view new content with this app */
|
||||
$CONFIG['can_viewNewContent'] = 0;
|
||||
|
||||
/* Can fetch user generated content */
|
||||
$CONFIG['can_userContent'] = 0;
|
||||
@@ -1,10 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,178 +1,178 @@
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.2.3
|
||||
* Basic Forum Search
|
||||
* Last Updated: $Date: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: ips_terabyte $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Forums
|
||||
* @link http://hatynka.in
|
||||
* @version $Rev: 8644 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class search_engine_core extends search_engine
|
||||
{
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param object ipsRegistry reference
|
||||
* @return @e void
|
||||
*/
|
||||
public function __construct( ipsRegistry $registry )
|
||||
{
|
||||
parent::__construct( $registry );
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform a search.
|
||||
* Returns an array of a total count (total number of matches)
|
||||
* and an array of IDs ( 0 => 1203, 1 => 928, 2 => 2938 ).. matching the required number based on pagination. The ids returned would be based on the filters and type of search
|
||||
*
|
||||
* So if we had 1000 replies, and we are on page 2 of 25 per page, we'd return 25 items offset by 25
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function search()
|
||||
{
|
||||
/* INIT */
|
||||
$sort_by = IPSSearchRegistry::get('in.search_sort_by');
|
||||
$sort_order = IPSSearchRegistry::get('in.search_sort_order');
|
||||
$search_term = IPSSearchRegistry::get('in.clean_search_term');
|
||||
$sortKey = '';
|
||||
$rows = array();
|
||||
|
||||
/* Sorting */
|
||||
switch( $sort_by )
|
||||
{
|
||||
default:
|
||||
case 'date':
|
||||
$sortKey = 'id';
|
||||
break;
|
||||
case 'title':
|
||||
$sortKey = 'title';
|
||||
break;
|
||||
}
|
||||
|
||||
/* Query the count */
|
||||
$count = $this->DB->buildAndFetch( array('select' => 'COUNT(*) as total_results',
|
||||
'from' => 'faq',
|
||||
'where' => $this->_buildWhereStatement( $search_term ),
|
||||
) );
|
||||
|
||||
|
||||
|
||||
/* Fetch data */
|
||||
$this->DB->build( array( 'select' => '*',
|
||||
'from' => 'faq',
|
||||
'where' => $this->_buildWhereStatement( $search_term ),
|
||||
'order' => $sortKey . ' ' . $sort_order,
|
||||
'limit' => array( IPSSearchRegistry::get('in.start'), IPSSearchRegistry::get('opt.search_per_page') ),
|
||||
) );
|
||||
$this->DB->execute();
|
||||
|
||||
/* Get results */
|
||||
while ( $_row = $this->DB->fetch() )
|
||||
{
|
||||
$rows[] = $_row;
|
||||
}
|
||||
|
||||
/* Return it */
|
||||
return array( 'count' => $count['total_results'], 'resultSet' => $rows );
|
||||
}
|
||||
|
||||
/**
|
||||
* Builds the where portion of a search string
|
||||
*
|
||||
* @param string $search_term The string to use in the search
|
||||
* @return string
|
||||
*/
|
||||
protected function _buildWhereStatement( $search_term )
|
||||
{
|
||||
/* INI */
|
||||
$where_clause = array();
|
||||
|
||||
if( $search_term )
|
||||
{
|
||||
switch( IPSSearchRegistry::get('opt.searchType') )
|
||||
{
|
||||
case 'both':
|
||||
default:
|
||||
$where_clause[] = "(title LIKE '%{$search_term}%' OR text LIKE '%{$search_term}%' OR description LIKE '%{$search_term}%')";
|
||||
break;
|
||||
|
||||
case 'titles':
|
||||
$where_clause[] = "title LIKE '%{$search_term}%'";
|
||||
break;
|
||||
|
||||
case 'content':
|
||||
$where_clause[] = "(text LIKE '%{$search_term}%' OR description LIKE '%{$search_term}%')";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Add in AND where conditions */
|
||||
if( isset( $this->whereConditions['AND'] ) && count( $this->whereConditions['AND'] ) )
|
||||
{
|
||||
$where_clause = array_merge( $where_clause, $this->whereConditions['AND'] );
|
||||
}
|
||||
|
||||
/* ADD in OR where conditions */
|
||||
if( isset( $this->whereConditions['OR'] ) && count( $this->whereConditions['OR'] ) )
|
||||
{
|
||||
$where_clause[] = '( ' . implode( ' OR ', $this->whereConditions['OR'] ) . ' )';
|
||||
}
|
||||
|
||||
/* Build and return the string */
|
||||
return implode( " AND ", $where_clause );
|
||||
}
|
||||
|
||||
/**
|
||||
* Remap standard columns (Apps can override )
|
||||
*
|
||||
* @param string $column sql table column for this condition
|
||||
* @return string column
|
||||
* @return @e void
|
||||
*/
|
||||
public function remapColumn( $column )
|
||||
{
|
||||
if ( $column == 'member_id' )
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
return $column;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array used in the searchplugin's setCondition method
|
||||
*
|
||||
* @param array $data Array of forums to view
|
||||
* @return array Array with column, operator, and value keys, for use in the setCondition call
|
||||
*/
|
||||
public function buildFilterSQL( $data )
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Can handle boolean searching
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function isBoolean()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* Basic Forum Search
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @subpackage Forums
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 10914 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class search_engine_core extends search_engine
|
||||
{
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param object ipsRegistry reference
|
||||
* @return @e void
|
||||
*/
|
||||
public function __construct( ipsRegistry $registry )
|
||||
{
|
||||
parent::__construct( $registry );
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform a search.
|
||||
* Returns an array of a total count (total number of matches)
|
||||
* and an array of IDs ( 0 => 1203, 1 => 928, 2 => 2938 ).. matching the required number based on pagination. The ids returned would be based on the filters and type of search
|
||||
*
|
||||
* So if we had 1000 replies, and we are on page 2 of 25 per page, we'd return 25 items offset by 25
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function search()
|
||||
{
|
||||
/* INIT */
|
||||
$sort_by = IPSSearchRegistry::get('in.search_sort_by');
|
||||
$sort_order = IPSSearchRegistry::get('in.search_sort_order');
|
||||
$search_term = IPSSearchRegistry::get('in.clean_search_term');
|
||||
$sortKey = '';
|
||||
$rows = array();
|
||||
|
||||
/* Sorting */
|
||||
switch( $sort_by )
|
||||
{
|
||||
default:
|
||||
case 'date':
|
||||
$sortKey = 'id';
|
||||
break;
|
||||
case 'title':
|
||||
$sortKey = 'title';
|
||||
break;
|
||||
}
|
||||
|
||||
/* Query the count */
|
||||
$count = $this->DB->buildAndFetch( array('select' => 'COUNT(*) as total_results',
|
||||
'from' => 'faq',
|
||||
'where' => $this->_buildWhereStatement( $search_term ),
|
||||
) );
|
||||
|
||||
|
||||
|
||||
/* Fetch data */
|
||||
$this->DB->build( array( 'select' => '*',
|
||||
'from' => 'faq',
|
||||
'where' => $this->_buildWhereStatement( $search_term ),
|
||||
'order' => $sortKey . ' ' . $sort_order,
|
||||
'limit' => array( IPSSearchRegistry::get('in.start'), IPSSearchRegistry::get('opt.search_per_page') ),
|
||||
) );
|
||||
$this->DB->execute();
|
||||
|
||||
/* Get results */
|
||||
while ( $_row = $this->DB->fetch() )
|
||||
{
|
||||
$rows[] = $_row;
|
||||
}
|
||||
|
||||
/* Return it */
|
||||
return array( 'count' => $count['total_results'], 'resultSet' => $rows );
|
||||
}
|
||||
|
||||
/**
|
||||
* Builds the where portion of a search string
|
||||
*
|
||||
* @param string $search_term The string to use in the search
|
||||
* @return string
|
||||
*/
|
||||
protected function _buildWhereStatement( $search_term )
|
||||
{
|
||||
/* INI */
|
||||
$where_clause = array();
|
||||
|
||||
if( $search_term )
|
||||
{
|
||||
switch( IPSSearchRegistry::get('opt.searchType') )
|
||||
{
|
||||
case 'both':
|
||||
default:
|
||||
$where_clause[] = "(title LIKE '%{$search_term}%' OR text LIKE '%{$search_term}%' OR description LIKE '%{$search_term}%')";
|
||||
break;
|
||||
|
||||
case 'titles':
|
||||
$where_clause[] = "title LIKE '%{$search_term}%'";
|
||||
break;
|
||||
|
||||
case 'content':
|
||||
$where_clause[] = "(text LIKE '%{$search_term}%' OR description LIKE '%{$search_term}%')";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Add in AND where conditions */
|
||||
if( isset( $this->whereConditions['AND'] ) && count( $this->whereConditions['AND'] ) )
|
||||
{
|
||||
$where_clause = array_merge( $where_clause, $this->whereConditions['AND'] );
|
||||
}
|
||||
|
||||
/* ADD in OR where conditions */
|
||||
if( isset( $this->whereConditions['OR'] ) && count( $this->whereConditions['OR'] ) )
|
||||
{
|
||||
$where_clause[] = '( ' . implode( ' OR ', $this->whereConditions['OR'] ) . ' )';
|
||||
}
|
||||
|
||||
/* Build and return the string */
|
||||
return implode( " AND ", $where_clause );
|
||||
}
|
||||
|
||||
/**
|
||||
* Remap standard columns (Apps can override )
|
||||
*
|
||||
* @param string $column sql table column for this condition
|
||||
* @return string column
|
||||
* @return @e void
|
||||
*/
|
||||
public function remapColumn( $column )
|
||||
{
|
||||
if ( $column == 'member_id' )
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
return $column;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array used in the searchplugin's setCondition method
|
||||
*
|
||||
* @param array $data Array of forums to view
|
||||
* @return array Array with column, operator, and value keys, for use in the setCondition call
|
||||
*/
|
||||
public function buildFilterSQL( $data )
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Can handle boolean searching
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function isBoolean()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1,59 +1,59 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.2.3
|
||||
* Returns HTML for the form (optional class, not required)
|
||||
* Last Updated: $Date: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $author$
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Forums
|
||||
* @link http://hatynka.in
|
||||
* @version $Rev: 8644 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class search_form_core
|
||||
{
|
||||
/**
|
||||
* Construct
|
||||
*
|
||||
* @return @e void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
/* Make object */
|
||||
$this->registry = ipsRegistry::instance();
|
||||
$this->DB = $this->registry->DB();
|
||||
$this->settings =& $this->registry->fetchSettings();
|
||||
$this->request =& $this->registry->fetchRequest();
|
||||
$this->lang = $this->registry->getClass('class_localization');
|
||||
$this->member = $this->registry->member();
|
||||
$this->memberData =& $this->registry->member()->fetchMemberData();
|
||||
$this->cache = $this->registry->cache();
|
||||
$this->caches =& $this->registry->cache()->fetchCaches();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return sort drop down
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function fetchSortDropDown()
|
||||
{
|
||||
$array = array( 'date' => $this->lang->words['s_search_type_0'],
|
||||
'title' => $this->lang->words['forum_sort_title'] );
|
||||
|
||||
return $array;
|
||||
}
|
||||
}
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* Returns HTML for the form (optional class, not required)
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $author$
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @subpackage Forums
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 10914 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class search_form_core
|
||||
{
|
||||
/**
|
||||
* Construct
|
||||
*
|
||||
* @return @e void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
/* Make object */
|
||||
$this->registry = ipsRegistry::instance();
|
||||
$this->DB = $this->registry->DB();
|
||||
$this->settings =& $this->registry->fetchSettings();
|
||||
$this->request =& $this->registry->fetchRequest();
|
||||
$this->lang = $this->registry->getClass('class_localization');
|
||||
$this->member = $this->registry->member();
|
||||
$this->memberData =& $this->registry->member()->fetchMemberData();
|
||||
$this->cache = $this->registry->cache();
|
||||
$this->caches =& $this->registry->cache()->fetchCaches();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return sort drop down
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function fetchSortDropDown()
|
||||
{
|
||||
$array = array( 'date' => $this->lang->words['s_search_type_0'],
|
||||
'title' => $this->lang->words['forum_sort_title'] );
|
||||
|
||||
return $array;
|
||||
}
|
||||
}
|
||||
@@ -1,96 +1,96 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.2.3
|
||||
* Formats forum search results
|
||||
* Last Updated: $Date: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $author$
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Forums
|
||||
* @link http://hatynka.in
|
||||
* @version $Rev: 8644 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class search_format_core extends search_format
|
||||
{
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param object ipsRegistry
|
||||
* @return @e void
|
||||
*/
|
||||
public function __construct( ipsRegistry $registry )
|
||||
{
|
||||
parent::__construct( $registry );
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse search results
|
||||
*
|
||||
* @param array $r Search result
|
||||
* @return array $html Blocks of HTML
|
||||
*/
|
||||
public function parseAndFetchHtmlBlocks( $rows )
|
||||
{
|
||||
return parent::parseAndFetchHtmlBlocks( $rows );
|
||||
}
|
||||
|
||||
/**
|
||||
* Formats the forum search result for display
|
||||
*
|
||||
* @param array $search_row Array of data
|
||||
* @return mixed Formatted content, ready for display, or array containing a $sub section flag, and content
|
||||
*/
|
||||
public function formatContent( $data )
|
||||
{
|
||||
return array( ipsRegistry::getClass( 'output' )->getTemplate( 'search' )->helpSearchResult( $data, IPSSearchRegistry::get('opt.searchType') == 'titles' ? true : false ), 0 );
|
||||
}
|
||||
|
||||
/**
|
||||
* Formats / grabs extra data for results
|
||||
* Takes an array of IDS (can be IDs from anything) and returns an array of expanded data.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function processResults( $ids )
|
||||
{
|
||||
$rows = array();
|
||||
|
||||
foreach( $ids as $i => $d )
|
||||
{
|
||||
$rows[ $i ] = $this->genericizeResults( $d );
|
||||
}
|
||||
|
||||
return $rows;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reassigns fields in a generic way for results output
|
||||
*
|
||||
* @param array $r
|
||||
* @return array
|
||||
*/
|
||||
public function genericizeResults( $r )
|
||||
{
|
||||
$r['app'] = 'core';
|
||||
$r['content'] = $r['title'];
|
||||
$r['content_title'] = $r['description'];
|
||||
$r['updated'] = 0;
|
||||
$r['type_2'] = 'help';
|
||||
$r['type_id_2'] = $r['id'];
|
||||
|
||||
return $r;
|
||||
}
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* Formats forum search results
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $author$
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @subpackage Forums
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 10914 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class search_format_core extends search_format
|
||||
{
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param object ipsRegistry
|
||||
* @return @e void
|
||||
*/
|
||||
public function __construct( ipsRegistry $registry )
|
||||
{
|
||||
parent::__construct( $registry );
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse search results
|
||||
*
|
||||
* @param array $r Search result
|
||||
* @return array $html Blocks of HTML
|
||||
*/
|
||||
public function parseAndFetchHtmlBlocks( $rows )
|
||||
{
|
||||
return parent::parseAndFetchHtmlBlocks( $rows );
|
||||
}
|
||||
|
||||
/**
|
||||
* Formats the forum search result for display
|
||||
*
|
||||
* @param array $search_row Array of data
|
||||
* @return mixed Formatted content, ready for display, or array containing a $sub section flag, and content
|
||||
*/
|
||||
public function formatContent( $data )
|
||||
{
|
||||
return array( ipsRegistry::getClass( 'output' )->getTemplate( 'search' )->helpSearchResult( $data, IPSSearchRegistry::get('opt.searchType') == 'titles' ? true : false ), 0 );
|
||||
}
|
||||
|
||||
/**
|
||||
* Formats / grabs extra data for results
|
||||
* Takes an array of IDS (can be IDs from anything) and returns an array of expanded data.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function processResults( $ids )
|
||||
{
|
||||
$rows = array();
|
||||
|
||||
foreach( $ids as $i => $d )
|
||||
{
|
||||
$rows[ $i ] = $this->genericizeResults( $d );
|
||||
}
|
||||
|
||||
return $rows;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reassigns fields in a generic way for results output
|
||||
*
|
||||
* @param array $r
|
||||
* @return array
|
||||
*/
|
||||
public function genericizeResults( $r )
|
||||
{
|
||||
$r['app'] = 'core';
|
||||
$r['content'] = $r['title'];
|
||||
$r['content_title'] = $r['description'];
|
||||
$r['updated'] = 0;
|
||||
$r['type_2'] = 'help';
|
||||
$r['type_id_2'] = $r['id'];
|
||||
|
||||
return $r;
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,10 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -2,11 +2,11 @@
|
||||
/**
|
||||
* @file plugin_attachments.php Shared media plugin: attachments
|
||||
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
||||
* $License: This is NULLED!
|
||||
* $License: http://www.invisionpower.com/company/standards.php#license$
|
||||
* $Author: rtissier $
|
||||
* @since 3/8/2011
|
||||
* $LastChangedDate: 2011-03-16 19:10:59 -0400 (Wed, 16 Mar 2011) $
|
||||
* @version v3.2.3
|
||||
* @version v3.3.4
|
||||
* $Revision: 8108 $
|
||||
*/
|
||||
|
||||
|
||||
@@ -3,18 +3,18 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.2.3
|
||||
* IP.Board v3.3.4
|
||||
* Sphinx template file
|
||||
* Last Updated: $Date: 2011-08-31 20:57:38 -0400 (Wed, 31 Aug 2011) $
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license This is NULLED!
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @subpackage Forums
|
||||
* @link http://hatynka.in
|
||||
* @version $Rev: 9438 $
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 10914 $
|
||||
* @since 3.0.0
|
||||
*
|
||||
*/
|
||||
@@ -32,14 +32,14 @@ $appSphinxTemplate = <<<EOF
|
||||
source <!--SPHINX_CONF_PREFIX-->core_tags_search_main : <!--SPHINX_CONF_PREFIX-->ipb_source_config
|
||||
{
|
||||
# Set our forum PID counter
|
||||
<!--SPHINX_DB_SET_NAMES-->
|
||||
sql_query_pre = REPLACE INTO <!--SPHINX_DB_PREFIX-->cache_store VALUES( 'sphinx_core_tags_counter', (SELECT max(tag_id) FROM <!--SPHINX_DB_PREFIX-->core_tags), 0, UNIX_TIMESTAMP(), 0 )
|
||||
|
||||
# Query posts for the main source
|
||||
sql_query = SELECT t.tag_id, t.tag_id as search_id, t.tag_added, t.tag_member_id, t.tag_meta_id, t.tag_meta_parent_id, t.tag_text, t.tag_meta_app, t.tag_meta_area, \
|
||||
p.tag_perm_text, p.tag_perm_visible \
|
||||
sql_query = SELECT t.tag_id, t.tag_id as search_id, t.tag_added, t.tag_member_id, t.tag_meta_id, t.tag_meta_parent_id, t.tag_text, t.tag_meta_app, REPLACE( t.tag_meta_area, '-', '_' ) as tag_meta_area, \
|
||||
CONCAT( ',', p.tag_perm_text, ',') as tag_perm_text ,p.tag_perm_visible \
|
||||
FROM <!--SPHINX_DB_PREFIX-->core_tags t \
|
||||
LEFT JOIN <!--SPHINX_DB_PREFIX-->core_tags_perms p ON ( t.tag_aai_lookup=p.tag_perm_aai_lookup ) \
|
||||
WHERE t.tag_id <= ( SELECT cs_value FROM <!--SPHINX_DB_PREFIX-->cache_store WHERE cs_key='sphinx_core_tags_counter' )
|
||||
LEFT JOIN <!--SPHINX_DB_PREFIX-->core_tags_perms p ON ( t.tag_aai_lookup=p.tag_perm_aai_lookup )
|
||||
|
||||
# Fields
|
||||
sql_attr_uint = search_id
|
||||
@@ -54,11 +54,12 @@ source <!--SPHINX_CONF_PREFIX-->core_tags_search_main : <!--SPHINX_CONF_PREFIX--
|
||||
source <!--SPHINX_CONF_PREFIX-->core_tags_search_delta : <!--SPHINX_CONF_PREFIX-->core_tags_search_main
|
||||
{
|
||||
# Override the base sql_query_pre
|
||||
<!--SPHINX_DB_SET_NAMES-->
|
||||
sql_query_pre =
|
||||
|
||||
# Query posts for the main source
|
||||
sql_query = SELECT t.tag_id, t.tag_id as search_id, t.tag_added, t.tag_member_id, t.tag_meta_id, t.tag_meta_parent_id, t.tag_text, t.tag_meta_app, t.tag_meta_area, \
|
||||
p.tag_perm_text, p.tag_perm_visible \
|
||||
sql_query = SELECT t.tag_id, t.tag_id as search_id, t.tag_added, t.tag_member_id, t.tag_meta_id, t.tag_meta_parent_id, t.tag_text, t.tag_meta_app, REPLACE( t.tag_meta_area, '-', '_' ) as tag_meta_area, \
|
||||
CONCAT( ',', p.tag_perm_text, ',') as tag_perm_text ,p.tag_perm_visible \
|
||||
FROM <!--SPHINX_DB_PREFIX-->core_tags t \
|
||||
LEFT JOIN <!--SPHINX_DB_PREFIX-->core_tags_perms p ON ( t.tag_aai_lookup=p.tag_perm_aai_lookup ) \
|
||||
WHERE t.tag_id > ( SELECT cs_value FROM <!--SPHINX_DB_PREFIX-->cache_store WHERE cs_key='sphinx_core_tags_counter' )
|
||||
@@ -73,7 +74,7 @@ index <!--SPHINX_CONF_PREFIX-->core_tags_search_main
|
||||
mlock = 0
|
||||
morphology = none
|
||||
min_word_len = 2
|
||||
charset_type = utf-8
|
||||
charset_type = sbcs
|
||||
html_strip = 0
|
||||
#infix_fields = tag_text
|
||||
#min_infix_len = 3
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
/**
|
||||
* @file warnings.php Warnings extension for core
|
||||
*~TERABYTE_DOC_READY~
|
||||
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
||||
* $License: http://www.invisionpower.com/company/standards.php#license$
|
||||
* $Author: bfarber $ (Original: Mark)
|
||||
* @since -
|
||||
* $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* @version v3.3.4
|
||||
* $Revision: 10914 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
||||
exit();
|
||||
}
|
||||
|
||||
/**
|
||||
* @class warnings_core
|
||||
* @brief Warnings Extension for core
|
||||
*/
|
||||
class warnings_core
|
||||
{
|
||||
/**
|
||||
* Get Content URL
|
||||
*
|
||||
* @param array $warning Row from members_warn_logs
|
||||
* @return @e array array( url => URL to the content the warning came from, title => Title )
|
||||
*/
|
||||
public function getContentUrl( $warning )
|
||||
{
|
||||
ipsRegistry::getClass('class_localization')->loadLanguageFile( array( 'public_profile' ), 'members' );
|
||||
|
||||
if ( $warning['wl_content_id1'] == 'mreport' )
|
||||
{
|
||||
$report = ipsRegistry::DB()->buildAndFetch( array( 'select' => '*', 'from' => 'rc_reports_index', 'where' => "id=" . intval( $warning['wl_content_id2'] ) ) );
|
||||
|
||||
if ( ! empty($report['id']) )
|
||||
{
|
||||
return array( 'url' => ipsRegistry::getClass('output')->buildUrl( "app=core&module=reports&do=show_report&rid={$report['id']}" ), 'title' => $report['title'] );
|
||||
}
|
||||
}
|
||||
elseif ( $warning['wl_content_id1'] == 'core-reports' )
|
||||
{
|
||||
$exploded = explode( '-', $warning['wl_content_id2'] );
|
||||
|
||||
require_once( IPS_ROOT_PATH . 'sources/classes/comments/bootstrap.php' );/*noLibHook*/
|
||||
$comments = classes_comments_bootstrap::controller( $warning['wl_content_id1'] );
|
||||
|
||||
$parent = $comments->remapFromLocal( $comments->fetchParent( $exploded[0] ), 'parent' );
|
||||
|
||||
if ( ! empty($parent['parent_id']) )
|
||||
{
|
||||
return array( 'url' => ipsRegistry::getClass('output')->buildUrl( "app=core&module=global§ion=comments&fromApp={$warning['wl_content_id1']}&do=findComment&parentId={$exploded[0]}&comment_id={$exploded[1]}" ), 'title' => $parent['parent_title'] );
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user