Load the search page earlier.

There's no need to delay it until after the user's
information has been loaded.

Change-Id: Ie099fd3801a8ff867bb7325f2b159c40c9879f73
Corrent the file-name search's async flag.

If there were no projects, then there are no async results
to wait for.

Change-Id: Ia1c2e638be8ed1629608a9868e0ddd31c80bc9a8
Fix error handler creation.

Change-Id: I6b674faafebfe59f759cde2f374b53ebe9654848
Fix loading of null revision.

If the caller hasn't specified a revision we need a suitable
default. Currently '0' will error in the backend leaving us
with an empty file.

Change-Id: Ie883b0cac6787044b0c33e589ad8e72ca610f68b
Better AUTOSAVE load handling.

If the caller requests AUTOSAVE, but there isn't one,
don't show the user an empty file -- fall back to the
last save instead.

Change-Id: Ie45c34f30bc978754383e7e92d5440ec6a60a67e
Remove redundant variable.

Change-Id: I469da3aed57b683803b697d6042f92bd5e3c08ba
Let the selection range be specified before the file loads.

Build a cache of actions that need to be done once the file content
is loaded & then execute them after we're called back. This allows
callers that open the file to setup interactions that otherwise
would need to wait until it was fully loaoded.

Change-Id: Ie85fe92314719576f90619e22966d53df10d7a81
Add support for searching the contents of files.

This searches all the files in all the projects for the current
team, providing probably the most useful seach implemented thus far.

This uses git's grep function in plaintext mode (-F) avoiding the
need for users to understand about regular expressions, or get
potentially suprising results from searching for items containing
regex characters. Ideally I'd like to offer an advanced mode where
some form of wildcard or regex pattern is supported, but due to the
differences in JS and grep patterns, this isn't immediately doable.

Change-Id: I4ad7f4e26ba397ec45eb5364c3527ea5f782f381
Replace the forgotten password link with a help box.

This contains more up-to-date information about what to do if
the user has forgotten their password, as well as links to
pages that do exist which should help them resolve the siutation.

Change-Id: Ideb10d1b7efe73f40faa2a3e180da2807f236c1e
Fix #1364: Reduce the presence of hard-coded SR links.

This allows for development alongside other SR services
at a completely separte URL. The remaining srobo.org urls
are present as defaults or placeholders.

Change-Id: Ifdb4adfd1b4aae991824e8b89501966d310aa61e
Don't work out the extension manually.

Change-Id: I30a39ac08173ce00286e5a42ab5c32b3a49382ac
Don't try to remove a folder whilst in it.

We'll see this folder again as a listing in the parent,
from where it makes more sense to try to remove it.
This also ensures that we won't ever try to remove the
root folder that we're iterating through, and avoids a
PHP error from trying to remove something that ends in '/.'

Change-Id: I5c0dbf24964ab3c868db7c17743326c3caa6a2f4
Allow empty commit messages.

It appears that the previous mechanism for achieving this
no longer works, probably because git strips trailing
whitespace from commits. Fix this by using --allow-empty-message
and add a test.

Change-Id: I3f8206af541301950dca5c098b47d69ff3f487dd
Fix typo in comment.

Change-Id: I7ada57d5abbf79e11551ef46ecd019ed32a57f7e
Remove a redundant partial() call.

partial() & bind() use the same logic, calls to partial()
outside a bind() can therefore be combined into just the bind().

Change-Id: I3582568bba2612f52b585ed42364c8c9ad0f2eb3
Make the error-check retry use the same args.

Previously it just used some of them..

Change-Id: I62cf0a967e3aa5d68c5f06177a629006d66fcd81
Avoid backend error when re-checking a file.

Previously, the final parameter passed to the check method when
this signal fired was the event being signalled. This didn't appear
to cause any issues, but did result in the backend outputting
an error about passing an object to escapeshellargs.

Adding the additional null to this bind ensures that we're always
passing valid arguments through.

Change-Id: I848117af00ca9113190be65f20c996a1c02f2624
Whitespace.

Change-Id: Ic07d47d58453345cc9a3757b9a90c15f665a06c9
Remove debug line that produces PHP errors.

From the use of the undefined $hash variable.

Change-Id: I0d8814459546d8141b64f1d980466d01cc84346f
Fix #1731: Add an instruction about the search results.

Change-Id: I4e49bbf483f5abcf896b3bc48ea8a56ca70e4019