diff --git a/components/pastebin.php b/components/pastebin.php index dbf91546ab14d899cf04a468861c3f81c3d5a617..0e3ac90b895abe7fbc3e6bb9124eb142beb7c891 100755 --- a/components/pastebin.php +++ b/components/pastebin.php @@ -39,7 +39,8 @@ define('_SCRIPT_NAME', 'PasteBin/'); define('_TABLE_NAME', 'pastebin'); $smarty->assign('urifragment', '/Tools/PasteBin/'); -$smarty->assign('uri', 'http://'.$_SERVER['SERVER_NAME'].'/pb/'); +$pburi = 'https://'.$_SERVER['SERVER_NAME'].$baseurl; +$smarty->assign('uri', $pburi.'/pb/'); // Init $id = ''; @@ -168,6 +169,11 @@ if (isset($_POST['code'])) { 'INSERT INTO ' . _TABLE_NAME . ' ( id, code, username, retain_til, language) ' . 'VALUES (?, ?, ?, ?, ?)', array( $id, $code, $session->username, $retainTil, $pblang)); + + //bump user to uri of newly pasted item + header('Status: 303 See Other'); + header("Location: $pburi/Tools/PasteBin/$id"); + $userInfo = 'Created By ' . $session->username . ' at ' . date('Y/m/d H:i'); $smarty->assign('id', $id); $smarty->assign('userInfo', $userInfo);