Commit cae2cef8 authored by Nigel McNie's avatar Nigel McNie
Browse files

Make install_system_profile_view error out if the view is already

created.

This function is now designed to be called just once - on installation
and on upgrade - rather than every time a user needs a new profile view.
parent b3f71a19
......@@ -1245,14 +1245,14 @@ function install_profile_view($userid) {
/**
*
* This function installs the site's default profile view
*
* @throws SystemException if the system profile view is already installed
*/
function install_system_profile_view() {
$viewid = get_field('view', 'id', 'owner', 0, 'type', 'profile');
if ($viewid) {
return $viewid;
throw new SystemException('A system profile view already seems to be installed');
}
require_once(get_config('libroot') . 'view.php');
require_once(get_config('docroot') . 'blocktype/lib.php');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment