mirror of
https://github.com/e107inc/e107.git
synced 2025-08-19 12:51:52 +02:00
Update forum_t to forum_thread in SQL
This commit is contained in:
@@ -154,7 +154,7 @@ if(isset($_POST['update_subs']))
|
||||
if ($sql->delete("forum", "forum_id='$id' "))
|
||||
{
|
||||
$msg .= FORLAN_150." ". LAN_ID.":"." ".$id." ".LAN_DELETED."<br />";
|
||||
$cnt = $sql->delete("forum_t", "thread_forum_id = {$id}");
|
||||
$cnt = $sql->delete("forum_thread", "thread_forum_id = {$id}");
|
||||
$msg .= $cnt." ".FORLAN_152." ".LAN_DELETED."<br />";
|
||||
}
|
||||
}
|
||||
|
@@ -926,7 +926,7 @@ class e107forum
|
||||
$lp_user = 'NULL';
|
||||
if($updateThreads == true)
|
||||
{
|
||||
if ($sql2->select('forum_t', 'thread_id', "thread_forum_id = $id AND thread_parent = 0"))
|
||||
if ($sql2->select('forum_thread', 'thread_id', "thread_forum_id = $id AND thread_parent = 0"))
|
||||
{
|
||||
while ($row = $sql2->fetch(MYSQL_ASSOC))
|
||||
{
|
||||
@@ -1409,8 +1409,8 @@ class e107forum
|
||||
|
||||
$qry = "
|
||||
SELECT ft.*, fp.thread_name as post_subject, fp.thread_total_replies as replies, u.user_id, u.user_name, f.forum_class
|
||||
FROM #forum_t AS ft
|
||||
LEFT JOIN #forum_t as fp ON fp.thread_id = ft.thread_parent
|
||||
FROM #forum_thread AS ft
|
||||
LEFT JOIN #forum_thread as fp ON fp.thread_id = ft.thread_parent
|
||||
LEFT JOIN #user as u ON u.user_id = SUBSTRING_INDEX(ft.thread_user,'.',1)
|
||||
LEFT JOIN #forum as f ON f.forum_id = ft.thread_forum_id
|
||||
WHERE ft.thread_datestamp > ".USERLV. "
|
||||
|
@@ -36,7 +36,7 @@ $id = (int)$_GET['id'];
|
||||
$action = $_GET['f'];
|
||||
|
||||
$qry = "
|
||||
SELECT t.*, f.*, fp.forum_id AS forum_parent_id FROM #forum_t as t
|
||||
SELECT t.*, f.*, fp.forum_id AS forum_parent_id FROM #forum_thread as t
|
||||
LEFT JOIN #forum AS f ON t.thread_forum_id = f.forum_id
|
||||
LEFT JOIN #forum AS fp ON fp.forum_id = f.forum_parent
|
||||
WHERE t.thread_id = {$thread_id}
|
||||
@@ -60,11 +60,11 @@ require_once(HEADERF);
|
||||
if (isset($_POST['deletepollconfirm']))
|
||||
{
|
||||
$sql->delete("poll", "poll_id='".intval($thread_parent)."' ");
|
||||
$sql->select("forum_t", "*", "thread_id='".$thread_id."' ");
|
||||
$sql->select("forum_thread", "*", "thread_id='".$thread_id."' ");
|
||||
$row = $sql->fetch();
|
||||
extract($row);
|
||||
$thread_name = str_replace("[poll] ", "", $thread_name);
|
||||
$sql->update("forum_t", "thread_name='$thread_name' WHERE thread_id='$thread_id' ");
|
||||
$sql->update("forum_thread", "thread_name='$thread_name' WHERE thread_id='$thread_id' ");
|
||||
$message = FORCONF_5;
|
||||
$url = e_PLUGIN."forum/forum_viewtopic.php?".$thread_id;
|
||||
}
|
||||
|
@@ -2,14 +2,10 @@
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2009 e107 Inc (e107.org)
|
||||
* Copyright (C) 2008-2013 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
*
|
||||
*
|
||||
* $URL$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
require_once('../../class2.php');
|
||||
|
@@ -2,14 +2,10 @@
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2009 e107 Inc (e107.org)
|
||||
* Copyright (C) 2008-2013 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
*
|
||||
*
|
||||
* $URL$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
require_once("../../class2.php");
|
||||
@@ -57,7 +53,7 @@ if($msg)
|
||||
$fi = new e_file;
|
||||
$mask = ".*_".USERID."_FT.*";
|
||||
$fileList = $fi->get_files(e_UPLOAD, $mask);
|
||||
if($sql->db_Select('forum_t','thread_id, thread_thread, thread_parent', "thread_thread REGEXP '.*_".USERID."_FT.*'"))
|
||||
if($sql->db_Select('forum_thread','thread_id, thread_thread, thread_parent', "thread_thread REGEXP '.*_".USERID."_FT.*'"))
|
||||
{
|
||||
$threadList = $sql->db_getList();
|
||||
}
|
||||
|
@@ -2,16 +2,10 @@
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2009 e107 Inc (e107.org)
|
||||
* Copyright (C) 2008-2013 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
*
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/forum/search/search_parser.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
@@ -43,10 +37,10 @@ $no_results = LAN_198;
|
||||
|
||||
$where = "f.forum_class REGEXP '".e_CLASS_REGEXP."' AND fp.forum_class REGEXP '".e_CLASS_REGEXP."' AND".$advanced_where;
|
||||
$order = array('thread_datestamp' => DESC);
|
||||
$table = "forum_t AS t LEFT JOIN #user AS u ON SUBSTRING_INDEX(t.thread_user,'.',1) = u.user_id
|
||||
$table = "forum_thread AS t LEFT JOIN #user AS u ON SUBSTRING_INDEX(t.thread_user,'.',1) = u.user_id
|
||||
LEFT JOIN #forum AS f ON t.thread_forum_id = f.forum_id
|
||||
LEFT JOIN #forum AS fp ON f.forum_parent = fp.forum_id
|
||||
LEFT JOIN #forum_t AS tp ON t.thread_parent = tp.thread_id";
|
||||
LEFT JOIN #forum_thread AS tp ON t.thread_parent = tp.thread_id";
|
||||
|
||||
$ps = $sch -> parsesearch($table, $return_fields, $search_fields, $weights, 'search_forum', $no_results, $where, $order);
|
||||
$text .= $ps['text'];
|
||||
|
Reference in New Issue
Block a user