Permalink
Browse files

MDL-30706 mymobile: don't send login pages through ajax

By doing 'real requests' we can allow external authentication to happen
(e.g. apache module which does a redirect to external SSO system)
  • Loading branch information...
1 parent a39a53f commit 8129b01641dbe3285248f34576475d262991da98 @danpoltawski danpoltawski committed with Sam Hemelryk Dec 19, 2011
Showing with 3 additions and 3 deletions.
  1. +1 −1 theme/mymobile/layout/general.php
  2. +2 −2 theme/mymobile/renderers.php
@@ -217,7 +217,7 @@
</div>
<?php } else if (!isloggedin() || isguestuser()) { ?>
- <a data-role="button" <?php echo $datatheme;?> href="<?php p($CFG->wwwroot) ?>/login/index.php"><?php p(get_string('login')); ?></a>
+ <a data-role="button" <?php echo $datatheme;?> data-ajax="false" href="<?php p($CFG->wwwroot) ?>/login/index.php"><?php p(get_string('login')); ?></a>
<?php } ?>
</div>
<?php } ?>
@@ -339,7 +339,7 @@ public function login_info() {
$loggedinas = $realuserinfo.$username.' <a id="mypower" data-inline="true" data-role="button" data-icon="mypower" data-ajax="false" class="ui-btn-right mypower" href="'.$CFG->wwwroot.'/login/logout.php?sesskey='.sesskey().'\">'.get_string('logout').'</a>';
}
} else {
- $loggedinas = '<a data-role="button" data-icon="alert" class="ui-btn-right nolog" href="'.$loginurl.'" data-prefetch>'.get_string('login').'</a>';
+ $loggedinas = '<a data-role="button" data-icon="alert" class="ui-btn-right nolog" href="'.$loginurl.'" data-ajax="false">'.get_string('login').'</a>';
}
// TODO: Enable $CFG->displayloginfailures and test as admin what happens after you succesfully
@@ -422,7 +422,7 @@ public function login_info_footer() {
} else {
$loggedinas = get_string('loggedinnot', 'moodle');
if (!$loginpage) {
- $loggedinas .= " (<a href=\"$loginurl\">".get_string('login').'</a>)';
+ $loggedinas .= " (<a href=\"$loginurl\" data-ajax=\"false\">".get_string('login').'</a>)';
}
}

0 comments on commit 8129b01

Please sign in to comment.