diff options
author | Adrian Lang <mail@adrianlang.de> | 2009-08-21 12:13:24 +0200 |
---|---|---|
committer | Adrian Lang <mail@adrianlang.de> | 2009-08-21 12:13:24 +0200 |
commit | 70235d7f05d2ce7dda77af88518612fa005783df (patch) | |
tree | f8722056494597d047c545def94bd82ea1238dcc /actions/updateprofile.php | |
parent | b0bb1fff2e79a01b2fa2eece79d2c644860bbb97 (diff) |
Update libomb, fix some omb handling stuff, improve error handling.
Diffstat (limited to 'actions/updateprofile.php')
-rw-r--r-- | actions/updateprofile.php | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/actions/updateprofile.php b/actions/updateprofile.php index 345c28b8d..b10554e8b 100644 --- a/actions/updateprofile.php +++ b/actions/updateprofile.php @@ -48,9 +48,31 @@ require_once INSTALLDIR.'/extlib/libomb/service_provider.php'; class UpdateprofileAction extends Action { + /** + * For initializing members of the class. + * + * @param array $argarray misc. arguments + * + * @return boolean true + */ + function prepare($argarray) + { + parent::prepare($argarray); + $license = $_POST['omb_listenee_license']; + $site_license = common_config('license', 'url'); + if (!common_compatible_license($license, $site_license)) { + $this->clientError(sprintf(_('Listenee stream license ā%sā is not '. + 'compatible with site license ā%sā.'), + $license, $site_license); + return false; + } + return true; + } + function handle($args) { parent::handle($args); + try { $srv = new OMB_Service_Provider(null, omb_oauth_datastore(), omb_oauth_server()); |