Clean URLs for user profiles, group homepages, portfolio pages

Bug #1006634 reported by Richard Mansfield on 2012-05-30
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Wishlist
Richard Mansfield

Bug Description

An option to enable alternative clean URLs for user profiles, group homepages, and portfolio pages owned by users and groups. URLs will be chosen by their owners, will uniquely identify a page, and will be used in internally generated links in preference to the old-style links using integer id parameters.

See https://wiki.mahara.org/index.php/Developer_Area/Specifications_in_Development/Clean_URLs

This bug has three parts:
1. Add url fields for profiles, groups, and portfolio pages, initialised using usernames, group names, and page titles, and let users edit these fields.
2. Let profile, group homepage and portfolio page content be identified by the new field instead of by id.
3. Use these url fields to create the links generated internally by Mahara.

Reviewed: https://reviews.mahara.org/1240
Committed: http://gitorious.org/mahara/mahara/commit/f3b11d3cbf758412cb694841b8b1643942c9db2d
Submitter: Melissa Draper (<email address hidden>)
Branch: master

commit f3b11d3cbf758412cb694841b8b1643942c9db2d
Author: Richard Mansfield <email address hidden>
Date: Mon Apr 23 10:47:26 2012 +1200

    Add urlid fields to usr, group, and view tables

    Bug #1006634, part 1

    These columns will hold the portions of a full page url which relate
    to users, groups, and views respectively.

    Change-Id: I50e19f822ef2b8e2f0116db81f27cb4d3bb1bd53
    Signed-off-by: Richard Mansfield <email address hidden>

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/1241
Committed: http://gitorious.org/mahara/mahara/commit/178e6399d6e7431bb8c3e16d8ac05c517e9cccc7
Submitter: Melissa Draper (<email address hidden>)
Branch: master

commit 178e6399d6e7431bb8c3e16d8ac05c517e9cccc7
Author: Richard Mansfield <email address hidden>
Date: Mon Apr 23 13:42:45 2012 +1200

    Add clean url configuration options to config-defaults (bug #1006634)

    Change-Id: Ie2cc733185c0f542ff467c9dc1c173587921129d
    Signed-off-by: Richard Mansfield <email address hidden>

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/1242
Committed: http://gitorious.org/mahara/mahara/commit/c078f25f4c96a4c528e7b4390245195d38279afb
Submitter: Melissa Draper (<email address hidden>)
Branch: master

commit c078f25f4c96a4c528e7b4390245195d38279afb
Author: Richard Mansfield <email address hidden>
Date: Mon Apr 23 13:45:07 2012 +1200

    New function for generation of clean urlid fields

    Bug #1006634, part 1

    Given a string possibly containing characters that are invalid in a
    clean url, return a new string, of the allowed length, containing only
    valid clean url characters. If converting utf8 to ascii,
    transliterate using the iconv function.

    Change-Id: I3dfc505e2be327fb103c4ea59d60082fe3358f0c
    Signed-off-by: Richard Mansfield <email address hidden>

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/1243
Committed: http://gitorious.org/mahara/mahara/commit/7e189ab64e750bca07b0440f76d59a8bd426d671
Submitter: Melissa Draper (<email address hidden>)
Branch: master

commit 7e189ab64e750bca07b0440f76d59a8bd426d671
Author: Richard Mansfield <email address hidden>
Date: Mon Apr 23 13:49:55 2012 +1200

    Autogenerate clean urlids for new users, groups, and portfolio pages

    Bug #1006634, part 1

    Whenever a new user, group, or portfolio page is created and clean
    urls are enabled, ensure the urlid field is set to something vaguely
    sensible. Ensure new user and group urlids are unique, and ensure new
    view urlids are unique for the owner.

    Change-Id: I2033f5aa1f32650b4fc72666c54c371d05df133c
    Signed-off-by: Richard Mansfield <email address hidden>

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/1245
Committed: http://gitorious.org/mahara/mahara/commit/bc80fa0ad1b7a82365f8d6687e08b5cc7a319038
Submitter: Melissa Draper (<email address hidden>)
Branch: master

commit bc80fa0ad1b7a82365f8d6687e08b5cc7a319038
Author: Richard Mansfield <email address hidden>
Date: Mon Apr 23 15:36:27 2012 +1200

    Add admin page to generate clean URLs

    Bug #1006634, part 1

    Clean urls can be enabled at any time. Initialisation for existing
    users should not be tied to a site upgrade, because it is slow, and
    most sites won't ever enable it. Instead, add an admin page with a
    button to regenerate all clean urls based on existing usernames, group
    names, and page titles.

    Change-Id: Id8bae56a6500b1b0038fc20aacadf4817e6e922a
    Signed-off-by: Richard Mansfield <email address hidden>

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/1247
Committed: http://gitorious.org/mahara/mahara/commit/5c3cdcc6808e2bcb1ed2afa8761a4f0357cc5b64
Submitter: Melissa Draper (<email address hidden>)
Branch: master

commit 5c3cdcc6808e2bcb1ed2afa8761a4f0357cc5b64
Author: Richard Mansfield <email address hidden>
Date: Mon Apr 23 14:09:37 2012 +1200

    Allow users to edit clean urls

    Bug #1006634, part 1

    Allows users to edit the user, group, and portfolio page urlid fields.
    Profile page urls are editable on the account settings page, group
    homepage urls on the edit group page, and portfolio page urls under
    Edit Title and Description in the view editor.

    Change-Id: I2804d356fab54448f31258597a93d0808216ba17
    Signed-off-by: Richard Mansfield <email address hidden>

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/1248
Committed: http://gitorious.org/mahara/mahara/commit/15e062d78fbb2c72700f2c874d789650f0c15e39
Submitter: Melissa Draper (<email address hidden>)
Branch: master

commit 15e062d78fbb2c72700f2c874d789650f0c15e39
Author: Richard Mansfield <email address hidden>
Date: Mon Apr 23 17:35:45 2012 +1200

    Find profiles, group homepages, and portfolio pages by urlid

    Bug #1006634, part 2

    Reads new query parameters on user/view.php, group/view.php, and
    view/view.php, which are expected to contain valid urlid values, and
    finds the appropriate view based on these instead of an id.

    Change-Id: I6bff25311afb3c80bdd2c4f1f2d736b92434a92a
    Signed-off-by: Richard Mansfield <email address hidden>

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/1250
Committed: http://gitorious.org/mahara/mahara/commit/11f4a6315ca33b15dde159187870a31923788d68
Submitter: Melissa Draper (<email address hidden>)
Branch: master

commit 11f4a6315ca33b15dde159187870a31923788d68
Author: Richard Mansfield <email address hidden>
Date: Mon Apr 23 18:44:02 2012 +1200

    Use clean group urls on find/my groups

    Bug #1006634, part 3

    Adds a new function to generate a group homepage url from a group
    object, and uses this function instead of a hardcoded url in the group
    lists on Find Groups and My Groups.

    Change-Id: I325998b762dde6880678df556f0f200a6d72bf4d
    Signed-off-by: Richard Mansfield <email address hidden>

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/1252
Committed: http://gitorious.org/mahara/mahara/commit/7ea7efd17730ed1910f5b8069cc997da9c6a3618
Submitter: Melissa Draper (<email address hidden>)
Branch: master

commit 7ea7efd17730ed1910f5b8069cc997da9c6a3618
Author: Richard Mansfield <email address hidden>
Date: Tue Apr 24 13:43:26 2012 +1200

    Use group_homepage_url for group links when url is available

    Bug #1006634, part 3

    Replaces a bunch of hardcoded group/view.php urls with calls to
    group_homepage_url, in a few cases where it is obvious that the urlid
    property is already part of the group object available at that point.

    Change-Id: I7475d378d406a55e30c597442117dfbe58ffdc00
    Signed-off-by: Richard Mansfield <email address hidden>

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/1292
Committed: http://gitorious.org/mahara/mahara/commit/f2af094020ab7fdb4d97f7df4bd05f1f3ca501a6
Submitter: Melissa Draper (<email address hidden>)
Branch: master

commit f2af094020ab7fdb4d97f7df4bd05f1f3ca501a6
Author: Richard Mansfield <email address hidden>
Date: Tue May 8 17:16:21 2012 +1200

    Use clean group urls on view access page

    Bug #1006634, part 3

    Adds the url id to the information returned by search_group, and
    passes this into the javascript in the "Share with other users and
    groups" fieldset on the Edit access page.

    Change-Id: Ie5b88afba4a76bdae8d150452dbae7daed61471d
    Signed-off-by: Richard Mansfield <email address hidden>

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/1291
Committed: http://gitorious.org/mahara/mahara/commit/f4f4589d61726661eedf708539b11d0f723c91a4
Submitter: Melissa Draper (<email address hidden>)
Branch: master

commit f4f4589d61726661eedf708539b11d0f723c91a4
Author: Richard Mansfield <email address hidden>
Date: Tue May 8 17:14:43 2012 +1200

    Use clean group url for redirect after editing group hompepage access

    Bug #1006634, part 3

    In fact, this url was previously unused, because the $redirecturl
    variable was being clobbered immediately after the view type test.

    Change-Id: If8695b5750599ba9ea0c62fc07f5625eafe1216a
    Signed-off-by: Richard Mansfield <email address hidden>

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/1290
Committed: http://gitorious.org/mahara/mahara/commit/82b7f5ae4543840ee050bb31704f9fab5b479f5e
Submitter: Melissa Draper (<email address hidden>)
Branch: master

commit 82b7f5ae4543840ee050bb31704f9fab5b479f5e
Author: Richard Mansfield <email address hidden>
Date: Tue May 8 17:14:05 2012 +1200

    Use clean group url in 'you have submitted this view...' message

    Bug #1006634, part 3

    For the text under views that have been submitted to groups on
    Portfolio -> Pages.

    Change-Id: Id6a0d193e0379d2aa7dea715ac2d38ddc3f082dc
    Signed-off-by: Richard Mansfield <email address hidden>

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/1289
Committed: http://gitorious.org/mahara/mahara/commit/6a2b2e3544af108099fb85cf18d4b3d3205a8d83
Submitter: Melissa Draper (<email address hidden>)
Branch: master

commit 6a2b2e3544af108099fb85cf18d4b3d3205a8d83
Author: Richard Mansfield <email address hidden>
Date: Tue May 8 17:13:05 2012 +1200

    Use clean group urls on group topics page

    Bug #1006634, part 3

    For the linked group names listed in Groups -> Topics

    Change-Id: I7cf0105ec08f8025568ea2ae83218b9a68e85500
    Signed-off-by: Richard Mansfield <email address hidden>

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/1288
Committed: http://gitorious.org/mahara/mahara/commit/9af5e76f136685023ddd69dccf0f8b4ae66948b4
Submitter: Melissa Draper (<email address hidden>)
Branch: master

commit 9af5e76f136685023ddd69dccf0f8b4ae66948b4
Author: Richard Mansfield <email address hidden>
Date: Tue May 8 15:25:53 2012 +1200

    Use clean profile urls on the view access page

    Bug #1006634, part 3

    Adds the profile url to the information returned by search_user, and
    passes this into the javascript in the "Share with other users and
    groups" fieldset on the Edit access page.

    Change-Id: I9dc34ce94c30d8ed14464ad518e2b9cab02f4db9
    Signed-off-by: Richard Mansfield <email address hidden>

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/1287
Committed: http://gitorious.org/mahara/mahara/commit/43559c30ced384d9e4d9682cee9afeac629d6e63
Submitter: Melissa Draper (<email address hidden>)
Branch: master

commit 43559c30ced384d9e4d9682cee9afeac629d6e63
Author: Richard Mansfield <email address hidden>
Date: Tue May 8 14:54:22 2012 +1200

    Use clean urls in tagged posts block

    Bug #1006634, part 3

    Because the urlid field is required here, this patch also modifies the
    block to use the display_name function rather than firstname and
    lastname.

    Change-Id: Ie24a5bfa51595da9a063e23aae98420ca93fc7f4
    Signed-off-by: Richard Mansfield <email address hidden>

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/1286
Committed: http://gitorious.org/mahara/mahara/commit/ca06d2ecd0c7cbc13927bb4699e80079e15f16eb
Submitter: Melissa Draper (<email address hidden>)
Branch: master

commit ca06d2ecd0c7cbc13927bb4699e80079e15f16eb
Author: Richard Mansfield <email address hidden>
Date: Tue May 8 14:34:13 2012 +1200

    Use clean urls on share page

    Bug #1006634, part 3

    For user and group links under "Access list" on the share tab.

    Change-Id: I48f0f78cf3741b0afac66da4c20df3f7184f83d7
    Signed-off-by: Richard Mansfield <email address hidden>

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/1285
Committed: http://gitorious.org/mahara/mahara/commit/10401ccce81d551b7daefad0b7b05a02f7a54af4
Submitter: Melissa Draper (<email address hidden>)
Branch: master

commit 10401ccce81d551b7daefad0b7b05a02f7a54af4
Author: Richard Mansfield <email address hidden>
Date: Tue May 8 14:23:47 2012 +1200

    Use clean profile and group urls in the artefactchooser

    Bug #1006634, part 3

    This is used when configuring a textbox block, and the user has access
    to 'note' artefacts with a different owner. For example, when adding
    a group or institution note into a personal view.

    Change-Id: I80259c769d71982f75c620b0954aa4227042cb62
    Signed-off-by: Richard Mansfield <email address hidden>

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/1284
Committed: http://gitorious.org/mahara/mahara/commit/a8225b720e3dc6cee50ad34514e2e496c4e88dc9
Submitter: Melissa Draper (<email address hidden>)
Branch: master

commit a8225b720e3dc6cee50ad34514e2e496c4e88dc9
Author: Richard Mansfield <email address hidden>
Date: Tue May 8 13:58:03 2012 +1200

    Use clean profile urls in forums area

    Bug #1006634, part 3

    These changes will call profile_url on user ids rather than user
    records or objects, but this will not result in any additional queries
    on these pages: the users are (unfortunately) already being fetched
    one by one to run display_name.

    Change-Id: Ia744e06fcbf761310f43461479ea1f345ea04c62
    Signed-off-by: Richard Mansfield <email address hidden>

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/1283
Committed: http://gitorious.org/mahara/mahara/commit/853e86478c80fb8e19f781b0ea55e856483fa4ac
Submitter: Melissa Draper (<email address hidden>)
Branch: master

commit 853e86478c80fb8e19f781b0ea55e856483fa4ac
Author: Richard Mansfield <email address hidden>
Date: Tue May 8 13:40:17 2012 +1200

    Use get_user_for_display in View::get_owner_object()

    Bug #1006634, part 3

    This is more efficient on many pages, because the user object has
    already been fetched, or is about to be fetched, to run display_name
    or profile_icon_url.

    However, user object returned by get_user_for_display won't allow
    can_view_view to tell whether a user is suspended or not, so
    suspendedctime is added to this object (it's less identifying than
    suspendedcusr).

    Change-Id: Ic9d1e5d437aedbc45f6328a05997812dcf45c8d6
    Signed-off-by: Richard Mansfield <email address hidden>

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/1282
Committed: http://gitorious.org/mahara/mahara/commit/022f91cb5bc69f9c32a4f1fd857981175d3a283c
Submitter: Melissa Draper (<email address hidden>)
Branch: master

commit 022f91cb5bc69f9c32a4f1fd857981175d3a283c
Author: Richard Mansfield <email address hidden>
Date: Mon May 7 17:28:34 2012 +1200

    Use clean profile urls on the users tab of the site stats page

    Bug #1006634, part 3

    This is for the anecdotal snippets like 'Most is Bob with 55', etc.

    Change-Id: If353facdab7a18da46ccd5d499ccde325815ae85
    Signed-off-by: Richard Mansfield <email address hidden>

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/1280
Committed: http://gitorious.org/mahara/mahara/commit/532a72e8c5a9353af74818719efe38452dcccd15
Submitter: Melissa Draper (<email address hidden>)
Branch: master

commit 532a72e8c5a9353af74818719efe38452dcccd15
Author: Richard Mansfield <email address hidden>
Date: Mon May 7 17:12:03 2012 +1200

    Use clean urls on notes page

    Bug #1006634, part 3

    Passes the view records through get_extra_view_info.

    Change-Id: Ic9b108f4c5814022446f6c4e4e8ea54bfc74cd31
    Signed-off-by: Richard Mansfield <email address hidden>

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/1281
Committed: http://gitorious.org/mahara/mahara/commit/f2b8d35914e573bb3a2e3e286960b0f2cd9970a3
Submitter: Melissa Draper (<email address hidden>)
Branch: master

commit f2b8d35914e573bb3a2e3e286960b0f2cd9970a3
Author: Richard Mansfield <email address hidden>
Date: Mon May 7 17:18:41 2012 +1200

    Replace miscellaneous hardcoded view urls

    Bug #1006634, part 3

    Change-Id: I643746b18d01fa90c8d31571fd6fc3c30c97e04b
    Signed-off-by: Richard Mansfield <email address hidden>

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/1279
Committed: http://gitorious.org/mahara/mahara/commit/404ca468c6217f0afd5cee0de02fbad066c6ec5a
Submitter: Melissa Draper (<email address hidden>)
Branch: master

commit 404ca468c6217f0afd5cee0de02fbad066c6ec5a
Author: Richard Mansfield <email address hidden>
Date: Mon May 7 13:14:37 2012 +1200

    Use clean urls in watchlist block

    Bug #1006634, part 3

    Passes the view records through get_extra_view_info.

    Change-Id: I71fbf2e56bee243a1cd4590aefaa3a0ebfe3841d
    Signed-off-by: Richard Mansfield <email address hidden>

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/1278
Committed: http://gitorious.org/mahara/mahara/commit/0ed69fcf6fe27862de86133de48d7e67cb90e3d7
Submitter: Melissa Draper (<email address hidden>)
Branch: master

commit 0ed69fcf6fe27862de86133de48d7e67cb90e3d7
Author: Richard Mansfield <email address hidden>
Date: Mon May 7 12:03:31 2012 +1200

    When releasing a view, redirect to the clean group or view url

    Bug #1006634, part 3

    Use the global $submittedgroup in releaseview_submit() - it already
    contains the group record.

    Change-Id: I3ad549cd8f0581251ded9d315cf3b5cc90e724ee
    Signed-off-by: Richard Mansfield <email address hidden>

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/1277
Committed: http://gitorious.org/mahara/mahara/commit/fe8eab18f8214bb4b38056d9902e278d021ec9a3
Submitter: Melissa Draper (<email address hidden>)
Branch: master

commit fe8eab18f8214bb4b38056d9902e278d021ec9a3
Author: Richard Mansfield <email address hidden>
Date: Mon May 7 11:51:27 2012 +1200

    Use clean urls on the view submission page

    Bug #1006634, part 3

    Modifies the page to use a View object rather than a db record, so
    that get_url can be used.

    Change-Id: Idd92be967469cb9a0e06a2f0ebd8d1bcdbf7325a
    Signed-off-by: Richard Mansfield <email address hidden>

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/1276
Committed: http://gitorious.org/mahara/mahara/commit/f40405862e64e4c7de17b61aeab3580a531f0c8d
Submitter: Melissa Draper (<email address hidden>)
Branch: master

commit f40405862e64e4c7de17b61aeab3580a531f0c8d
Author: Richard Mansfield <email address hidden>
Date: Mon May 7 11:42:53 2012 +1200

    Use clean urls in admin stats area

    Bug #1006634, part 3

    Simplifies the view query and passes the results through
    get_extra_view_info to pull out the urls.

    Change-Id: I8c39548b00b02634193e78fb72ff0e5d4215ce68
    Signed-off-by: Richard Mansfield <email address hidden>

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/1275
Committed: http://gitorious.org/mahara/mahara/commit/c433512bc536acad09878553a6081adfabeab9dd
Submitter: Melissa Draper (<email address hidden>)
Branch: master

commit c433512bc536acad09878553a6081adfabeab9dd
Author: Richard Mansfield <email address hidden>
Date: Fri May 4 16:43:50 2012 +1200

    Use clean urls for views listed on my friends page

    Bug #1006634, part 3

    In order to get the url information for the list of views returned by
    get_views(), that function is modified to gather the views in a single
    flat list rather than in a structure indexed by user id. Just before
    the view list is returned, the url information is fetched and the user
    array is built.

    Change-Id: I12dad07c90f8c51614e72c7402c63dc38fccceeb
    Signed-off-by: Richard Mansfield <email address hidden>

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/1273
Committed: http://gitorious.org/mahara/mahara/commit/1402a7c8a038594c68e1eb6a7dca43b4358eb50d
Submitter: Melissa Draper (<email address hidden>)
Branch: master

commit 1402a7c8a038594c68e1eb6a7dca43b4358eb50d
Author: Richard Mansfield <email address hidden>
Date: Fri May 4 14:08:00 2012 +1200

    Collect url information and display clean urls in collections

    Bug #1006634, part 3

    Updates the Collection::views() method to get a url along with each
    view, and uses these in the templates related to collections.

    Also gets the maximum and minimum displayorder fields by iterating
    over returned records instead of performing additional queries.

    Change-Id: Ia115f6057854f5746cc3c873b79324198089252a
    Signed-off-by: Richard Mansfield <email address hidden>

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/1307
Committed: http://gitorious.org/mahara/mahara/commit/93d4824ae0f2c65ef00b4a41c6e18a00c82ea498
Submitter: Melissa Draper (<email address hidden>)
Branch: master

commit 93d4824ae0f2c65ef00b4a41c6e18a00c82ea498
Author: Richard Mansfield <email address hidden>
Date: Thu Jun 7 14:26:46 2012 +1200

    When changing urlid on the settings page, force a page reload

    Bug #1006634, part 1

    When a user changes their own url on settings, force a full page
    reload so that the profile link in the sideblock works.

    Also cleans up existing code to force a reload after a change of theme
    or language preference.

    Change-Id: Ic9c216d3d295b1cd163fc4bba45a05cc010b7ddb

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/1271
Committed: http://gitorious.org/mahara/mahara/commit/6c6c24e7c999082d973ea9bfbaa9802ea37c3168
Submitter: Melissa Draper (<email address hidden>)
Branch: master

commit 6c6c24e7c999082d973ea9bfbaa9802ea37c3168
Author: Richard Mansfield <email address hidden>
Date: Thu May 3 18:37:11 2012 +1200

    Use clean urls in profile sideblock

    Bug #1006634, part 3

    Only affects views that the owner has tagged 'profile'.

    Change-Id: Id4a6b641ab46e6cf105d9dbf295fb16f8d343987
    Signed-off-by: Richard Mansfield <email address hidden>

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/1298
Committed: http://gitorious.org/mahara/mahara/commit/6fe530c01c2d84a1add8597455ae4d6207d91f35
Submitter: Melissa Draper (<email address hidden>)
Branch: master

commit 6fe530c01c2d84a1add8597455ae4d6207d91f35
Author: Richard Mansfield <email address hidden>
Date: Fri May 18 15:49:23 2012 +1200

    Add an option to stop users from editing their profile urls

    Bug #1006634, part 1

    Some sites may wish to enforce a policy to leave profile urls as close
    as possible to usernames.

    Change-Id: I6931a34baaca91b19f2c3696c3440bc033b663af
    Signed-off-by: Richard Mansfield <email address hidden>

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/1270
Committed: http://gitorious.org/mahara/mahara/commit/ef835efea163268b18323b54938b1b52ee7d62d1
Submitter: Melissa Draper (<email address hidden>)
Branch: master

commit ef835efea163268b18323b54938b1b52ee7d62d1
Author: Richard Mansfield <email address hidden>
Date: Thu May 3 18:24:32 2012 +1200

    Replace hardcoded urls on choose template page

    Bug #1006634, part 3

    These need to continue to use ids rather than clean urls, because
    javascript on the page parses the href attribute for user and group
    ids. It's still better to use the appropriate url functions anyway,
    to reduce the number of hardcoded urls. Because clicks on these links
    are intercepted by javascript to display a preview window, users will
    not end up at these unclean urls unless they have disabled javascript.

    Change-Id: I6d0378c6c65d066d030958e96510f78bfd366a69
    Signed-off-by: Richard Mansfield <email address hidden>

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/1269
Committed: http://gitorious.org/mahara/mahara/commit/bbb85f00fec66138a5c4639d0c3131a69a1b2b59
Submitter: Melissa Draper (<email address hidden>)
Branch: master

commit bbb85f00fec66138a5c4639d0c3131a69a1b2b59
Author: Richard Mansfield <email address hidden>
Date: Thu May 3 17:56:04 2012 +1200

    Use clean urls on view/artefact.php

    Bug #1006634, part 3

    The template can be simplified a bit by using View::display_title()
    instead of generating titles and links for the view and its owner.

    The owner_link function is called by display_title, and is updated
    here to return clean urls.

    Change-Id: Ia4653b2050be1f3b4443130165dcfcbe94a6121b
    Signed-off-by: Richard Mansfield <email address hidden>

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/1267
Committed: http://gitorious.org/mahara/mahara/commit/9ef2afd8439547dedcac52a5009341629e1eb984
Submitter: Melissa Draper (<email address hidden>)
Branch: master

commit 9ef2afd8439547dedcac52a5009341629e1eb984
Author: Richard Mansfield <email address hidden>
Date: Thu May 3 16:28:57 2012 +1200

    Use clean urls elsewhere in lib/view.php

    Bug #1006634, part 3

    - Releasing submitted views
    - Display of view titles
    - Redirects after submitting the objection form, and marking views as unobjectionable

    Change-Id: I878eca87cbe8e2b5dc7e0603a2ddf66a40ef56a4
    Signed-off-by: Richard Mansfield <email address hidden>

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/1266
Committed: http://gitorious.org/mahara/mahara/commit/a1ddaf0561a1c850bcd99f53873f742b4a8c2ead
Submitter: Melissa Draper (<email address hidden>)
Branch: master

commit a1ddaf0561a1c850bcd99f53873f742b4a8c2ead
Author: Richard Mansfield <email address hidden>
Date: Thu May 3 15:59:04 2012 +1200

    Use clean urls in view access notifications

    Bug #1006634, part 3

    Now uses View methods rather than a custom query.

    Change-Id: I227652f197b488b0a98c442cbed8a359dd00e9f8
    Signed-off-by: Richard Mansfield <email address hidden>

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/1263
Committed: http://gitorious.org/mahara/mahara/commit/6d83533b0abb1f6e53074651ab6aea20a07a041e
Submitter: Melissa Draper (<email address hidden>)
Branch: master

commit 6d83533b0abb1f6e53074651ab6aea20a07a041e
Author: Richard Mansfield <email address hidden>
Date: Wed May 2 17:50:41 2012 +1200

    Use clean urls in watchlist notifications

    Bug #1006634, part 3

    Use View methods instead of a custom query.

    Change-Id: I2fb2eaa0d1cdbee29cb3e3a2a56448ef3ad89374
    Signed-off-by: Richard Mansfield <email address hidden>

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/1296
Committed: http://gitorious.org/mahara/mahara/commit/2abd5870506716eee7ec356ea74d9b200cf921f0
Submitter: Melissa Draper (<email address hidden>)
Branch: master

commit 2abd5870506716eee7ec356ea74d9b200cf921f0
Author: Richard Mansfield <email address hidden>
Date: Tue May 8 17:24:09 2012 +1200

    Delete urlids when deleting users and groups

    Bug #1006634, part 1

    Ensures that group and user urlids are freed up when users and groups
    are deleted. Not required for views, because view rows are deleted
    completely rather than just marked deleted.

    Change-Id: Ibcf3549ac5ff1847b5ee528bb98a3b15bd8c4a27
    Signed-off-by: Richard Mansfield <email address hidden>

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/1295
Committed: http://gitorious.org/mahara/mahara/commit/4b0d6f7d823c3b00c005bf966061c6f70b49745f
Submitter: Melissa Draper (<email address hidden>)
Branch: master

commit 4b0d6f7d823c3b00c005bf966061c6f70b49745f
Author: Richard Mansfield <email address hidden>
Date: Tue May 8 17:17:12 2012 +1200

    Use clean group url for notification after adding a user to a group

    Bug #1006634, part 3

    When adding a user to a group directly from a user profile.

    Change-Id: If97f429b4cd1106e50ec1c66800f42571d6ab603
    Signed-off-by: Richard Mansfield <email address hidden>

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/1294
Committed: http://gitorious.org/mahara/mahara/commit/16943862aac76c43d82720dbda08d10179b1fbf4
Submitter: Melissa Draper (<email address hidden>)
Branch: master

commit 16943862aac76c43d82720dbda08d10179b1fbf4
Author: Richard Mansfield <email address hidden>
Date: Tue May 8 17:16:41 2012 +1200

    Use clean group urls in redirect after editing group homepage content

    Bug #1006634, part 3

    This is the destination for the "Done" button at the bottom of the
    block editing page.

    Change-Id: I0ecb734af6370865832a538e289d919f6cfbea93
    Signed-off-by: Richard Mansfield <email address hidden>

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/1262
Committed: http://gitorious.org/mahara/mahara/commit/0fd04e12febd927615141dac58099cf27707eff1
Submitter: Melissa Draper (<email address hidden>)
Branch: master

commit 0fd04e12febd927615141dac58099cf27707eff1
Author: Richard Mansfield <email address hidden>
Date: Wed May 2 16:52:21 2012 +1200

    Use clean view urls on tags page

    Bug #1006634, part 3

    Views and artefacts are pulled from the db together in a UNION query.
    We can't simply pass the whole list of records through to a View
    method - it's easier to generate the urls one by one in
    build_portfolio_search_html.

    Change-Id: I59b1ab91e141611d4a41e60b28a0bfdf13167749
    Signed-off-by: Richard Mansfield <email address hidden>

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/1261
Committed: http://gitorious.org/mahara/mahara/commit/f51a7b57d71302206f5327df73ccf8c6c30766d5
Submitter: Melissa Draper (<email address hidden>)
Branch: master

commit f51a7b57d71302206f5327df73ccf8c6c30766d5
Author: Richard Mansfield <email address hidden>
Date: Wed May 2 16:46:17 2012 +1200

    Use View::get_url() to generate view urls in view listings

    Bug #1006634, part 3

    Changes to get_extra_view_info allow the following pages to be updated
    with clean view urls, without any performance penalty:

    - Latest pages block
    - get_views_for_user mnet function
    - Group views block
    - My views block
    - Sitemaps
    - Shared pages

    Change-Id: I25be10092a7865d34c435196d5f3569e2f08c9c4
    Signed-off-by: Richard Mansfield <email address hidden>

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/1260
Committed: http://gitorious.org/mahara/mahara/commit/20aff7a81f371f5d54d85bd8b576817695ae33e3
Submitter: Melissa Draper (<email address hidden>)
Branch: master

commit 20aff7a81f371f5d54d85bd8b576817695ae33e3
Author: Richard Mansfield <email address hidden>
Date: Tue May 1 18:14:38 2012 +1200

    Display clean urls on Portfolio->Pages aka My Views

    Bug #1006634, part 3

    Simplifies get_myviews_data() to make use of get_extra_view_info, as
    the results from that function now contain everything we need for
    display on the page.

    Change-Id: I16c826e93171ec74259136e998e73dc4db22bef2
    Signed-off-by: Richard Mansfield <email address hidden>

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/1259
Committed: http://gitorious.org/mahara/mahara/commit/33404332d1fe43867e6a3aa871cd02c162c1e8e4
Submitter: Melissa Draper (<email address hidden>)
Branch: master

commit 33404332d1fe43867e6a3aa871cd02c162c1e8e4
Author: Richard Mansfield <email address hidden>
Date: Tue May 1 18:10:54 2012 +1200

    Generate view urls in get_extra_view_info

    Bug #1006634, part 3

    This function is used when a set of view records needs to be augmented
    with tags and data about the view owner (user, group, or institution).
    It is useful on many pages to add the url of each view into the set of
    results, because the url can no longer be determined from the view id
    alone.

    To use the get_url() method, a temporary View object is created, and
    this is prepopulated with the appropriate owner or group (which we
    have already pulled from the db), so that later calls to
    get_owner_object() and get_group_object() don't need to perform any
    more queries.

    Change-Id: I26528ff573d057847747273cf9983fcacc70d20a
    Signed-off-by: Richard Mansfield <email address hidden>

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/1258
Committed: http://gitorious.org/mahara/mahara/commit/8432ef333681672608cdd83308ba5666432242b8
Submitter: Melissa Draper (<email address hidden>)
Branch: master

commit 8432ef333681672608cdd83308ba5666432242b8
Author: Richard Mansfield <email address hidden>
Date: Tue May 1 18:04:37 2012 +1200

    Use clean urls in View::get_url() function

    Bug #1006634, part 3

    The existing get_url method for views is modified to generate clean
    profile and group homepage urls.

    When the view is just a portfolio view, the view's urlid is appended
    to the user or group url. This requires calls to
    View::get_owner_object() and View::get_group_object(), which are
    potentially too slow to be calling on long lists of views, but this is
    addressed in subsequent commits.

    A flag is also added to force get_url to use old-style urls with ids.
    Sometimes an id is required by existing javascript which parses an
    href attribute.

    Change-Id: I8758cf2fc566f4c523c297d015c262007f365243
    Signed-off-by: Richard Mansfield <email address hidden>

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/1257
Committed: http://gitorious.org/mahara/mahara/commit/623062100c045c2af814c7809200ee6037ed35d5
Submitter: Melissa Draper (<email address hidden>)
Branch: master

commit 623062100c045c2af814c7809200ee6037ed35d5
Author: Richard Mansfield <email address hidden>
Date: Thu Apr 26 17:57:52 2012 +1200

    Use clean urls for view owners after running view_search

    Bug #1006634, part 3

    The view_search() function retrieves data about the user or group who
    owns each view in the result set, and this owner data is displayed in
    the Group pages and Latest pages blocks, and Shared pages. When the
    urlid column is also pulled from the db, user and group urls can be
    generated using the new functions.

    Change-Id: I4a018d8deba4a38ab8999161ad3feefd7edc36b0
    Signed-off-by: Richard Mansfield <email address hidden>

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/1256
Committed: http://gitorious.org/mahara/mahara/commit/0d28fabc9264f2051a4a9829c7730d9d40900ca5
Submitter: Melissa Draper (<email address hidden>)
Branch: master

commit 0d28fabc9264f2051a4a9829c7730d9d40900ca5
Author: Richard Mansfield <email address hidden>
Date: Tue Apr 24 18:51:54 2012 +1200

    Use profile_url when data is easy or inexpensive to fetch

    Bug #1006634, part 3

    In many places user urlids are not currently available when the
    profile url is generated, but it is trivial to get it, and then change
    the user/view.php url to a profile_url call:

    - Admin page access report
    - Profile links in feedback lists
    - My friends block
    - Wall posts
    - Group members block
    - Group members tab
    - Recent forum posts block
    - Group admin lists on forums page
    - Group admin lists on my groups, find groups
    - Group admin lists in group info block
    - Profile sideblock
    - My friends & find friends pages
    - Institution landing page
    - Online users page

    Change-Id: I33e122896982037a887aad8e3362db450e123e3f
    Signed-off-by: Richard Mansfield <email address hidden>

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/1255
Committed: http://gitorious.org/mahara/mahara/commit/021d755b2da74054c2f513f0ae9283899201fd8d
Submitter: Melissa Draper (<email address hidden>)
Branch: master

commit 021d755b2da74054c2f513f0ae9283899201fd8d
Author: Richard Mansfield <email address hidden>
Date: Tue Apr 24 17:08:59 2012 +1200

    Use clean profile urls on sendmessage, denyrequest pages

    Bug #1006634, part 3

    In these cases the user's url field is already fetched on the page,
    but the database query must be moved to make use of it.

    Change-Id: I325866c89577e568d4d7d6c372d1546441116c3d
    Signed-off-by: Richard Mansfield <email address hidden>

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/1253
Committed: http://gitorious.org/mahara/mahara/commit/ffb144ad10d0510e4342f777481d5d011073dbc6
Submitter: Melissa Draper (<email address hidden>)
Branch: master

commit ffb144ad10d0510e4342f777481d5d011073dbc6
Author: Richard Mansfield <email address hidden>
Date: Tue Apr 24 14:37:29 2012 +1200

    Use group_homepage_url when data is easy/inexpensive to fetch

    Bug #1006634, part 3

    Replaces existing group/view.php urls with calls to
    group_homepage_url, in a bunch of places where only a minor change is
    required to fetch the urlid property, and where it is clear it will
    have little impact on performance:

    - My groups block
    - Cancel button on group delete
    - Redirects after joining a group or inviting a user
    - Group tab of the admin stats area
    - My groups section of the profile sideblock
    - Redirect after submitting a view

    Change-Id: I0ab970bdc4aaefe9fb912f9e530ebe1684aed011
    Signed-off-by: Richard Mansfield <email address hidden>

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/1254
Committed: http://gitorious.org/mahara/mahara/commit/e262b5bb664b24fc72aa97b60653ab322c2b0b3d
Submitter: Melissa Draper (<email address hidden>)
Branch: master

commit e262b5bb664b24fc72aa97b60653ab322c2b0b3d
Author: Richard Mansfield <email address hidden>
Date: Tue Apr 24 17:03:01 2012 +1200

    Use clean profile urls when data is already available

    Bug #1006634, part 3

    Adds a new profile_url function which respects the cleanurls
    configuration, and makes use of this function in many places where the
    user's url field is already available:

    - Admin user account settings page
    - Redirects after inviting/adding users to groups
    - Redirects & notifications after accepting/denying friend requests or unfriending
    - The name plate in the top right header & small view header
    - Online users sideblock
    - Display of threaded personal messages

    Change-Id: Ia43ae0867af12f6d78c0ad389fae25c58ac69b43
    Signed-off-by: Richard Mansfield <email address hidden>

Changed in mahara:
status: In Progress → Fix Committed
tags: added: newfeature1.6

A clean URL is not created for some group pages. Richard and I saw the problem and he'll investigate.

on my install: pages (existing and new) in existing groups didn't get clean URL whereas pages in new groups have the option.

Changed in mahara:
status: Fix Committed → In Progress
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/1322
Committed: http://gitorious.org/mahara/mahara/commit/b8ecc4e27bf03b5ccc3fe46f78073a6a90c9e29a
Submitter: Melissa Draper (<email address hidden>)
Branch: master

commit b8ecc4e27bf03b5ccc3fe46f78073a6a90c9e29a
Author: Richard Mansfield <email address hidden>
Date: Wed Jun 13 10:57:19 2012 +1200

    Remove use of bitwise assignments on boolean values

    This patch removes some inapproprate uses of the |= and &= operators
    on boolean values. On view/edit.php, &= was also used on the integer
    return value from strlen as if it were a boolean, resulting in the
    clean url field being uneditable in some instances where it should
    have been editable (see bug #1006634).

    Change-Id: I96a72c407309ed82a45d3130cffa06418be05fe7
    Signed-off-by: Richard Mansfield <email address hidden>

Changed in mahara:
status: In Progress → Fix Committed
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/1347
Committed: http://gitorious.org/mahara/mahara/commit/4497a47c7eb0987c53641f7f3bb29614b0cf4051
Submitter: Hugh Davenport (<email address hidden>)
Branch: master

commit 4497a47c7eb0987c53641f7f3bb29614b0cf4051
Author: Richard Mansfield <email address hidden>
Date: Wed May 30 14:23:38 2012 +1200

    Avoid cross-domain ajax requests from user subdomains (bug #1006634)

    When cleanurlusersubdomains is on, ajax requests might come from
    somewhere other than the wwwroot. To avoid cross-domain requests,
    this patch will set a javascript variable whenever a page is on a
    subdomain. The ajax wrapper function sendjsonrequest rewrites its url
    using the variable if necessary.

    Change-Id: If8a625268895fe1b239f76d515dbd17debe0035e
    Signed-off-by: Richard Mansfield <email address hidden>

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/1346
Committed: http://gitorious.org/mahara/mahara/commit/79865c29556f58b67afccc02045847084a4860f4
Submitter: Hugh Davenport (<email address hidden>)
Branch: master

commit 79865c29556f58b67afccc02045847084a4860f4
Author: Richard Mansfield <email address hidden>
Date: Mon Jun 18 17:02:24 2012 +1200

    Use subdomain URLs on Settings and Edit view pages (bug #1006634)

    When user subdomains are enabled, display the Profile url field on the
    Settings page where it belongs: between the scheme part of the url and
    the rest of the wwwroot.

    On Edit Title & Description for profile pages, ensure the correct form
    of the clean url is used by calling the appropriate function instead
    of building the url.

    Change-Id: Id4924165e7bf803fce46cf877a980d0c235176eb
    Signed-off-by: Richard Mansfield <email address hidden>

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/1344
Committed: http://gitorious.org/mahara/mahara/commit/8a09de28a24e0d9b69d1a62376e5a8dec9e26aec
Submitter: Hugh Davenport (<email address hidden>)
Branch: master

commit 8a09de28a24e0d9b69d1a62376e5a8dec9e26aec
Author: Richard Mansfield <email address hidden>
Date: Fri May 25 13:26:12 2012 +1200

    Allow login redirect to subdomains (bug #1006634)

    When a page at a user subdomain such as http://bob.example.com/my-page
    is requested by a logged out user, ensure that the user is redirected
    to a login page that works, rather than to http://example.com/my-page.

    Because the existing get_full_script_path() function is currently
    unused, this function is modified to call get_requested_host_name(),
    and then used in the AccessDeniedException for the login form
    redirect.

    Change-Id: I182adeb1a83363512dfde638f2aad23b1d69bcb4
    Signed-off-by: Richard Mansfield <email address hidden>

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/1342
Committed: http://gitorious.org/mahara/mahara/commit/555b7606cad1349f996f95bf1df23eb8d8533cf2
Submitter: Hugh Davenport (<email address hidden>)
Branch: master

commit 555b7606cad1349f996f95bf1df23eb8d8533cf2
Author: Richard Mansfield <email address hidden>
Date: Fri May 25 11:19:20 2012 +1200

    Always use wwwroot to generate the cookie domain (bug #1006634)

    When user subdomain urls are enabled, parts of the site are at
    subdomains under wwwroot, and we need to ensure that cookies are set
    with the main site domain to ensure users stay logged in when they go
    to profile pages.

    Change-Id: I8c8ac4e01078ff926ade7d28ff8d15566d3391e1

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/1341
Committed: http://gitorious.org/mahara/mahara/commit/aab46e2b318d941ae6f3deecd7848b072ecaa4a0
Submitter: Richard Mansfield (<email address hidden>)
Branch: master

commit aab46e2b318d941ae6f3deecd7848b072ecaa4a0
Author: Richard Mansfield <email address hidden>
Date: Fri May 25 13:29:49 2012 +1200

    Add clean URL "User subdomain" option (bug #1006634)

    This generates profile urls as subdomains of the site wwwroot. For
    example, http://bob.example.com rather than the default clean profile
    URL http://example.com/user/bob

    This option will not work without the appropriate rewrite rules,
    documented at

    https://wiki.mahara.org/index.php/System_Administrator%27s_Guide/Clean_URL_Configuration

    Change-Id: I9e1cb479abf3b9535bd15efca7382f8352d6d893

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

 status fixreleased
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iJwEAQECAAYFAlCbHO8ACgkQuMoJ2LQ3zxH8TAP/YN4BiCJZsn5a899/0UzV31Qg
lM8LXAwZWa6zFv6t0BQUHCqe6eFK9wPp51qgCWWXjUZ3vvvVcsyeWp6626aBFKSU
pCQXI9E7huPw802nJQ9WcZXRBUmgw87ww72Tx4mybnu7SPSrkZgXdnPGSMwDs89N
oWvTpl7Xuac48e6p0lU=
=ouU+
-----END PGP SIGNATURE-----

Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers