mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 20:30:39 +02:00
Issue #1026 - Added redirection debug info. Redirection after 'Update reply' corrected.
This commit is contained in:
@@ -1842,11 +1842,11 @@ class e107forum
|
|||||||
$FORUM_CRUMB['sitename']['value'] = str_replace($search, $replace, $FORUM_CRUMB['sitename']['value']);
|
$FORUM_CRUMB['sitename']['value'] = str_replace($search, $replace, $FORUM_CRUMB['sitename']['value']);
|
||||||
|
|
||||||
$search = array('{FORUMS_TITLE}', '{FORUMS_HREF}');
|
$search = array('{FORUMS_TITLE}', '{FORUMS_HREF}');
|
||||||
$replace = array(LAN_PLUGIN_FORUM_NAME, e107::getUrl()->create('forum/forum/main'));
|
$replace = array(LAN_PLUGIN_FORUM_NAME, e107::url('forum','index'));
|
||||||
$FORUM_CRUMB['forums']['value'] = str_replace($search, $replace, $FORUM_CRUMB['forums']['value']);
|
$FORUM_CRUMB['forums']['value'] = str_replace($search, $replace, $FORUM_CRUMB['forums']['value']);
|
||||||
|
|
||||||
$search = array('{PARENT_TITLE}', '{PARENT_HREF}');
|
$search = array('{PARENT_TITLE}', '{PARENT_HREF}');
|
||||||
$replace = array($tp->toHTML($forumInfo['parent_name']), e107::getUrl()->create('forum/forum/main')."#".$frm->name2id($forumInfo['parent_name']));
|
$replace = array($tp->toHTML($forumInfo['parent_name']), e107::url('forum','index')."#".$frm->name2id($forumInfo['parent_name']));
|
||||||
$FORUM_CRUMB['parent']['value'] = str_replace($search, $replace, $FORUM_CRUMB['parent']['value']);
|
$FORUM_CRUMB['parent']['value'] = str_replace($search, $replace, $FORUM_CRUMB['parent']['value']);
|
||||||
|
|
||||||
if($forumInfo['forum_sub'])
|
if($forumInfo['forum_sub'])
|
||||||
|
@@ -93,7 +93,7 @@ class forum_post_handler
|
|||||||
{
|
{
|
||||||
if(isset($_POST['fjsubmit']))
|
if(isset($_POST['fjsubmit']))
|
||||||
{
|
{
|
||||||
header('Location:'.e107::getUrl()->create('forum/forum/view', array('id'=>(int) $_POST['forumjump']), '', 'full=1&encode=0'));
|
$this->redirect(e107::getUrl()->create('forum/forum/view', array('id'=>(int) $_POST['forumjump']), '', 'full=1&encode=0'));
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -208,6 +208,16 @@ class forum_post_handler
|
|||||||
*/
|
*/
|
||||||
private function redirect($url)
|
private function redirect($url)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if(E107_DEBUG_LEVEL > 0)
|
||||||
|
{
|
||||||
|
require_once(HEADERF);
|
||||||
|
e107::getRender()->tablerender('Debug', "Redirecting to: <a href='".$url."'>".$url."</a>");
|
||||||
|
require_once(FOOTERF);
|
||||||
|
exit;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
e107::getRedirect()->go($url);
|
e107::getRedirect()->go($url);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -865,6 +875,7 @@ class forum_post_handler
|
|||||||
|
|
||||||
if ($this->forumObj->prefs->get('redirect'))
|
if ($this->forumObj->prefs->get('redirect'))
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->redirect($threadLink);
|
$this->redirect($threadLink);
|
||||||
// header('location:'.e107::getUrl()->create('forum/thread/last', $postInfo, array('encode' => false, 'full' => true)));
|
// header('location:'.e107::getUrl()->create('forum/thread/last', $postInfo, array('encode' => false, 'full' => true)));
|
||||||
exit;
|
exit;
|
||||||
@@ -1030,11 +1041,12 @@ class forum_post_handler
|
|||||||
e107::getCache()->clear('newforumposts');
|
e107::getCache()->clear('newforumposts');
|
||||||
|
|
||||||
|
|
||||||
$url = e107::getUrl()->create('forum/thread/post', "id={$this->data['post_id']}", 'encode=0&full=1'); // XXX what data is available, find thread name
|
// $url = e107::getUrl()->create('forum/thread/post', "id={$this->data['post_id']}", 'encode=0&full=1'); // XXX what data is available, find thread name
|
||||||
|
|
||||||
// $url = e107::url('forum','topic',$this->data,true)."&f=post"; //FIXME
|
$url = e107::url('forum','topic',$this->data,true); // ."&f=post";
|
||||||
|
|
||||||
|
$this->redirect($url);
|
||||||
|
|
||||||
header('location:'.$url);
|
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1190,7 +1202,7 @@ exit;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
require_once(e_PLUGIN.'forum/forum_class.php');
|
require_once(e_PLUGIN.'forum/forum_class.php');
|
||||||
$forum = new e107forum();
|
$forum = new e107forum();
|
||||||
|
|
||||||
@@ -1304,7 +1316,7 @@ if (isset($_POST['submitpoll']))
|
|||||||
echo $FORUMPOLLPOSTED;
|
echo $FORUMPOLLPOSTED;
|
||||||
require_once(FOOTERF);
|
require_once(FOOTERF);
|
||||||
exit;
|
exit;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
/*if (isset($_POST['fpreview']))
|
/*if (isset($_POST['fpreview']))
|
||||||
{
|
{
|
||||||
@@ -1371,7 +1383,7 @@ if (isset($_POST['submitpoll']))
|
|||||||
$eaction = false;
|
$eaction = false;
|
||||||
}
|
}
|
||||||
}*/
|
}*/
|
||||||
|
/*
|
||||||
if (isset($_POST['newthread']) || isset($_POST['reply']))
|
if (isset($_POST['newthread']) || isset($_POST['reply']))
|
||||||
{
|
{
|
||||||
$postInfo = array();
|
$postInfo = array();
|
||||||
@@ -1432,7 +1444,7 @@ if (isset($_POST['newthread']) || isset($_POST['reply']))
|
|||||||
}
|
}
|
||||||
|
|
||||||
// $postInfo['_FIELD_TYPES']['post_attachments'] = 'array';
|
// $postInfo['_FIELD_TYPES']['post_attachments'] = 'array';
|
||||||
$postInfo['post_attachments'] = e107::serialize($newValues); //FIXME XXX - broken encoding when saved to DB.
|
$postInfo['post_attachments'] = e107::serialize($newValues);
|
||||||
}
|
}
|
||||||
// var_dump($uploadResult);
|
// var_dump($uploadResult);
|
||||||
|
|
||||||
@@ -1555,7 +1567,7 @@ if (isset($_POST['update_thread']))
|
|||||||
// exit;
|
// exit;
|
||||||
if (!$_POST['subject'] || !$_POST['post'])
|
if (!$_POST['subject'] || !$_POST['post'])
|
||||||
{
|
{
|
||||||
$error = "<div style='text-align:center'>".LAN_FORUM_3007."</div>"; // TODO $mes
|
$error = "<div style='text-align:center'>".LAN_FORUM_3007."</div>";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1600,7 +1612,7 @@ if (isset($_POST['update_reply']))
|
|||||||
{
|
{
|
||||||
if (!$_POST['post'])
|
if (!$_POST['post'])
|
||||||
{
|
{
|
||||||
$error = "<div style='text-align:center'>".LAN_FORUM_3007.'</div>'; // TODO $mes
|
$error = "<div style='text-align:center'>".LAN_FORUM_3007.'</div>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1659,9 +1671,10 @@ if ($action == 'edit' || $action == 'quote')
|
|||||||
{
|
{
|
||||||
|
|
||||||
//remote [hide] bbcode, or else it doesn't hide stuff too well :)
|
//remote [hide] bbcode, or else it doesn't hide stuff too well :)
|
||||||
/* $post = preg_replace('#\[hide].*?\[/hide]#s', '', $post);
|
// $post = preg_replace('#\[hide].*?\[/hide]#s', '', $post);
|
||||||
$quoteName = ($postInfo['user_name'] ? $postInfo['user_name'] : $postInfo['post_user_anon']);
|
// $quoteName = ($postInfo['user_name'] ? $postInfo['user_name'] : $postInfo['post_user_anon']);
|
||||||
$post = "[quote={$quoteName}]\n".$post."\n[/quote]\n";*/
|
// $post = "[quote={$quoteName}]\n".$post."\n[/quote]\n";
|
||||||
|
|
||||||
// $eaction = true;
|
// $eaction = true;
|
||||||
// $action = 'reply';
|
// $action = 'reply';
|
||||||
|
|
||||||
@@ -1762,6 +1775,6 @@ function image_getsize($fname)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
require_once(FOOTERF);
|
require_once(FOOTERF);*/
|
||||||
|
|
||||||
?>
|
?>
|
Reference in New Issue
Block a user