diff --git a/README b/README index 03064f8494db69b42f856af88bafde4deb1c094d..cd2b6f703cac768433fa2a693c4745ab3ae2fd6b 100644 --- a/README +++ b/README @@ -85,6 +85,7 @@ Just run the setup.sh script. If any plugins are added, add this to the setup.sh ** Patches ******* All patches are located in the /pathces directory. These include: +patches/check_page_owner_exists.diff * check that $page_owner is set or a non-existant profile returns 500 error (FIXED IN 1.7.4) patches/relationship_get_set_public.diff *__get __set not declared correctly patches/lowercase_post.diff *Forms use POST which doesn't validate patches/strip_tags_name_field.diff *Display Name field allowed html that often was not escaped upon output diff --git a/patches/check_page_owner_exists.diff b/patches/check_page_owner_exists.diff new file mode 100644 index 0000000000000000000000000000000000000000..65973f0df57035544a4e477f53f2cbcd51aadac2 --- /dev/null +++ b/patches/check_page_owner_exists.diff @@ -0,0 +1,15 @@ +### Eclipse Workspace Patch 1.0 +#P UNL_Elgg +Index: elgg/mod/profile/start.php +=================================================================== +--- elgg/mod/profile/start.php (revision 7321) ++++ elgg/mod/profile/start.php (working copy) +@@ -203,7 +203,7 @@ + if (get_context() == "profile") { + $page_owner = page_owner_entity(); + +- if ($page_owner->canEdit()) { ++ if ($page_owner && $page_owner->canEdit()) { + add_submenu_item(elgg_echo('profile:editdetails'), $CONFIG->wwwroot . "pg/profile/{$page_owner->username}/edit/"); + add_submenu_item(elgg_echo('profile:editicon'), $CONFIG->wwwroot . "pg/profile/{$page_owner->username}/editicon/"); + } diff --git a/setup.sh b/setup.sh index 2ecb86f5ecf311ae7cf3d5aced59f713fad6793f..7befb4e98b31886ae4599021f5da2b8cb20c08a1 100755 --- a/setup.sh +++ b/setup.sh @@ -8,7 +8,7 @@ patch -p0 -s -N -r tmp.rej < patches/relationship_get_set_pu patch -p0 -s -N -d elgg -r tmp.rej < patches/lowercase_post.diff > /dev/null patch -p0 -s -N -d elgg/actions/user -r tmp.rej < patches/strip_tags_name_field.diff > /dev/null patch -p0 -s -N -d elgg/mod/groups -r tmp.rej < patches/add_closing_labels.diff > /dev/null +patch -p0 -s -N -d elgg/mod/profile -r tmp.rej < patches/check_page_owner_exists.diff > /dev/null rm tmp.rej &> /dev/null echo 'Setup successful' -