Changeset 2801
- Timestamp:
- 11/12/08 09:41:15 (2 months ago)
- Location:
- trunk/htdocs/system
- Files:
-
- 4 modified
-
admin/login.php (modified) (1 diff)
-
classes/adminhandler.php (modified) (10 diffs)
-
classes/feedbackhandler.php (modified) (3 diffs)
-
classes/utils.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/htdocs/system/admin/login.php
r2725 r2801 65 65 password_label = $('label[for=habari_password]'); 66 66 // to fix autofill issues, we need to check the password field on every keyup 67 $('#habari_username').keyup( function() { 67 $('#habari_username').keyup( function(){ 68 setTimeout( "labeler.check( password_label );", 10 ); 69 } ).click( function(){ 68 70 setTimeout( "labeler.check( password_label );", 10 ); 69 71 } ); 70 // for autofill without user input71 setTimeout( function(){ labeler.check( password_label ); }, 10 );72 72 }) 73 73 </script> -
trunk/htdocs/system/classes/adminhandler.php
r2786 r2801 27 27 } 28 28 else { 29 if ( !empty( $_POST ) ) {30 Session::add_to_set( 'last_form_data', $_POST, 'post' );31 Session::error( _t('We saved the last form you posted. Log back in to continue its submission.'), 'expired_form_submission' );32 }33 if ( !empty( $_GET ) ) {34 Session::add_to_set( 'last_form_data', $_GET, 'get' );35 Session::error( _t('We saved the last form you posted. Log back in to continue its submission.'), 'expired_form_submission' );36 }37 Utils::redirect( URL::get( 'user', array( 'page' => 'login' ) ) );29 if ( !empty( $_POST ) ) { 30 Session::add_to_set( 'last_form_data', $_POST, 'post' ); 31 Session::error( _t('We saved the last form you posted. Log back in to continue its submission.'), 'expired_form_submission' ); 32 } 33 if ( !empty( $_GET ) ) { 34 Session::add_to_set( 'last_form_data', $_GET, 'get' ); 35 Session::error( _t('We saved the last form you posted. Log back in to continue its submission.'), 'expired_form_submission' ); 36 } 37 Utils::redirect( URL::get( 'user', array( 'page' => 'login' ) ) ); 38 38 } 39 39 exit; … … 297 297 $form->save(); 298 298 Utils::redirect(); 299 die();300 299 } 301 300 … … 779 778 780 779 Utils::redirect( URL::get( 'admin', $results ) ); 781 782 780 } 783 781 … … 1056 1054 if ( !isset( $_REQUEST['importer'] ) ) { 1057 1055 Utils::redirect( URL::get( 'admin', 'page=import' ) ); 1058 exit;1059 1056 } 1060 1057 … … 1184 1181 $comment->delete(); 1185 1182 Utils::redirect(URL::get('admin', 'page=comments')); 1186 exit();1187 1183 } 1188 1184 if ( $action != 'save' ) { … … 1300 1296 Session::notice( _t( 'Deleted all spam comments' ) ); 1301 1297 Utils::redirect(); 1302 die();1303 1298 } 1304 1299 elseif ( isset( $mass_delete ) && $status == Comment::STATUS_UNAPPROVED ) { … … 1307 1302 Session::notice( _t( 'Deleted all unapproved comments' ) ); 1308 1303 Utils::redirect(); 1309 die();1310 1304 } 1311 1305 // if we're updating posts, let's do so: … … 1403 1397 1404 1398 Utils::redirect(); 1405 die();1406 1399 1407 1400 } … … 1876 1869 foreach($_POST as $id => $delete) { 1877 1870 // skip POST elements which are not post ids 1878 if ( preg_match( '/^p\d+/', $id ) && $delete ) {1871 if ( preg_match( '/^p\d+/', $id ) && $delete ) { 1879 1872 $ids[] = substr($id, 1); 1880 1873 } … … 2071 2064 2072 2065 Utils::redirect(); 2073 die();2074 2075 2066 } 2076 2067 -
trunk/htdocs/system/classes/feedbackhandler.php
r2649 r2801 56 56 // now send them back to the form 57 57 Utils::redirect( $post->permalink . '#respond' ); 58 exit();59 58 } 60 59 … … 64 63 Session::error( _t( 'Comments on this post are disabled!' ) ); 65 64 Utils::redirect( $post->permalink ); 66 exit();67 65 } 68 66 … … 101 99 Session::error( _t( 'Comment contains only whitespace/empty comment' ) ); 102 100 Utils::redirect( $post->permalink ); 103 exit();104 101 } 105 102 -
trunk/htdocs/system/classes/utils.php
r2796 r2801 48 48 * Redirects the request to a new URL 49 49 * @param string $url The URL to redirect to, or omit to redirect to the current url 50 **/ 51 public static function redirect( $url = '' ) 50 * @param boolean $continue Whether to continue processing the script (default false for security reasons, cf. #749) 51 **/ 52 public static function redirect( $url = '', $continue = false ) 52 53 { 53 54 if($url == '') { … … 56 57 header('Location: ' . $url, true, 302); 57 58 58 // prevent the rest of the page from loading - we've moved on 59 exit(); 59 if (!$continue) exit; 60 60 } 61 61
