fix roles bug in usercommands::register

(cherry picked from commit f75adee29a32aa7c5b2952990e40d5651f5db523)
Merge branch 'sf-master' into sf-live

Conflicts:
	src/models/commands/UserCommands.php
fix up index.php
Fix links on the Activity Page

Due to refactoring, the links to projects, texts, and questions on the Activity Page needed to be updated.
Also disable User links until public profiles get implemented
Run E2E tests in ScriptureForge build

The ScriptureForge build process will now run the E2E tests on the build
agent, just as the LanguageForge build process does.
Modify E2E test config to use correct app dir

Using /src as an APPDIR value works on development machines, but on
build machines the code is running on the webserver, which means the
APPDIR value should be /htdocs instead.
E2E tests in SF build: allow changing config files

In the installation for E2E testing (and ONLY in that installation, not
in the main build), we make htdocs/config group-writable so that the E2E
testing scripts can put the appropriate test configuration into place,
then remove it when they're finished. We also make sure that the scripts
putting that configuration into place are correctly looking in htdocs/
rather than in src/.
Fix errant line in SF build
SF build: make E2E setup scripts executable

The useTestConfig.sh and useLiveConfig.sh setup scripts are executable
in git, but the executable bit is being stripped by the tar/untar build
step. Restore the executable bit to these two necessary files before
running the E2E tests.
SF build: cosmetic change to E2E test URL
E2E tests in SF build: use same baseUrl as on dev

Instead of creating a new baseUrl for the tests, we'll use the exact
same baseUrl (scriptureforge.local) that we're using on dev machines.
That will remove the need to add a new Website class instance in the
code. (Though adding a new Website class instance wouldn't be a bad
solution either.)
Disable E2E tests on SF build

We'll be changing how the E2E tests are run on TeamCity: instead of
running them via ant on the Linux build agent, we'll be running them in
a Windows build agent after the Linux build agent completes its work.
The first step is to make sure that the Linux build agent does NOT run
the actual tests (but we still want to run installForE2ETest because
that sets up the Apache server that will be used by the Windows build
agent when it runs the actual E2E tests).

Note that we're disabling this step by renaming it, rather than by
commenting it out, because XML comments cannot contain the "--" string
(as the long-form options use).
Update SF build to run E2E tests every time

The E2E tests will be run on a dedicated TeamCity build agent, currently
running Windows XP though it will be upgraded to Windows 7 very soon. It
is in a separate agent pool on TeamCity, so no builds will normally be
sent to that agent -- which means that it will never have a build
running at the same time as a set of Selenium tests (which could slow
down the build *and* the tests considerably).
SF build: Move editing step to before chmod step

It seems that editing files is resetting their permissions, in
particular the +x permission bit on the use*Config.sh scripts. Moving
the editing of those files to *before* the chmod step should take care
of that problem.
SF build: Fix karma.conf.js location

The file="" attribute in Ant's <arg> task is based on the root of the
build directory, not the dir="" attribute of the <exec> task. So it
needs to be "test/karma.conf.js", not "karma.conf.js".
Add Website entry for e2etest.scriptureforge.local
Use e2etest.scriptureforge.local URL for testing

Since we now have an entry in Website.php for e2etest.sf.local, we can
now use it for the E2E testing.
index.php should not depend on absolute path names
Back to scriptureforge.local for E@E test URL

Since the setupTestEnvironment.php script hardcodes scriptureforge.local
in its project setup code, we'll use the same site name in our E2E
tests. That will need to change eventually, but first we should get the
E2E tests running green across the board before we start making changes.
SF E2E tests should use HTTPS in base URL

Since all ScriptureForge sites are using SSL, we should test with SSL.