Editing user prefs when no project exists triggers error

It was not possible to update a user's preferences when no projects
exists (e.g. right after installation), Mantis triggered application
error 20.

We now omit 'All projects' from the default project selection list only
when the project count is 1.

Fixes #16420
Fixes #16416: Improve first login experience by auto-redirecting to create project page.

If MantisBT is pre-installed, the user lands in My View Page without knowing what to do.
We should handle the "first login" experience in MantisBT itself rather than the installation
and provide a helpful getting started over time. For now, we should start with auto-redirecting
to create project page if user is administrator and there aren't at least 1 project in the database.

The cost of this check is one cheap query on the projects table that returns 0 or 1 entries
which is only run at login of an administrator.
Fix #0016431: Numerous "Invalid argument supplied for foreach()" errors when installing with DB script printed to screen

Signed-off-by: Damien Regad <dregad@mantisbt.org>
Don't use '===' when checking return value of config_get()

Follow-up on f2e6550eed6229427392cd995666fe5c000749ea as suggested by
atrol, for consistency use '==' instead like elsewhere in the code.
Fix #15790: url_get() curl user agent is now mantis

Instead of a generic 'curl/version' we now report 'mantisbt/version
php-curl/version'
Add .htaccess to protect library folder the same way core folder is protected.
Fix #15790: with the '/' this time
Fixes #16444: Remove nusoap from 1.3 release

In 1.2.x releases we have deprecated the usage of nusoap in favor of using the
PHP SOAP extension due to speed, memory, and some encoding issues.
In 1.3 release, we should drop the dependency on nusoap completely.

This change includes the following:
- Removal of the library.
- Removed all references to it.
- Added a check section for webservice to make sure that the extension is enabled and nusoap folder doesn't exist.
- Added a check in mantisconnect.php to exit with an error message if the php extension doesn't exist.
Rename 'SOAP' to 'Webservice' for future use when we support different web service output apis
Revert + Update Language file format
From d8a27b71ee4c01d5e2bebceef31a0b9f915ec7c8 Mon Sep 17 00:00:00 2001
From: David Hicks <d@hx.id.au>
Date: Tue, 19 Apr 2011 21:25:28 +1000
Subject: [PATCH 018/449] Rename Array() calls to array()

Function names in PHP are case insensitive. We should be using the
default/standard style - lowercase naming.
From ccd964ce147cae9f8de1178f8a6c92bba7e61215 Mon Sep 17 00:00:00 2001
From: David Hicks <d@hx.id.au>
Date: Tue, 19 Apr 2011 21:07:47 +1000
Subject: [PATCH 017/449] view_all_set.php: use header redirect instead of
 meta tag refresh
From ce9cf17e037d28bcc7b75e3946b6d7dbe547c1f1 Mon Sep 17 00:00:00 2001
From: Paul <paul@mantisforge.org>
Date: Tue, 19 Apr 2011 11:21:10 +0100
Subject: [PATCH 014/449] Fix warnings generated by logging api
Remove un-needed php compatibility functions
Add check for status of magic quotes runtime
login_page needs to pull in install_helper_functions_api

To read schema.php, a function definition for db_null_date() is
required. This function is defined within
install_helper_functions_api.php.

Therefore login_page.php needs to include install_helper_functions_api
prior to reading the schema.
"Array" should still be used for javascript
silence deprecated warning
Remove gpc_strip_slashes
Set version number for plugins to 1.3