Version 3.2.3

This commit is contained in:
Neo committed 2025-12-19 00:34:03 -08:00
1 parent ae5c01cc78
commit 78706903a2
2641 files changed
+228363 -201264

No files matched your search

@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionboard.com/">IP.Board</a>
<a href="http://www.invisionpower.com">IP.Board</a>
</body>
</html>
@@ -2,19 +2,19 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.1.4
* IP.Board v3.2.3
* Reports content SQL query cache file
* Last Updated: $LastChangedDate: 2010-09-13 17:28:12 -0400 (Mon, 13 Sep 2010) $
* Last Updated: $LastChangedDate: 2011-06-02 18:58:10 -0400 (Thu, 02 Jun 2011) $
* </pre>
*
* @author $Author: terabyte $
* @author $Author: bfarber $
* @author Based on original "Report Center" by Luke Scott
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/community/board/license.html
* @license This is NULLED!
* @package IP.Board
* @subpackage Core
* @link http://www.invisionpower.com
* @version $Rev: 6863 $
* @link http://hatynka.in
* @version $Rev: 8954 $
*
*/
@@ -24,16 +24,14 @@ class report_sql_queries
* Database object handle
*
* @var object
* @access private
*/
private $db;
/**
* Constructor
*
* @access public
* @param object Database reference
* @return void
* @return @e void
*/
public function __construct( &$database )
{
@@ -43,7 +41,6 @@ class report_sql_queries
/**
* Creates a permissions where clause - repeated often, so cached to save us from typing
*
* @access public
* @param array Parameters
* @return sting Where clause
*/
@@ -114,7 +111,6 @@ class report_sql_queries
/**
* Grab the reports for the reported content index page
*
* @access public
* @param array Parameters
* @return string Database query
*/
@@ -123,22 +119,21 @@ class report_sql_queries
$time = time();
return "SELECT rep.*, rcl.my_class, rcl.extra_data, mem.members_display_name as n_updated_by, mem.members_seo_name as n_updated_seoname, mem.member_group_id, MAX(star.points) as points, "
. "((rep.num_reports * stat.points_per_report)+FLOOR((({$time}-rep.date_created)/60)/stat.minutes_to_apoint)) as built_points "
. "((rep.num_reports * stat.points_per_report)+FLOOR((({$time}-rep.date_created)/60)/ CASE WHEN stat.minutes_to_apoint > 0 THEN stat.minutes_to_apoint ELSE 100 END )) as built_points "
. "FROM " . $this->db->obj['sql_tbl_prefix'] . "rc_reports_index rep "
. "LEFT JOIN " . $this->db->obj['sql_tbl_prefix'] . "members mem ON (mem.member_id=rep.updated_by) "
. "LEFT JOIN " . $this->db->obj['sql_tbl_prefix'] . "rc_status stat ON (stat.status=rep.status) "
. "LEFT JOIN " . $this->db->obj['sql_tbl_prefix'] . "rc_status_sev star ON (((rep.num_reports * stat.points_per_report)+FLOOR((({$time}-rep.date_created)/60)/stat.minutes_to_apoint))>=star.points AND star.status=rep.status) "
. "LEFT JOIN " . $this->db->obj['sql_tbl_prefix'] . "rc_status_sev star ON (((rep.num_reports * stat.points_per_report)+FLOOR((({$time}-rep.date_created)/60)/ CASE WHEN stat.minutes_to_apoint > 0 THEN stat.minutes_to_apoint ELSE 100 END ))>=star.points AND star.status=rep.status) "
. "LEFT JOIN " . $this->db->obj['sql_tbl_prefix'] . "rc_classes rcl ON (rcl.com_id=rep.rc_class) "
. "WHERE ".$data['WHERE']." "
. "GROUP BY rep.id "
. "ORDER BY stat.rorder ASC, built_points DESC, rep.date_updated DESC "
. "ORDER BY rep.date_updated DESC, stat.rorder ASC, built_points DESC "
. "LIMIT ".$data['START'].", ".$data['LIMIT'] ;
}
/**
* Grab a report
*
* @access public
* @param array Parameters
* @return string Database query
*/
@@ -148,7 +143,7 @@ class report_sql_queries
return "SELECT mem.*, mem.title as member_title, reps.*, rcl.my_class, MAX(star.points) as points, "
. "rep.*, grop.g_is_supmod as iscop, s.id as session_id, pf.*, "
. "((rep.num_reports * stat.points_per_report)+FLOOR((({$time}-rep.date_created)/60)/stat.minutes_to_apoint)) as built_points "
. "((rep.num_reports * stat.points_per_report)+FLOOR((({$time}-rep.date_created)/60)/ CASE WHEN stat.minutes_to_apoint > 0 THEN stat.minutes_to_apoint ELSE 100 END )) as built_points "
. "FROM " . $this->db->obj['sql_tbl_prefix'] . "rc_reports reps "
. "LEFT JOIN " . $this->db->obj['sql_tbl_prefix'] . "members mem ON (mem.member_id=reps.report_by) "
. "LEFT JOIN " . $this->db->obj['sql_tbl_prefix'] . "profile_portal pf ON (mem.member_id=pf.pp_member_id) "
@@ -156,7 +151,7 @@ class report_sql_queries
. "LEFT JOIN " . $this->db->obj['sql_tbl_prefix'] . "groups grop ON (grop.g_id=mem.member_group_id) "
. "LEFT JOIN " . $this->db->obj['sql_tbl_prefix'] . "sessions s ON (s.member_id=mem.member_id) "
. "LEFT JOIN " . $this->db->obj['sql_tbl_prefix'] . "rc_status stat ON (stat.status=rep.status) "
. "LEFT JOIN " . $this->db->obj['sql_tbl_prefix'] . "rc_status_sev star ON (((rep.num_reports * stat.points_per_report)+FLOOR((({$time}-rep.date_created)/60)/stat.minutes_to_apoint))>=star.points AND star.status=rep.status) "
. "LEFT JOIN " . $this->db->obj['sql_tbl_prefix'] . "rc_status_sev star ON (((rep.num_reports * stat.points_per_report)+FLOOR((({$time}-rep.date_created)/60)/ CASE WHEN stat.minutes_to_apoint > 0 THEN stat.minutes_to_apoint ELSE 100 END ))>=star.points AND star.status=rep.status) "
. "LEFT JOIN " . $this->db->obj['sql_tbl_prefix'] . "rc_classes rcl ON (rcl.com_id=rep.rc_class) "
. "WHERE " . $data['COM'] . " AND reps.rid= " . $data['rid'] . " "
. "GROUP BY reps.id "
@@ -166,7 +161,6 @@ class report_sql_queries
/**
* Grab the new status based on points, etc.
*
* @access public
* @param array Parameters
* @return string Database query
*/
@@ -176,20 +170,8 @@ class report_sql_queries
return "SELECT rep.status, MAX(star.points) as points FROM " . $this->db->obj['sql_tbl_prefix'] . "rc_reports_index rep "
. "LEFT JOIN " . $this->db->obj['sql_tbl_prefix'] . "rc_status stat ON (stat.status=rep.status) "
. "LEFT JOIN " . $this->db->obj['sql_tbl_prefix'] . "rc_status_sev star ON (((rep.num_reports * stat.points_per_report)+FLOOR((({$time}-rep.date_created)/60)/stat.minutes_to_apoint))>=star.points AND star.status=rep.status) "
. "LEFT JOIN " . $this->db->obj['sql_tbl_prefix'] . "rc_status_sev star ON (((rep.num_reports * stat.points_per_report)+FLOOR((({$time}-rep.date_created)/60)/ CASE WHEN stat.minutes_to_apoint > 0 THEN stat.minutes_to_apoint ELSE 100 END ))>=star.points AND star.status=rep.status) "
. "WHERE rep.id=".$data['ID']." "
. "GROUP BY rep.id LIMIT 1";
}
/**
* Get permissions to access a class
*
* @access public
* @param array Parameters
* @return string Database query
*/
public function get_class_permissions( $data=array() )
{
return "SELECT com_id, my_class, extra_data, app FROM " . $this->db->obj['sql_tbl_prefix'] . "rc_classes WHERE onoff=1 AND " . $data['COL'] . " REGEXP '.*,(" . implode( '|' , $data['GROUP_IDS'] ) . "),.*'";
}
}
@@ -0,0 +1,75 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* Tagging Queries
* Last Updated: $LastChangedDate: 2011-08-08 04:56:34 -0400 (Mon, 08 Aug 2011) $
* </pre>
*
* @copyright (c) 2001 - 20011 Invision Power Services, Inc.
* @license This is NULLED!
* @package IP.Board
* @subpackage Core
* @link http://hatynka.in
* @version $Rev: 9375 $
*
*/
class public_tag_sql_queries extends db_driver_mysql
{
/**
* Database object handle
*
* @var object
*/
private $db;
/**
* Constructor
*
* @param object Database reference
* @return @e void
*/
public function __construct( &$obj )
{
$reg = ipsRegistry::instance();
$this->member = $reg->member();
$this->DB = $reg->DB();
$this->tbl = ips_DBRegistry::getPrefix();
}
/*========================================================================*/
/**
* Fetches a single random image (few holes)
* @param array $album
* @return string
*/
public function getCloudData( $data )
{
$where = $data['where'];
$limit = $data['limit'];
$where = ( count( $where ) ) ? ' ' . implode( ' AND ', $where ) : ' 1=1 ';
$prefix = $this->tbl;
$this->DB->allow_sub_select = true;
$query = "SELECT t.tag_text, COUNT(t.tag_text) as times
FROM {$prefix}core_tags t WHERE " . $where . "
AND t.tag_aai_lookup IN( SELECT p.tag_perm_aai_lookup FROM {$prefix}core_tags_perms p WHERE
" . $this->DB->buildWherePermission( $this->member->perm_id_array, 'p.tag_perm_text', true ) . " AND p.tag_perm_visible=1 ) GROUP BY t.tag_text";
if ( ! empty( $limit[0] ) || ! empty( $limit[1] ) )
{
$query .= "\n ORDER BY times DESC\nLIMIT " . $limit[0] . ", " . $limit[1];
}
else
{
$query .= "\n ORDER BY NULL";
}
return $query;
}
}