Changeset 10022
- Timestamp:
- 11/28/08 12:33:37 (1 month ago)
- Files:
-
- branches/0.8/jaws/html/gadgets/Blog/HTML.php (modified) (2 diffs)
- branches/0.8/jaws/html/gadgets/Chatbox/HTML.php (modified) (3 diffs)
- branches/0.8/jaws/html/gadgets/Contact/HTML.php (modified) (5 diffs)
- branches/0.8/jaws/html/gadgets/LinkDump/HTML.php (modified) (1 diff)
- branches/0.8/jaws/html/gadgets/Poll/HTML.php (modified) (1 diff)
- branches/0.8/jaws/html/gadgets/Users/HTML.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/0.8/jaws/html/gadgets/Blog/HTML.php
r9772 r10022 1361 1361 is_null($post['blog_name']) || is_null($post['excerpt'])) { 1362 1362 require_once JAWS_PATH . 'include/Jaws/Header.php'; 1363 Jaws_Header:: Location($GLOBALS['app']->getSiteURL().'/');1363 Jaws_Header::Referrer(); 1364 1364 } 1365 1365 … … 1381 1381 if (trim($id) == '') { 1382 1382 require_once JAWS_PATH . 'include/Jaws/Header.php'; 1383 Jaws_Header:: Location($GLOBALS['app']->getSiteURL().'/');1383 Jaws_Header::Referrer(); 1384 1384 } elseif (empty($title) && empty($url) && empty($blogname)) { 1385 1385 require_once JAWS_PATH . 'include/Jaws/Header.php'; branches/0.8/jaws/html/gadgets/Chatbox/HTML.php
r9759 r10022 47 47 $model = $GLOBALS['app']->LoadGadget('Chatbox', 'Model'); 48 48 49 $urlRedirect = 'index.php';50 if (isset($_SERVER['HTTP_REFERER']) && !empty($_SERVER['HTTP_REFERER'])) {51 $urlRedirect = $_SERVER['HTTP_REFERER'];52 }53 54 49 if (trim($post['message']) == ''|| trim($post['name']) == '') { 55 50 $GLOBALS['app']->Session->PushSimpleResponse(_t('CHATBOX_DONT_SEND_EMPTY_MESSAGES'), 'Chatbox'); 56 Jaws_Header:: Location($urlRedirect);51 Jaws_Header::Referrer(); 57 52 } 58 53 … … 64 59 if (!$captcha->Check()) { 65 60 $GLOBALS['app']->Session->PushSimpleResponse(_t('GLOBAL_CAPTCHA_ERROR_DOES_NOT_MATCH'), 'Chatbox'); 66 Jaws_Header:: Location($urlRedirect);61 Jaws_Header::Referrer(); 67 62 } 68 63 } … … 76 71 } 77 72 78 Jaws_Header:: Location($urlRedirect);73 Jaws_Header::Referrer(); 79 74 } 80 75 } branches/0.8/jaws/html/gadgets/Contact/HTML.php
r9759 r10022 88 88 require_once JAWS_PATH . 'include/Jaws/Header.php'; 89 89 90 $urlRedirect = 'index.php';91 if (isset($_SERVER['HTTP_REFERER']) && !empty($_SERVER['HTTP_REFERER'])) {92 $urlRedirect = $_SERVER['HTTP_REFERER'];93 }94 95 90 if (trim($post['contact_name']) == '' || 96 91 trim($post['contact_subject']) == '' || … … 98 93 { 99 94 $GLOBALS['app']->Session->PushSimpleResponse(_t('GLOBAL_ERROR_INCOMPLETE_FIELDS'), 'Contact'); 100 Jaws_Header:: Location($urlRedirect);95 Jaws_Header::Referrer(); 101 96 } 102 97 … … 109 104 if (!$captcha->Check()) { 110 105 $GLOBALS['app']->Session->PushSimpleResponse(_t('GLOBAL_CAPTCHA_ERROR_DOES_NOT_MATCH'), 'Contact'); 111 Jaws_Header:: Location($urlRedirect);106 Jaws_Header::Referrer(); 112 107 } 113 108 } … … 118 113 if (Validate::email($post['contact_email'], true) === false) { 119 114 $GLOBALS['app']->Session->PushSimpleResponse(_t('CONTACT_RESULT_BAD_EMAIL_ADDRESS'), 'Contact'); 120 Jaws_Header:: Location($urlRedirect);115 Jaws_Header::Referrer(); 121 116 } 122 117 } … … 151 146 } 152 147 $GLOBALS['app']->Session->PushSimpleResponse($res_msg, 'Contact'); 153 Jaws_Header:: Location($urlRedirect);148 Jaws_Header::Referrer(); 154 149 } 155 150 } branches/0.8/jaws/html/gadgets/LinkDump/HTML.php
r9540 r10022 174 174 175 175 // By default, on the errors stay in the main page 176 Jaws_Header:: Location(BASE_SCRIPT);176 Jaws_Header::Referrer(); 177 177 } 178 178 branches/0.8/jaws/html/gadgets/Poll/HTML.php
r9960 r10022 59 59 } 60 60 61 $urlRedirect = 'index.php';62 if (isset($_SERVER['HTTP_REFERER'])) {63 if (!empty($_SERVER['HTTP_REFERER'])) {64 $urlRedirect = strip_tags($_SERVER['HTTP_REFERER']);65 }66 }67 61 require_once JAWS_PATH . 'include/Jaws/Header.php'; 68 Jaws_Header:: Location($urlRedirect);62 Jaws_Header::Referrer(); 69 63 } 70 64 branches/0.8/jaws/html/gadgets/Users/HTML.php
r9759 r10022 157 157 if (empty($username) || $username == 'anonymous') { 158 158 require_once JAWS_PATH . 'include/Jaws/Header.php'; 159 Jaws_Header:: Location($GLOBALS['app']->GetSiteURL().'/');159 Jaws_Header::Referrer(); 160 160 } 161 161 … … 228 228 function Login() 229 229 { 230 $urlRedirect = 'index.php';231 if (isset($_SERVER['HTTP_REFERER']) && !empty($_SERVER['HTTP_REFERER'])) {232 $urlRedirect = $_SERVER['HTTP_REFERER'];233 }234 235 230 $request =& Jaws_Request::getInstance(); 236 231 $post = $request->get(array('username', 'password', 'remember'), 'post'); … … 242 237 243 238 require_once JAWS_PATH . 'include/Jaws/Header.php'; 244 Jaws_Header::Location($urlRedirect); 245 exit; 239 Jaws_Header::Referrer(); 246 240 } 247 241 … … 257 251 } 258 252 259 $urlRedirect = $GLOBALS['app']->GetSiteURL().'/';260 if (isset($_SERVER['HTTP_REFERER']) && !empty($_SERVER['HTTP_REFERER'])) {261 $urlRedirect = $_SERVER['HTTP_REFERER'];262 }263 264 253 require_once JAWS_PATH . 'include/Jaws/Header.php'; 265 Jaws_Header:: Location($urlRedirect);254 Jaws_Header::Referrer(); 266 255 } 267 256 … … 379 368 if (!empty($username) && $username != 'anonymous') { 380 369 require_once JAWS_PATH . 'include/Jaws/Header.php'; 381 Jaws_Header:: Location($GLOBALS['app']->GetSiteURL().'/');370 Jaws_Header::Referrer(); 382 371 } else { 383 372 $tpl->SetBlock('register');
