mahara:mahara.git
11 years agoAdding coding standards checks to minaccept in Makefile
Brett Wilkins [Wed, 8 Jun 2011 02:33:42 +0000 (14:33 +1200)]
Adding coding standards checks to minaccept in Makefile

test/coding-standards-check.pl checks for:
* trailing whitespace and tabs following spaces in indents.
* unresolved merge commits
* Mahara coding guideline conformance

Change-Id: I7e9cd4fff4689455dd6f30e923e23df9d2c63d6a
Signed-off-by: Brett Wilkins <brett@catalyst.net.nz>
11 years agoMerge changes I79c8bf5e,Ic0d664df,I1464b8a9
Richard Mansfield [Mon, 13 Jun 2011 22:52:40 +0000 (10:52 +1200)]
Merge changes I79c8bf5e,Ic0d664df,I1464b8a9

* changes:
  Rerun search index upgrade due to failure of index_exists (bug #796102)
  Make index_exists more useful when called on indexes with no columns (bug #796102)
  Check for valid columns in adodb postgres64 driver MetaIndexes fn (bug #796102)

11 years agoRerun search index upgrade due to failure of index_exists (bug #796102)
Richard Mansfield [Mon, 13 Jun 2011 21:58:53 +0000 (09:58 +1200)]
Rerun search index upgrade due to failure of index_exists (bug #796102)

Change-Id: I79c8bf5e458e763e2b8d19f997ca9b708426cc74
Signed-off-by: Richard Mansfield <richard.mansfield@catalyst.net.nz>
11 years agoFix online users sideblock to work with db prefix (bug #796424)
Richard Mansfield [Mon, 13 Jun 2011 04:34:33 +0000 (16:34 +1200)]
Fix online users sideblock to work with db prefix (bug #796424)

Change-Id: I0aadf9e62816ea3d9df81d3e6262d5ca515c1263
Signed-off-by: Richard Mansfield <richard.mansfield@catalyst.net.nz>
11 years agoMake index_exists more useful when called on indexes with no columns (bug #796102)
Richard Mansfield [Mon, 13 Jun 2011 03:35:28 +0000 (15:35 +1200)]
Make index_exists more useful when called on indexes with no columns (bug #796102)

ddl's index_exists() function tries to check whether an index exists on a table
by comparing the column names in the index passed to it with all the indexes on
the table.

Indexes on functions of columns all appear as having no columns, so the behaviour
is not very useful.  If a table has any index on a function, index_exists will
always return true when passed an index with no columns, whether or not its name
matches any existing index on the table.

This change modifies find_index_name() so that it treats indexes without columns
as a special case, and matches on their names rather than on the list of columns.

Change-Id: Ic0d664dff77fe5a220a9f9563975df1c87b18e06
Signed-off-by: Richard Mansfield <richard.mansfield@catalyst.net.nz>
11 years agoCheck for valid columns in adodb postgres64 driver MetaIndexes fn (bug #796102)
Richard Mansfield [Mon, 13 Jun 2011 03:30:35 +0000 (15:30 +1200)]
Check for valid columns in adodb postgres64 driver MetaIndexes fn (bug #796102)

Indexes on functions of columns have a 0 in the indkey column of
pg_catalog.pg_index, which doesn't refer to a column.

Don't return any columns for the index, rather than returning an empty
column name.

Change-Id: I1464b8a9fda8bd137dcabf1145da289ccf32c500
Signed-off-by: Richard Mansfield <richard.mansfield@catalyst.net.nz>
11 years agoAdd missing check for duplicate remote usernames in csv upload
Richard Mansfield [Sun, 12 Jun 2011 22:17:39 +0000 (10:17 +1200)]
Add missing check for duplicate remote usernames in csv upload

Change-Id: I17ccc4e7297fed5ec828047b72e4835296338489
Signed-off-by: Richard Mansfield <richard.mansfield@catalyst.net.nz>
11 years agoAllow updates to existing users by csv upload
Richard Mansfield [Sun, 12 Jun 2011 22:16:58 +0000 (10:16 +1200)]
Allow updates to existing users by csv upload

Adds an 'Update Users' checkbox to the CSV upload page.  When checked,
users on the site whose usernames appear in the CSV file will have their
details overwritten by the values in the CSV file.

To be updated, existing users must be in the same institution as the one
specified in the upload form.

Change-Id: Ia47f7034adbade21dd26f455c356f58ed7bbf730
Signed-off-by: Richard Mansfield <richard.mansfield@catalyst.net.nz>
11 years agoPut repeated reset password code in one place
Richard Mansfield [Thu, 9 Jun 2011 06:31:26 +0000 (18:31 +1200)]
Put repeated reset password code in one place

Change-Id: I83c4ba70d69724bca120bbd757732fb34a23192e
Signed-off-by: Richard Mansfield <richard.mansfield@catalyst.net.nz>
11 years agoCreate authinstance object once per csv file, not once per line
Richard Mansfield [Thu, 9 Jun 2011 03:07:23 +0000 (15:07 +1200)]
Create authinstance object once per csv file, not once per line

Change-Id: I4c2dc5beff99e5540196b25cd87357b15d226169
Signed-off-by: Richard Mansfield <richard.mansfield@catalyst.net.nz>
11 years agoUse separate function to collect and process csv errors
Richard Mansfield [Sun, 12 Jun 2011 22:16:06 +0000 (10:16 +1200)]
Use separate function to collect and process csv errors

This will be useful for doing multiple passes of the csv file, but
keeping errors together when they're associated with a particular
line number.

Change-Id: I6f3fe7049878cf32e2a562adea0f318849f15535
Signed-off-by: Richard Mansfield <richard.mansfield@catalyst.net.nz>
11 years agoinit: only redirect to HTTPS when running in a browser
Francois Marier [Thu, 9 Jun 2011 06:32:28 +0000 (18:32 +1200)]
init: only redirect to HTTPS when running in a browser

The redirect to HTTPS added in 02cf299a59851c06ac9227a2f0df898392196cf6
was causing problems when cron was running using PHP cli (bug #792290).

Change-Id: I991f51d2cc9272e5f33e5f4b7486d3565924d8c7
Signed-off-by: Francois Marier <francois@catalyst.net.nz>
11 years agoInstitutional admin/staff contact page user profile links
Stacey Walker [Sun, 5 Jun 2011 21:29:24 +0000 (22:29 +0100)]
Institutional admin/staff contact page user profile links

bug #794361

Change-Id: I505acd49a0bdc67364076a631f3e84d1db6e1beb
Signed-off-by: Stacey Walker <stacey@catalyst-eu.net>
11 years agoMerge "Limit users in online side block"
Francois Marier [Thu, 9 Jun 2011 00:04:23 +0000 (12:04 +1200)]
Merge "Limit users in online side block"

11 years agoMerge "Fix lang string for sitemaps (bug #794656)"
Francois Marier [Wed, 8 Jun 2011 23:47:14 +0000 (11:47 +1200)]
Merge "Fix lang string for sitemaps (bug #794656)"

11 years agoFix lang string for sitemaps (bug #794656)
Hugh Davenport [Wed, 8 Jun 2011 22:02:33 +0000 (10:02 +1200)]
Fix lang string for sitemaps (bug #794656)

Change-Id: Ia684afea3125dc8964d21b3bf288c6592b3d8303
Signed-off-by: Hugh Davenport <hugh@catalyst.net.nz>
11 years agoMake profile_icon_url output compatible with html export filter.
Ruslan Kabalin [Fri, 3 Jun 2011 09:55:54 +0000 (10:55 +0100)]
Make profile_icon_url output compatible with html export filter.

Change-Id: I65de62a6ccbc680b3ee6055482cc84370a56e106
Signed-off-by: Ruslan Kabalin <ruslan.kabalin@luns.net.uk>
11 years agoLimit users in online side block
Stacey Walker [Tue, 7 Jun 2011 12:11:46 +0000 (13:11 +0100)]
Limit users in online side block

bug#794368

Change-Id: I5d658b6da7591accb5680a812f8759a2384ae5ac
Signed-off-by: Stacey Walker <stacey@catalyst-eu.net>
11 years agoMerge "Put username & password fields on new lines in the login form"
Richard Mansfield [Wed, 8 Jun 2011 06:50:37 +0000 (18:50 +1200)]
Merge "Put username & password fields on new lines in the login form"

11 years agoPut username & password fields on new lines in the login form
Richard Mansfield [Wed, 8 Jun 2011 05:53:47 +0000 (17:53 +1200)]
Put username & password fields on new lines in the login form

In some languages, the string for the username label is so short that
the username text field appears on the same level as the label.  It
looks especially ugly when the password field sits on a new line, but
the username field doesn't.

Change-Id: I6a2cb05ac18ea547585ab6c738abee3d689adc66
Signed-off-by: Richard Mansfield <richard.mansfield@catalyst.net.nz>
11 years agoFeature: Generate a sitemap (bug #793815)
Darryl Hamilton [Wed, 25 May 2011 21:37:22 +0000 (09:37 +1200)]
Feature: Generate a sitemap (bug #793815)

Code to generate a sitemap generation code, using the sitemaps.org
standard/protocol. The default generation is daily, with a
full generation done on the first of the month. The full
generation can also be forced by passing 'true' to the constructor.

Sitemap file(s) are placed in a 'sitemaps' directory just off
the docroot, with an index file placed in the docroot itself. If
the 'sitemaps' directory does not exist, one will be created.

More information can be found on
https://wiki.mahara.org/index.php/Developer_Area/Specifications_in_Development/Sitemaps

Change-Id: Ib28983ca1c3b5ff06a6e603f402460531b987067
Signed-off-by: Darryl Hamilton <darrylh@catalyst.net.nz>
11 years agoMerge "Reset the site language immediately after config is loaded (bug #787123)"
Richard Mansfield [Wed, 8 Jun 2011 04:30:00 +0000 (16:30 +1200)]
Merge "Reset the site language immediately after config is loaded (bug #787123)"

11 years agoMerge "externalvideo: Added support for various media sources"
Richard Mansfield [Wed, 8 Jun 2011 00:39:34 +0000 (12:39 +1200)]
Merge "externalvideo: Added support for various media sources"

11 years agoFix copy collections to not show on group/institution pages
Hugh Davenport [Tue, 7 Jun 2011 00:56:20 +0000 (12:56 +1200)]
Fix copy collections to not show on group/institution pages

This fixes the strings and links on group and institution
pages to not show the copy collections, as collections do
not exist in groups/institutions.

Change-Id: I1aee3c64a09bddcea892a6eefd19e0eca2ba11d8
Signed-off-by: Hugh Davenport <hugh@catalyst.net.nz>
11 years agoReset the site language immediately after config is loaded (bug #787123)
Richard Mansfield [Tue, 7 Jun 2011 21:56:57 +0000 (09:56 +1200)]
Reset the site language immediately after config is loaded (bug #787123)

Because the $lang variable is declared as static in current_language(), a
call to get_string in the sanity checks can set the language for the
entire request, even before the site language has been read in from the
config table.  This ensures the language is reset immediately after config
has been read.

Change-Id: Ic81dfaedd70de75d93a6d38dd89915eeabcccd6e
Signed-off-by: Richard Mansfield <richard.mansfield@catalyst.net.nz>
11 years agoFix bad query when searching copyable views (bug #793866)
Richard Mansfield [Tue, 7 Jun 2011 06:18:03 +0000 (18:18 +1200)]
Fix bad query when searching copyable views (bug #793866)

Change-Id: I600447b0cb045cd1efe3e72f4939f236d510d6d3
Signed-off-by: Richard Mansfield <richard.mansfield@catalyst.net.nz>
11 years agoexternalvideo: Added support for various media sources
Brett Wilkins [Thu, 2 Jun 2011 09:44:35 +0000 (21:44 +1200)]
externalvideo: Added support for various media sources

Have added support for various media sources, which neccessitated the ability to support
iframes and page scraping for certain sources but not others. for this reason, I have broken
the sources out into their own classes, all implementing a common interface. This also
allows later additions to the sources to be added more easily.

Unfortunately language strings still need to be kept in the same place.

Other changes include the ability to set the width/height parameters as percentage values,
should the source need to be able to support that.

Change-Id: I802ffa8d8cf1172c9c45d1b71822d0d99c57b480
Signed-off-by: Brett Wilkins <brett@catalyst.net.nz>
11 years agoMerge "text block: add option for larger tinymce editor"
Francois Marier [Tue, 7 Jun 2011 04:45:40 +0000 (16:45 +1200)]
Merge "text block: add option for larger tinymce editor"

11 years agoCreate a mechanism to retain access on copied pages
Hugh Davenport [Thu, 19 May 2011 02:34:46 +0000 (14:34 +1200)]
Create a mechanism to retain access on copied pages

Change-Id: I6d44a6ad4dade82037610a14ee6d7aa342bcb2bc
Signed-off-by: Hugh Davenport <hugh@catalyst.net.nz>
11 years agoMerge "Fix autogen of wwwroot to detect symbolic links correctly"
Francois Marier [Tue, 7 Jun 2011 01:45:59 +0000 (13:45 +1200)]
Merge "Fix autogen of wwwroot to detect symbolic links correctly"

11 years agoFix autogen of wwwroot to detect symbolic links correctly
Hugh Davenport [Wed, 11 May 2011 02:12:05 +0000 (14:12 +1200)]
Fix autogen of wwwroot to detect symbolic links correctly

Test by appending each directory in PHP_SELF to DOCUMENT_ROOT
when the realpath of that is the same as dirname(__FILE__) then
stop processing.

For most users there is little performance hit, only a few will
have more than say two levels above DOCUMENT_ROOT

If nothing can be autoconfigured, use a default of root (ie no
path)

Bug #780237

Change-Id: I60339a180ac043ab0b89c3a49ff5f2485112f567
Signed-off-by: Hugh Davenport <hugh@catalyst.net.nz>
11 years agotext block: add option for larger tinymce editor
Francois Marier [Tue, 7 Jun 2011 01:06:05 +0000 (13:06 +1200)]
text block: add option for larger tinymce editor

This is a cherry-pick of the following commits:

  688a506321262dffcbe8400ccf6dd46588afb657
  b4c77eb66b07c2928f5566b6df8857eda4f15c67
  0e7a938a8b5005efca86403e156c453f1af940ae
  ff8b17d30ff7edd62eed77e58fa8141543ce95ce
  b8ca346ac2b28f01d32ea3cf61bc6930939d8750

The original one was done to fix bug #530656 but was then reverted
in 55a8feadbecf31725b4b3808e9e26b783b9ed873 after the tinymce
autoresize plugin was enabled.

However, the autoresize plugin was removed after causing problems
in bug #791854 (see 651fcdba81e529ffa5506c7b68756338f4ff2b98) so
we'll restore this work-around for the time being.

Change-Id: I74176a3a155a7d9442448d09f206250b55394611
Signed-off-by: Francois Marier <francois@catalyst.net.nz>
11 years agoMerge "Change order of edit page navigation bar"
Francois Marier [Mon, 6 Jun 2011 23:33:38 +0000 (11:33 +1200)]
Merge "Change order of edit page navigation bar"

11 years agoMerge "tinymce: disable autoresize plugin (bug #791854)"
Francois Marier [Mon, 6 Jun 2011 23:20:10 +0000 (11:20 +1200)]
Merge "tinymce: disable autoresize plugin (bug #791854)"

11 years agoMerge "Adjust method to allow specification of forums to get topics for"
Francois Marier [Mon, 6 Jun 2011 23:19:30 +0000 (11:19 +1200)]
Merge "Adjust method to allow specification of forums to get topics for"

11 years agotinymce: disable autoresize plugin (bug #791854)
Francois Marier [Sat, 4 Jun 2011 04:57:15 +0000 (16:57 +1200)]
tinymce: disable autoresize plugin (bug #791854)

The auto-resize plugin is currently broken in Chrome:

  http://tinymce.moxiecode.com/develop/bugtracker_view.php?id=4416

This effectively reverts 5525cb60742b19a475cdbd824c5cd567639fabd8
and reopens bug #530656.

Change-Id: I2729dec02247ea1eb3d5d10f9a4f4a8bf93f1b52
Signed-off-by: Francois Marier <francois@catalyst.net.nz>
11 years agoMerge changes Ibf3847ca,I37a455d7,I3da189b7
Ruslan Kabalin [Fri, 3 Jun 2011 11:10:01 +0000 (23:10 +1200)]
Merge changes Ibf3847ca,I37a455d7,I3da189b7

* changes:
  Add copy collection to copy page page
  Collection preview
  Initial support for copying collections

11 years agoAdd copy collection to copy page page
Hugh Davenport [Thu, 2 Jun 2011 03:06:20 +0000 (15:06 +1200)]
Add copy collection to copy page page

Change-Id: Ibf3847cac7ed1905146360ab72e81df14a3faaa2
Signed-off-by: Hugh Davenport <hugh@catalyst.net.nz>
11 years agoCollection preview
Hugh Davenport [Thu, 2 Jun 2011 02:47:47 +0000 (14:47 +1200)]
Collection preview

Change-Id: I37a455d728b5b162ac5c82a73b813f45a1e78d77
Signed-off-by: Hugh Davenport <hugh@catalyst.net.nz>
11 years agoAdjust method to allow specification of forums to get topics for
Darryl Hamilton [Thu, 26 May 2011 23:52:52 +0000 (11:52 +1200)]
Adjust method to allow specification of forums to get topics for

This change allows you to specify an array of forum ids, from which
active topics are returned.

Used in the sitemap generation code to limit topics to forums attached
to public groups.

Change-Id: Ibe849e844b3a229c427a554f641373d3911be225
Signed-off-by: Darryl Hamilton <darrylh@catalyst.net.nz>
11 years agoInitial support for copying collections
Hugh Davenport [Thu, 2 Jun 2011 02:38:59 +0000 (14:38 +1200)]
Initial support for copying collections

Code adapted from /lib/view.php

Change-Id: I3da189b7f3391c34ec53e3755b119f9c3fd1c9f9
Signed-off-by: Hugh Davenport <hugh@catalyst.net.nz>
11 years agoMerge "Restore edit membership link on find friends page (bug #791688)"
Richard Mansfield [Thu, 2 Jun 2011 06:14:13 +0000 (18:14 +1200)]
Merge "Restore edit membership link on find friends page (bug #791688)"

11 years agoMerge "Fix sql error on find friends page (bug #791681)"
Richard Mansfield [Thu, 2 Jun 2011 06:14:02 +0000 (18:14 +1200)]
Merge "Fix sql error on find friends page (bug #791681)"

11 years agoRestore edit membership link on find friends page (bug #791688)
Richard Mansfield [Thu, 2 Jun 2011 05:43:42 +0000 (17:43 +1200)]
Restore edit membership link on find friends page (bug #791688)

This bug was introduced by commit c243ea697d (see bug #619115).

Change-Id: Ic144d4b351a33a05d059a843d3c94811eed78d27
Signed-off-by: Richard Mansfield <richard.mansfield@catalyst.net.nz>
11 years agoFix sql error on find friends page (bug #791681)
Richard Mansfield [Thu, 2 Jun 2011 05:19:04 +0000 (17:19 +1200)]
Fix sql error on find friends page (bug #791681)

Change-Id: I8dd6f820d64fe69c69eaa265e3264ff1f908bc6d
Signed-off-by: Richard Mansfield <richard.mansfield@catalyst.net.nz>
11 years agoUpgrade TinyMCE from 3.3.8 to 3.4.2 (bug #750815)
Darryl Hamilton [Fri, 29 Apr 2011 01:55:17 +0000 (13:55 +1200)]
Upgrade TinyMCE from 3.3.8 to 3.4.2 (bug #750815)

This includes updated language packs, and removal of the
media plugin (see c5c0cf7b9454ddfed516ae0c6b6e8345f9503620).

Change-Id: Iec45662f9ae9dac42b09ac9a240160ac06e3e998
Signed-off-by: Darryl Hamilton <darrylh@catalyst.net.nz>
11 years agoMerge "Fix bug with institutional quotas"
Francois Marier [Thu, 2 Jun 2011 04:35:58 +0000 (16:35 +1200)]
Merge "Fix bug with institutional quotas"

11 years agoFix bug with institutional quotas
Hugh Davenport [Thu, 2 Jun 2011 04:12:25 +0000 (16:12 +1200)]
Fix bug with institutional quotas

The code to automatically get the default quota did
not do the following:
- Check if user was site admin
- Return json requests correctly

This patch fixes these bugs

Introduced in the following commit
cc8c6d0d931709765b94917a97ff1aba876d60b9

Change-Id: Id35b489eeacf19ea56a35585b3aa6bb9d82d54f3
Signed-off-by: Hugh Davenport <hugh@catalyst.net.nz>
11 years agoMerge "Update user info on login can prevent re-login if a LDAP attribute is empty."
Francois Marier [Thu, 2 Jun 2011 00:15:30 +0000 (12:15 +1200)]
Merge "Update user info on login can prevent re-login if a LDAP attribute is empty."

11 years agoAdd group quotas
Hugh Davenport [Mon, 23 May 2011 00:48:47 +0000 (12:48 +1200)]
Add group quotas

Change-Id: Id4880764ab395ea56395a57f52258968097bb02b
Signed-off-by: Hugh Davenport <hugh@catalyst.net.nz>
11 years agoUpdate user info on login can prevent re-login if a LDAP attribute is empty.
Iñaki Arenaza [Tue, 31 May 2011 21:00:24 +0000 (23:00 +0200)]
Update user info on login can prevent re-login if a LDAP attribute is empty.

If the LDAP attribute is empty, some LDAP servers don't return the attribute in
the answer (as an empty value). This means the missing attribute is not present
in the $ldapdetails array returned by get_userinfo_ldap(). If we try to compare
the missing entry with the existing user value, they are always different
(unless the existing entry was also empty). Which means we assign an empty value
to the user profile field (which is not allowed by the db).

Simply testing if the LDAP attribute has been retrieved and is not empty before
making the comparison fixes the problem.

Tested with both MS AD (on W2003) and OpenLDAP 2.4.23 (on Debian).

Fixes bug #656679 (which also fixes bug #788029)

Change-Id: I81b59114b7fedeb8b575738b21ca4d6fd2670532
Signed-off-by: Iñaki Arenaza <iarenaza@mondragon.edu>
11 years agoMerge "Fix issue with collections when page is outside shown range"
Francois Marier [Wed, 1 Jun 2011 06:13:40 +0000 (18:13 +1200)]
Merge "Fix issue with collections when page is outside shown range"

11 years agoMerge "Add institutional override for user quotas"
Francois Marier [Wed, 1 Jun 2011 06:08:32 +0000 (18:08 +1200)]
Merge "Add institutional override for user quotas"

11 years agoAdd institutional override for user quotas
Hugh Davenport [Mon, 23 May 2011 00:41:44 +0000 (12:41 +1200)]
Add institutional override for user quotas

Also add in default quota for each institution

Change-Id: Ibfdd5a10990e9c6a936b9ad5921f734df1f5c805
Signed-off-by: Hugh Davenport <hugh@catalyst.net.nz>
11 years agoMerge "Fix link on export page (bug #790466)"
Francois Marier [Wed, 1 Jun 2011 05:46:10 +0000 (17:46 +1200)]
Merge "Fix link on export page (bug #790466)"

11 years agoFix link on export page (bug #790466)
Hugh Davenport [Tue, 31 May 2011 03:39:21 +0000 (15:39 +1200)]
Fix link on export page (bug #790466)

Change-Id: Ia8376964f279c368779fa78dc137adf3041cbeb4
Signed-off-by: Hugh Davenport <hugh@catalyst.net.nz>
11 years agoMerge "Move forum list code into function"
Francois Marier [Wed, 1 Jun 2011 04:43:38 +0000 (16:43 +1200)]
Merge "Move forum list code into function"

11 years agoMerge "Allow anon users to view public forum topics"
Francois Marier [Wed, 1 Jun 2011 04:41:14 +0000 (16:41 +1200)]
Merge "Allow anon users to view public forum topics"

11 years agoMerge "Add last post edit time to forum topic information"
Francois Marier [Wed, 1 Jun 2011 04:39:29 +0000 (16:39 +1200)]
Merge "Add last post edit time to forum topic information"

11 years agoFix error log on creating new forum (bug #788951)
Hugh Davenport [Tue, 31 May 2011 23:34:47 +0000 (11:34 +1200)]
Fix error log on creating new forum (bug #788951)

Change-Id: Ic2ff7a9e2b836dfaedead7a4be002dccdc528ac2
Signed-off-by: Hugh Davenport <hugh@catalyst.net.nz>
11 years agoMerge "Fix bug when updating access with no views"
Francois Marier [Tue, 31 May 2011 05:12:25 +0000 (17:12 +1200)]
Merge "Fix bug when updating access with no views"

11 years agoMerge "Update the session language on change of user preference"
Richard Mansfield [Tue, 31 May 2011 03:38:04 +0000 (15:38 +1200)]
Merge "Update the session language on change of user preference"

11 years agoMerge changes Icf28f531,I310bed95,I058f3a1a,I6cf82916
Richard Mansfield [Tue, 31 May 2011 03:37:47 +0000 (15:37 +1200)]
Merge changes Icf28f531,I310bed95,I058f3a1a,I6cf82916

* changes:
  Add 'My institutions' filter drop-down to find friends page
  Add institutions filter to pagination links in search results
  Add institutions filter to user search query
  Add institution filter parameter to user search page

11 years agoMerge "Pull all the mimetypes from db in one hit when trying to identify files"
Richard Mansfield [Tue, 31 May 2011 03:36:31 +0000 (15:36 +1200)]
Merge "Pull all the mimetypes from db in one hit when trying to identify files"

11 years agoMerge "Fix error log when importing from moodle via leap"
Francois Marier [Tue, 31 May 2011 03:24:52 +0000 (15:24 +1200)]
Merge "Fix error log when importing from moodle via leap"

11 years agoMerge "Adding SlideShare iframe filter"
Francois Marier [Tue, 31 May 2011 03:23:11 +0000 (15:23 +1200)]
Merge "Adding SlideShare iframe filter"

11 years agoFix error log when importing from moodle via leap
Hugh Davenport [Tue, 31 May 2011 02:12:56 +0000 (14:12 +1200)]
Fix error log when importing from moodle via leap

Bug #789719

Before the data was imported, but there was an error log, and now
the data imports but with no error log.

Change-Id: If724d33dafc19bfe42721f6ff81b8a7dfd83b0ef
Signed-off-by: Hugh Davenport <hugh@catalyst.net.nz>
11 years agoUpdate the session language on change of user preference
Richard Mansfield [Mon, 30 May 2011 21:28:56 +0000 (09:28 +1200)]
Update the session language on change of user preference

When a user changes their language preference, this change ensures
that the session language is also updated at the same time.

This means the user language is retained when the user logs out,
and in the case where they remove their language preference
altogether, the session language (which is normally used in
preference to the site default) is cleared too.

Change-Id: I29236709643ce95586900b1ea4f75c69bf1a33d4
Signed-off-by: Richard Mansfield <richard.mansfield@catalyst.net.nz>
11 years agoMerge "Updating access to zero pages throws error"
Francois Marier [Mon, 30 May 2011 03:11:48 +0000 (15:11 +1200)]
Merge "Updating access to zero pages throws error"

11 years agoMerge "Fix display issue with groupviews blocktype"
Francois Marier [Sun, 29 May 2011 23:51:27 +0000 (11:51 +1200)]
Merge "Fix display issue with groupviews blocktype"

11 years agoUpdating access to zero pages throws error
Hugh Davenport [Fri, 27 May 2011 02:41:10 +0000 (14:41 +1200)]
Updating access to zero pages throws error

This fix makes it only update access if there is something
to update

Bug #788457

Change-Id: If0775025ffffcd4e60086693bc616b7fd73a39a9
Signed-off-by: Hugh Davenport <hugh@catalyst.net.nz>
11 years agoMerge "Make group info box not display a title"
Francois Marier [Fri, 27 May 2011 01:56:01 +0000 (13:56 +1200)]
Merge "Make group info box not display a title"

11 years agoAdding SlideShare iframe filter
Brett Wilkins [Tue, 24 May 2011 04:28:37 +0000 (16:28 +1200)]
Adding SlideShare iframe filter

Slideshare is a service for hosting and sharing slideshows
More at http://www.slideshare.net

Change-Id: I35f3aa138da4833a7f230d767730cecf03a11d18
Signed-off-by: Brett Wilkins <brett@catalyst.net.nz>
11 years agoMerge "Fix lang string 'canteditdontown' for certain sections"
Francois Marier [Fri, 27 May 2011 00:23:07 +0000 (12:23 +1200)]
Merge "Fix lang string 'canteditdontown' for certain sections"

11 years agoFix lang string 'canteditdontown' for certain sections
Hugh Davenport [Wed, 25 May 2011 00:06:18 +0000 (12:06 +1200)]
Fix lang string 'canteditdontown' for certain sections

Most of these get_string calls were not using a section
name. This patch fixes this by adding these strings to
each section responsible.

Bug #787866

Change-Id: I81ec38d7572f9472cf54885d6b35d542b933bca6
Signed-off-by: Hugh Davenport <hugh@catalyst.net.nz>
11 years agoMerge "Fix find groups page to show correct buttons"
Francois Marier [Fri, 27 May 2011 00:16:59 +0000 (12:16 +1200)]
Merge "Fix find groups page to show correct buttons"

11 years agoMerge "Fix directory permissions on uploadmanager"
Richard Mansfield [Thu, 26 May 2011 23:31:47 +0000 (11:31 +1200)]
Merge "Fix directory permissions on uploadmanager"

11 years agoMerge "Fix fatal error when checking access of group or institutional pages"
Richard Mansfield [Thu, 26 May 2011 23:23:14 +0000 (11:23 +1200)]
Merge "Fix fatal error when checking access of group or institutional pages"

11 years agoAdd 'My institutions' filter drop-down to find friends page
Richard Mansfield [Thu, 26 May 2011 22:58:05 +0000 (10:58 +1200)]
Add 'My institutions' filter drop-down to find friends page

Change-Id: Icf28f531ed0691b3e5b9da12bf042ea60107fbc8
Signed-off-by: Richard Mansfield <richard.mansfield@catalyst.net.nz>
11 years agoAdd institutions filter to pagination links in search results
Richard Mansfield [Thu, 26 May 2011 22:52:28 +0000 (10:52 +1200)]
Add institutions filter to pagination links in search results

When the myinstitutions filter option is passed to build_userlist_html,
make sure the filter is propagated to the query string in the pagination
links at the bottom of the search results.

Also removes unused variables from the smarty template.

Change-Id: I310bed95529160c1592fae48398d1b491382444d
Signed-off-by: Richard Mansfield <richard.mansfield@catalyst.net.nz>
11 years agoAdd institutions filter to user search query
Richard Mansfield [Thu, 26 May 2011 22:50:25 +0000 (10:50 +1200)]
Add institutions filter to user search query

If the 'myinstitutions' option is passed to search_user(), add an
institution subselect to the query so that only users sharing an
institution with the logged-in user are returned.

Change-Id: I058f3a1ab4921da6faa934aebebd0a3f2d2d18c8
Signed-off-by: Richard Mansfield <richard.mansfield@catalyst.net.nz>
11 years agoAdd institution filter parameter to user search page
Richard Mansfield [Thu, 26 May 2011 23:09:35 +0000 (11:09 +1200)]
Add institution filter parameter to user search page

On find friends page and associated json script, take a 'filter' param
and pass it through to both the search function and the pagination
builder.

The only valid options will be 'myinstitutions' (to filter results by
users who are in one or more of the logged-in user's institutions),
and 'all', to search everyone on the site.

The new parameter defaults to 'all' when the logged-in user is not in
any institutions.

Change-Id: I6cf829162bc0374ef63fa6848bd7f00755050bcc
Signed-off-by: Richard Mansfield <richard.mansfield@catalyst.net.nz>
11 years agoFix display issue with groupviews blocktype
Hugh Davenport [Thu, 26 May 2011 05:54:59 +0000 (17:54 +1200)]
Fix display issue with groupviews blocktype

When not configured, it doesn't use the default values

Bug #787444

Change-Id: I0274986fc40d418ecf8d876bf811796e18b53e4c
Signed-off-by: Hugh Davenport <hugh@catalyst.net.nz>
11 years agoFix directory permissions on uploadmanager
Hugh Davenport [Thu, 26 May 2011 05:05:20 +0000 (17:05 +1200)]
Fix directory permissions on uploadmanager

Bug #788124

Change-Id: I56ac380aa8865fee5b676b989f6c100007f1d70b
Signed-off-by: Hugh Davenport <hugh@catalyst.net.nz>
11 years agoFix fatal error when checking access of group or institutional pages
Hugh Davenport [Thu, 26 May 2011 04:37:34 +0000 (16:37 +1200)]
Fix fatal error when checking access of group or institutional pages

Bug #788460

Change-Id: Ib39b2d91bfa2cde4295a864e2efcbb9b9b39c709
Signed-off-by: Hugh Davenport <hugh@catalyst.net.nz>
11 years agoMerge "Implementing maximum width/height for WikiEducator filter"
Francois Marier [Thu, 26 May 2011 04:27:06 +0000 (16:27 +1200)]
Merge "Implementing maximum width/height for WikiEducator filter"

11 years agoMerge "Adding Glogster iframe filter"
Francois Marier [Thu, 26 May 2011 04:22:31 +0000 (16:22 +1200)]
Merge "Adding Glogster iframe filter"

11 years agoMake group info box not display a title
Hugh Davenport [Thu, 26 May 2011 02:51:03 +0000 (14:51 +1200)]
Make group info box not display a title

Bug #785760

Change-Id: I920ed50add97887a7800f99b88cee4d3216ddcf6
Signed-off-by: Hugh Davenport <hugh@catalyst.net.nz>
11 years agoMerge "Change default institution for CSV user creation when site admin"
Richard Mansfield [Thu, 26 May 2011 03:54:31 +0000 (15:54 +1200)]
Merge "Change default institution for CSV user creation when site admin"

11 years agoMerge "Change default file quota to be 50MB everywhere"
Richard Mansfield [Thu, 26 May 2011 02:43:12 +0000 (14:43 +1200)]
Merge "Change default file quota to be 50MB everywhere"

11 years agoMerge changes I49c53ac6,I74c229a4,I64449174,Ie46e9d05,I3a409149,I9ffb6ce0,I439501b3...
Richard Mansfield [Thu, 26 May 2011 02:08:27 +0000 (14:08 +1200)]
Merge changes I49c53ac6,I74c229a4,I64449174,Ie46e9d05,I3a409149,I9ffb6ce0,I439501b3,I3b885fcb,If6294c56

* changes:
  Remove old public_fields() functions from internal artefact & search plugins.
  Add more detail to help & description of mandatory & searchable fields
  Add config and help item for exact user search option
  Interpret double-quoted phrases in user search queries as single terms
  Simplify user search query
  Add usr table indexes for faster searches
  Reduce the number of searchable profile fields
  Fix warning when no values are submitted to checkboxes element
  Make checkboxes pieform element work with disabled checkboxes

11 years agoChange default file quota to be 50MB everywhere
Hugh Davenport [Thu, 26 May 2011 01:22:30 +0000 (13:22 +1200)]
Change default file quota to be 50MB everywhere

Bug #786783

Change-Id: Iae7e03e15caf0bd9ac8cfa5f6c7174878abfb7a3
Signed-off-by: Hugh Davenport <hugh@catalyst.net.nz>
11 years agoTrim usernames when requesting login
Hugh Davenport [Thu, 26 May 2011 01:10:48 +0000 (13:10 +1200)]
Trim usernames when requesting login

Through both manual login and mobileuploads

Bug #787313

Change-Id: I709d2de9644142bd5f6c78f1e0d7ba451f99de40
Signed-off-by: Hugh Davenport <hugh@catalyst.net.nz>
11 years agoRemove old public_fields() functions from internal artefact & search plugins.
Richard Mansfield [Tue, 24 May 2011 06:27:24 +0000 (18:27 +1200)]
Remove old public_fields() functions from internal artefact & search plugins.

Change-Id: I49c53ac628f77b99507436fedec938097d54f7d7
Signed-off-by: Richard Mansfield <richard.mansfield@catalyst.net.nz>
11 years agoAdd more detail to help & description of mandatory & searchable fields
Richard Mansfield [Tue, 24 May 2011 06:04:04 +0000 (18:04 +1200)]
Add more detail to help & description of mandatory & searchable fields

Change-Id: I74c229a498e9b1dbfd9bbaa09f8cc5f219e42b48
Signed-off-by: Richard Mansfield <richard.mansfield@catalyst.net.nz>
11 years agoAdd config and help item for exact user search option
Richard Mansfield [Wed, 25 May 2011 05:52:09 +0000 (17:52 +1200)]
Add config and help item for exact user search option

Change-Id: I644491740622d242677c06bb24779e676ad93838
Signed-off-by: Richard Mansfield <richard.mansfield@catalyst.net.nz>
11 years agoInterpret double-quoted phrases in user search queries as single terms
Richard Mansfield [Tue, 24 May 2011 23:19:25 +0000 (11:19 +1200)]
Interpret double-quoted phrases in user search queries as single terms

Change-Id: Ie46e9d05ee6f7774be604f1ba8d35c0feddfa00d
Signed-off-by: Richard Mansfield <richard.mansfield@catalyst.net.nz>
11 years agoSimplify user search query
Richard Mansfield [Tue, 24 May 2011 01:26:19 +0000 (13:26 +1200)]
Simplify user search query

Use the searchable profile fields from the internal artefact instead
of the 'public' fields.  Because these are all fields from the usr table,
this the join on the artefact table to be removed, and the same query can
then be used for both postgres and mysql.

Use either = or ILIKE to match fields depending on the value of the
'exactusersearch' config option.  Use of = allows the lowercase index to
be used in postgres searches.

Change the query to AND the search terms together instead of using OR.

Change-Id: I3a409149ee413fe59060e4e507ce58e34ebeb115
Signed-off-by: Richard Mansfield <richard.mansfield@catalyst.net.nz>
11 years agoAdd usr table indexes for faster searches
Richard Mansfield [Wed, 25 May 2011 23:55:36 +0000 (11:55 +1200)]
Add usr table indexes for faster searches

Search is much faster in Postgres with these indexes on the lowercase
profile fields.

In MySQL we can't create the indexes without changing the types of the
column from text to varchar.  An upgrade to do this would have to be
destructive, and would require admin notification.  It's not worth doing
that, because MySQL cannot create indexes on functions of columns,
and we could not create the lowercase indexes that would be useful for
user searches.

Change-Id: I9ffb6ce02a5f3e8fc2cf158424b37b754edd8d34
Signed-off-by: Richard Mansfield <richard.mansfield@catalyst.net.nz>
11 years agoReduce the number of searchable profile fields
Richard Mansfield [Mon, 23 May 2011 06:22:58 +0000 (18:22 +1200)]
Reduce the number of searchable profile fields

Change 'Public' to 'Searchable' in internal artefact config, because
that is now a more accurate description of what they are.

Reduce the allowed searchable fields to name, email & student id,
because these are the only fields returned in search users anyway.

Use checkboxes elements rather than multicolumntable to avoid a long
list of mostly disabled checkboxes under 'Searchable'.

Change-Id: I439501b30735ca899bc051f3bda79a2d272cdf45
Signed-off-by: Richard Mansfield <richard.mansfield@catalyst.net.nz>