2
0
mirror of https://github.com/ACSPRI/queXS synced 2024-04-02 12:12:16 +00:00

Merging the updated Limesurvey 1.92+ branch of queXS to trunk

This commit is contained in:
azammitdcarf
2012-11-21 04:04:39 +00:00
parent 153fc8ca0d
commit c569559964
856 changed files with 254260 additions and 819988 deletions

View File

@@ -10,7 +10,7 @@
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*
* $Id: common.php 10703 2011-08-12 14:00:51Z shnoulle $
* $Id: common.php 12242 2012-01-27 23:41:13Z c_schmitz $
*/
//Security Checked: POST, GET, SESSION, DB, REQUEST, returnglobal
@@ -21,8 +21,6 @@ if (!isset($dbprefix) || isset($_REQUEST['dbprefix'])) {safe_die("Cannot run thi
// Include version information
require($rootdir.'/version.php');
require($rootdir."/common_functions.php");
// Include dTexts
require_once(dirname(__FILE__).'/classes/dTexts/dTexts.php');
// Check for most necessary requirements
// Now check for PHP & db version
@@ -143,7 +141,7 @@ if ($sourcefrom == "admin")
}
else
{
$captchapath=$rooturl.'/';
$captchapath=$rooturl.'/';
}
//check if databasename is set in config file
@@ -165,7 +163,7 @@ switch ($databasetype)
break;
case "mssql_n":
case "mssqlnative":
case "mssql": if ($databaseport!="default") {$dbhost="$databaselocation,$databaseport";}
case "odbtp": if ($databaseport!="default") {$dbhost="$databaselocation,$databaseport";}
else {$dbhost=$databaselocation;}
break;
case "odbc_mssql": $dbhost="Driver={SQL Server};Server=$databaselocation;Database=".$databasename;
@@ -235,7 +233,7 @@ if ($databasetype=='odbc_mssql' || $databasetype=='odbtp' || $databasetype=='mss
if (!$database_exists && !$cmd_install && (strcasecmp($slashlesspath,str_replace(array("\\", "/"), "", $homedir."install")) != 0)) {
die ("<br/>The LimeSurvey database does not exist. Please run the <a href='$homeurl/install/index.php'>install script</a> to create the necessary database.");
}
// Check if the DB is up to date and access is not via install script
if ($dbexistsbutempty && !$cmd_install && (strcasecmp($slashlesspath,str_replace(array("\\", "/"), "", $homedir."install")) != 0)) {
die ("<br />The LimeSurvey database does exist but it seems to be empty. Please run the <a href='$homeurl/install/index.php'>install script</a> to create the necessary tables.");
@@ -252,47 +250,47 @@ $updatekeyvaliduntil='';
require ($homedir.'/globalsettings.php');
SSL_mode();// This really should be at the top but for it to utilise getGlobalSetting() it has to be here
$showXquestions = getGlobalSetting('showXquestions');
$showxquestions = getGlobalSetting('showxquestions');
$showgroupinfo = getGlobalSetting('showgroupinfo');
$showqnumcode = getGlobalSetting('showqnumcode');
if ($sourcefrom == "admin")
{
require_once($homedir.'/admin_functions.php');
}
}
// Check if the DB is up to date
If (!$dbexistsbutempty && $sourcefrom=='admin')
{
$usrow = getGlobalSetting('DBVersion');
if (intval($usrow)<$dbversionnumber)
if (floatval($usrow)<$dbversionnumber)
{
$action='';
require_once($rootdir.'/classes/core/language.php');
$clang = new limesurvey_lang($defaultlang);
include_once($homedir.'/update/updater.php');
if(isset($_GET['continue']) && $_GET['continue']==1)
if(isset($_GET['continue']) && $_GET['continue']==1)
{
echo getAdminHeader();
CheckForDBUpgrades();
echo "<br /><a href='$homeurl'>".$clang->gT("Back to main menu")."</a></div>";
//updatecheck();
echo getAdminFooter("http://docs.limesurvey.org", $clang->gT("LimeSurvey online manual"));
echo getAdminFooter("http://docs.limesurvey.org", $clang->gT("LimeSurvey online manual"));
}
else
{
{
echo getAdminHeader(),
'<div class="messagebox">',CheckForDBUpgrades(),'</div>',
'<div class="messagebox">',CheckForDBUpgrades(),'</div>',
getAdminFooter("http://docs.limesurvey.org", $clang->gT("LimeSurvey online manual"))
;
}
}
die;
}
if (is_dir($homedir."/install") && $debug<2)
{
die ("<p style='text-align: center; margin-left: auto; margin-right: auto; width: 500px; margin-top: 50px;'><img src='../images/limecursor-handle.png' /><strong>Congratulations</strong><br /><br />Your installation is now complete. The final step is to remove or rename the LimeSurvey installation directory (admin/install) on your server since it may be a security risk.<br /><br />Once this directory has been removed or renamed you will be able to log in to your new LimeSurvey Installation.<br /><br /><a href='admin.php'>Try again</a></p>");
}
}
}
//Admin menus and standards