Index: trunk/extensions/SocialProfile/UserProfile/SpecialUpdateProfile.php |
— | — | @@ -346,10 +346,10 @@ |
347 | 347 | $websites = $s->up_websites; |
348 | 348 | } |
349 | 349 | |
350 | | - if ( !$location_country ) { |
| 350 | + if ( !isset( $location_country ) ) { |
351 | 351 | $location_country = wfMsgForContent( 'user-profile-default-country' ); |
352 | 352 | } |
353 | | - if ( !$hometown_country ) { |
| 353 | + if ( !isset( $hometown_country ) ) { |
354 | 354 | $hometown_country = wfMsgForContent( 'user-profile-default-country' ); |
355 | 355 | } |
356 | 356 | |
— | — | @@ -398,16 +398,16 @@ |
399 | 399 | $form .= '<div class="profile-update"> |
400 | 400 | <p class="profile-update-title">' . wfMsg( 'user-profile-personal-location' ) . '</p> |
401 | 401 | <p class="profile-update-unit-left">' . wfMsg( 'user-profile-personal-city' ) . '</p> |
402 | | - <p class="profile-update-unit"><input type="text" size="25" name="location_city" id="location_city" value="' . $location_city . '" /></p> |
| 402 | + <p class="profile-update-unit"><input type="text" size="25" name="location_city" id="location_city" value="' . ( isset( $location_city ) ? $location_city : '' ) . '" /></p> |
403 | 403 | <div class="cleared"></div> |
404 | 404 | <p class="profile-update-unit-left" id="location_state_label">' . wfMsg( 'user-profile-personal-country' ) . '</p>'; |
405 | 405 | $form .= '<p class="profile-update-unit">'; |
406 | 406 | $form .= '<span id="location_state_form">'; |
407 | 407 | $form .= "</span> |
408 | 408 | <script type=\"text/javascript\"> |
409 | | - displaySection(\"location_state\",\"" . $location_country . "\",\"" . $location_state . "\") |
| 409 | + displaySection(\"location_state\",\"" . $location_country . "\",\"" . ( isset( $location_state ) ? $location_state : '' ) . "\"); |
410 | 410 | </script>"; |
411 | | - $form .= "<select name=\"location_country\" id=\"location_country\" onhhange=\"displaySection('location_state',this.value,'')\"><option></option>"; |
| 411 | + $form .= "<select name=\"location_country\" id=\"location_country\" onchange=\"displaySection('location_state',this.value,'')\"><option></option>"; |
412 | 412 | |
413 | 413 | foreach ( $countries as $country ) { |
414 | 414 | $form .= "<option value=\"{$country}\"" . ( ( $country == $location_country ) ? ' selected="selected"' : '' ) . ">"; |
— | — | @@ -423,14 +423,14 @@ |
424 | 424 | $form .= '<div class="profile-update"> |
425 | 425 | <p class="profile-update-title">' . wfMsg( 'user-profile-personal-hometown' ) . '</p> |
426 | 426 | <p class="profile-update-unit-left">' . wfMsg( 'user-profile-personal-city' ) . '</p> |
427 | | - <p class="profile-update-unit"><input type="text" size="25" name="hometown_city" id="hometown_city" value="' . $hometown_city . '" /></p> |
| 427 | + <p class="profile-update-unit"><input type="text" size="25" name="hometown_city" id="hometown_city" value="' . ( isset( $hometown_city ) ? $hometown_city : '' ) . '" /></p> |
428 | 428 | <div class="cleared"></div> |
429 | 429 | <p class="profile-update-unit-left" id="hometown_state_label">' . wfMsg( 'user-profile-personal-country' ) . '</p> |
430 | 430 | <p class="profile-update-unit">'; |
431 | 431 | $form .= '<span id="hometown_state_form">'; |
432 | 432 | $form .= "</span> |
433 | 433 | <script type=\"text/javascript\"> |
434 | | - displaySection(\"hometown_state\",\"" . $hometown_country . "\",\"" . $hometown_state . "\") |
| 434 | + displaySection(\"hometown_state\",\"" . $hometown_country . "\",\"" . ( isset( $hometown_state ) ? $hometown_state : '' ) . "\"); |
435 | 435 | </script>"; |
436 | 436 | $form .= "<select name=\"hometown_country\" id=\"hometown_country\" onchange=\"displaySection('hometown_state',this.value,'')\"><option></option>"; |
437 | 437 | |
— | — | @@ -448,7 +448,7 @@ |
449 | 449 | $form .= '<div class="profile-update"> |
450 | 450 | <p class="profile-update-title">' . wfMsg( 'user-profile-personal-birthday' ) . '</p> |
451 | 451 | <p class="profile-update-unit-left">' . wfMsg( 'user-profile-personal-birthdate' ) . '</p> |
452 | | - <p class="profile-update-unit"><input type="text" size="25" name="birthday" id="birthday" value="' . $birthday . '" /></p> |
| 452 | + <p class="profile-update-unit"><input type="text" size="25" name="birthday" id="birthday" value="' . ( isset( $birthday ) ? $birthday : '' ) . '" /></p> |
453 | 453 | <div class="cleared"></div> |
454 | 454 | </div><div class="cleared"></div>'; |
455 | 455 | |
— | — | @@ -456,7 +456,7 @@ |
457 | 457 | <p class="profile-update-title">' . wfMsg( 'user-profile-personal-aboutme' ) . '</p> |
458 | 458 | <p class="profile-update-unit-left">' . wfMsg( 'user-profile-personal-aboutme' ) . '</p> |
459 | 459 | <p class="profile-update-unit"> |
460 | | - <textarea name="about" id="about" rows="3" cols="75">' . $about . '</textarea> |
| 460 | + <textarea name="about" id="about" rows="3" cols="75">' . ( isset( $about ) ? $about : '' ) . '</textarea> |
461 | 461 | </p> |
462 | 462 | <div class="cleared"></div> |
463 | 463 | </div> |
— | — | @@ -466,7 +466,7 @@ |
467 | 467 | <p class="profile-update-title">' . wfMsg( 'user-profile-personal-work' ) . '</p> |
468 | 468 | <p class="profile-update-unit-left">' . wfMsg( 'user-profile-personal-occupation' ) . '</p> |
469 | 469 | <p class="profile-update-unit"> |
470 | | - <textarea name="occupation" id="occupation" rows="2" cols="75">' . $occupation . '</textarea> |
| 470 | + <textarea name="occupation" id="occupation" rows="2" cols="75">' . ( isset( $occupation ) ? $occupation : '' ) . '</textarea> |
471 | 471 | </p> |
472 | 472 | <div class="cleared"></div> |
473 | 473 | </div> |
— | — | @@ -476,7 +476,7 @@ |
477 | 477 | <p class="profile-update-title">' . wfMsg( 'user-profile-personal-education' ) . '</p> |
478 | 478 | <p class="profile-update-unit-left">' . wfMsg( 'user-profile-personal-schools' ) . '</p> |
479 | 479 | <p class="profile-update-unit"> |
480 | | - <textarea name="schools" id="schools" rows="2" cols="75">' . $schools . '</textarea> |
| 480 | + <textarea name="schools" id="schools" rows="2" cols="75">' . ( isset( $schools ) ? $schools : '' ) . '</textarea> |
481 | 481 | </p> |
482 | 482 | <div class="cleared"></div> |
483 | 483 | </div> |
— | — | @@ -486,7 +486,7 @@ |
487 | 487 | <p class="profile-update-title">' . wfMsg( 'user-profile-personal-places' ) . '</p> |
488 | 488 | <p class="profile-update-unit-left">' . wfMsg( 'user-profile-personal-placeslived' ) . '</p> |
489 | 489 | <p class="profile-update-unit"> |
490 | | - <textarea name="places" id="places" rows="3" cols="75">' . $places . '</textarea> |
| 490 | + <textarea name="places" id="places" rows="3" cols="75">' . ( isset( $places ) ? $places : '' ) . '</textarea> |
491 | 491 | </p> |
492 | 492 | <div class="cleared"></div> |
493 | 493 | </div> |
— | — | @@ -496,7 +496,7 @@ |
497 | 497 | <p class="profile-update-title">' . wfMsg( 'user-profile-personal-web' ) . '</p> |
498 | 498 | <p class="profile-update-unit-left">' . wfMsg( 'user-profile-personal-websites' ) . '</p> |
499 | 499 | <p class="profile-update-unit"> |
500 | | - <textarea name="websites" id="websites" rows="2" cols="75">' . $websites . '</textarea> |
| 500 | + <textarea name="websites" id="websites" rows="2" cols="75">' . ( isset( $websites ) ? $websites : '' ) . '</textarea> |
501 | 501 | </p> |
502 | 502 | <div class="cleared"></div> |
503 | 503 | </div> |
— | — | @@ -608,22 +608,22 @@ |
609 | 609 | $form .= '<div class="profile-info clearfix"> |
610 | 610 | <div class="profile-update"> |
611 | 611 | <p class="profile-update-title">' . wfMsg( 'user-profile-preferences-emails' ) . '</p> |
612 | | - <p class="profile-update-row"> |
613 | | - ' . wfMsg( 'user-profile-preferences-emails-personalmessage' ) . ' |
614 | | - <input type="checkbox" size="25" name="notify_message" id="notify_message" value="1"' . ( ( $wgUser->getIntOption( 'notifymessage', 1 ) == 1 ) ? 'checked' : '' ) . '/> |
| 612 | + <p class="profile-update-row">' |
| 613 | + . wfMsg( 'user-profile-preferences-emails-personalmessage' ) . |
| 614 | + ' <input type="checkbox" size="25" name="notify_message" id="notify_message" value="1"' . ( ( $wgUser->getIntOption( 'notifymessage', 1 ) == 1 ) ? 'checked' : '' ) . '/> |
615 | 615 | </p> |
616 | | - <p class="profile-update-row"> |
617 | | - ' . wfMsg( 'user-profile-preferences-emails-friendfoe' ) . ' |
618 | | - <input type="checkbox" size="25" class="createbox" name="notify_friend" id="notify_friend" value="1" ' . ( ( $wgUser->getIntOption( 'notifyfriendrequest', 1 ) == 1 ) ? 'checked' : '' ) . '/> |
| 616 | + <p class="profile-update-row">' |
| 617 | + . wfMsg( 'user-profile-preferences-emails-friendfoe' ) . |
| 618 | + ' <input type="checkbox" size="25" class="createbox" name="notify_friend" id="notify_friend" value="1" ' . ( ( $wgUser->getIntOption( 'notifyfriendrequest', 1 ) == 1 ) ? 'checked' : '' ) . '/> |
619 | 619 | </p> |
620 | | - <p class="profile-update-row"> |
621 | | - ' . wfMsg( 'user-profile-preferences-emails-gift' ) . ' |
622 | | - <input type="checkbox" size="25" name="notify_gift" id="notify_gift" value="1" ' . ( ( $wgUser->getIntOption( 'notifygift', 1 ) == 1 ) ? 'checked' : '' ) . '/> |
| 620 | + <p class="profile-update-row">' |
| 621 | + . wfMsg( 'user-profile-preferences-emails-gift' ) . |
| 622 | + ' <input type="checkbox" size="25" name="notify_gift" id="notify_gift" value="1" ' . ( ( $wgUser->getIntOption( 'notifygift', 1 ) == 1 ) ? 'checked' : '' ) . '/> |
623 | 623 | </p> |
624 | 624 | |
625 | | - <p class="profile-update-row"> |
626 | | - ' . wfMsg( 'user-profile-preferences-emails-level' ) . ' |
627 | | - <input type="checkbox" size="25" name="notify_honorifics" id="notify_honorifics" value="1"' . ( ( $wgUser->getIntOption( 'notifyhonorifics', 1 ) == 1 ) ? 'checked' : '' ) . '/> |
| 625 | + <p class="profile-update-row">' |
| 626 | + . wfMsg( 'user-profile-preferences-emails-level' ) . |
| 627 | + ' <input type="checkbox" size="25" name="notify_honorifics" id="notify_honorifics" value="1"' . ( ( $wgUser->getIntOption( 'notifyhonorifics', 1 ) == 1 ) ? 'checked' : '' ) . '/> |
628 | 628 | </p>'; |
629 | 629 | |
630 | 630 | $form .= '</div> |