From 70235d7f05d2ce7dda77af88518612fa005783df Mon Sep 17 00:00:00 2001 From: Adrian Lang Date: Fri, 21 Aug 2009 12:13:24 +0200 Subject: Update libomb, fix some omb handling stuff, improve error handling. --- actions/updateprofile.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'actions/updateprofile.php') 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()); -- cgit v1.2.3-54-g00ecf