Skip to content

Commit

Permalink
Updated translation: German
Browse files Browse the repository at this point in the history
Updated translation: German Informal
New feature: Start/Expiry is now date and time (previously only date)

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey@8101 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
c-schmitz committed Dec 8, 2009
1 parent f415952 commit 51f5fdd
Show file tree
Hide file tree
Showing 15 changed files with 665 additions and 594 deletions.
17 changes: 5 additions & 12 deletions admin/database.php
Expand Up @@ -1045,7 +1045,7 @@ function get_max_question_order($gid)
}
else
{
$datetimeobj = new Date_Time_Converter($_POST['expires'],$formatdata['phpdate']);
$datetimeobj = new Date_Time_Converter($_POST['expires'], $formatdata['phpdate'].' H:i');
$_POST['expires']=$datetimeobj->convert("Y-m-d H:i:s");
}
if (trim($_POST['startdate'])=="")
Expand All @@ -1054,7 +1054,7 @@ function get_max_question_order($gid)
}
else
{
$datetimeobj = new Date_Time_Converter($_POST['startdate'],$formatdata['phpdate']);
$datetimeobj = new Date_Time_Converter($_POST['startdate'],$formatdata['phpdate'].' H:i');
$_POST['startdate']=$datetimeobj->convert("Y-m-d H:i:s");
}

Expand Down Expand Up @@ -1265,11 +1265,6 @@ function get_max_question_order($gid)
$databaseoutput .= "<script type=\"text/javascript\">\n<!--\n alert(\"".$clang->gT("Survey could not be created because it did not have a title","js")."\")\n //-->\n</script>\n";
} else
{
if (trim($_POST['expires'])=="")
{
$_POST['expires']='1980-01-01';
}

// Get random ids until one is found that is not used
do
{
Expand Down Expand Up @@ -1312,20 +1307,18 @@ function get_max_question_order($gid)
}
else
{
$datetimeobj = new Date_Time_Converter($_POST['expires'] , "d.m.Y H:i:s");
//$browsedatafield=$datetimeobj->convert($dateformatdetails['phpdate'].' H:i');
$datetimeobj = new Date_Time_Converter($_POST['expires'] , "d.m.Y H:i");
$browsedatafield=$datetimeobj->convert("Y-m-d H:i:s");
$_POST['expires']=$browsedatafield;
}

if (trim($_POST['startdate'])=='')
{
$_POST['expires']=null;
$_POST['startdate']=null;
}
else
{
$datetimeobj = new Date_Time_Converter($_POST['startdate'] , "d.m.Y H:i:s");
//$browsedatafield=$datetimeobj->convert($dateformatdetails['phpdate'].' H:i');
$datetimeobj = new Date_Time_Converter($_POST['startdate'] , "d.m.Y H:i");
$browsedatafield=$datetimeobj->convert("Y-m-d H:i:s");
$_POST['startdate']=$browsedatafield;
}
Expand Down
32 changes: 16 additions & 16 deletions admin/html.php
Expand Up @@ -326,12 +326,12 @@
}
elseif ($activated == "Y")
{
if ($surveyinfo['expires']!='' && ($surveyinfo['expires'] < date_shift(date("Y-m-d H:i:s"), "Y-m-d", $timeadjust)))
if ($surveyinfo['expires']!='' && ($surveyinfo['expires'] < date_shift(date("Y-m-d H:i:s"), "Y-m-d H:i", $timeadjust)))
{
$surveysummary .= "<img src='$imagefiles/expired.png' "
. "alt='".$clang->gT("This survey is active but expired.")."' />\n";
}
elseif (($surveyinfo['startdate']!='') && ($surveyinfo['startdate'] > date_shift(date("Y-m-d H:i:s"), "Y-m-d", $timeadjust)))
elseif (($surveyinfo['startdate']!='') && ($surveyinfo['startdate'] > date_shift(date("Y-m-d H:i:s"), "Y-m-d H:i", $timeadjust)))
{
$surveysummary .= "<img src='$imagefiles/notyetstarted.png' "
. "alt='".$clang->gT("This survey is active but has a start date.")."' />\n";
Expand Down Expand Up @@ -703,24 +703,24 @@
if (trim($surveyinfo['faxto'])!='') {$surveysummary .= " {$surveyinfo['faxto']}";}
$surveysummary .= "</td></tr>\n"
. "<tr><td align='right' valign='top'><strong>"
. $clang->gT("Start date:")."</strong></td>\n";
. $clang->gT("Start date/time:")."</strong></td>\n";
$dateformatdetails=getDateFormatData($_SESSION['dateformat']);
if (trim($surveyinfo['startdate'])!= '')
{
$datetimeobj = new Date_Time_Converter($surveyinfo['startdate'] , "Y-m-d H:i:s");
$startdate=$datetimeobj->convert($dateformatdetails['phpdate']);
$startdate=$datetimeobj->convert($dateformatdetails['phpdate'].' H:i');
}
else
{
$startdate="-";
}
$surveysummary .= "<td align='left'>$startdate</td></tr>\n"
. "<tr><td align='right' valign='top'><strong>"
. $clang->gT("Expiry Date:")."</strong></td>\n";
. $clang->gT("Expiry date/time:")."</strong></td>\n";
if (trim($surveyinfo['expires'])!= '')
{
$datetimeobj = new Date_Time_Converter($surveyinfo['expires'] , "Y-m-d H:i:s");
$expdate=$datetimeobj->convert($dateformatdetails['phpdate']);
$expdate=$datetimeobj->convert($dateformatdetails['phpdate'].' H:i');
}
else
{
Expand Down Expand Up @@ -2405,21 +2405,21 @@
if (trim($esrow['startdate'])!= '')
{
$datetimeobj = new Date_Time_Converter($esrow['startdate'] , "Y-m-d H:i:s");
$startdate=$datetimeobj->convert($dateformatdetails['phpdate']);
$startdate=$datetimeobj->convert($dateformatdetails['phpdate'].' H:i');
}

$editsurvey .= "<li><label for='startdate_$surveyid'>".$clang->gT("Start date:")."</label>\n"
. "<input type='text' class='popupdate' id='startdate_$surveyid' size='12' name='startdate' value=\"{$startdate}\" /></li>\n";
$editsurvey .= "<li><label for='startdate_$surveyid'>".$clang->gT("Start date/time:")."</label>\n"
. "<input type='text' class='popupdatetime' id='startdate_$surveyid' size='20' name='startdate' value=\"{$startdate}\" /></li>\n";

// Expiration date
$expires='';
if (trim($esrow['expires'])!= '')
{
$datetimeobj = new Date_Time_Converter($esrow['expires'] , "Y-m-d H:i:s");
$expires=$datetimeobj->convert($dateformatdetails['phpdate']);
$expires=$datetimeobj->convert($dateformatdetails['phpdate'].' H:i');
}
$editsurvey .="<li><label for='enddate_$surveyid'>".$clang->gT("Expiry Date:")."</label>\n"
. "<input type='text' class='popupdate' id='enddate_$surveyid' size='12' name='expires' value=\"{$expires}\" /></li>\n";
$editsurvey .="<li><label for='enddate_$surveyid'>".$clang->gT("Expiry date/time:")."</label>\n"
. "<input type='text' class='popupdatetime' id='enddate_$surveyid' size='20' name='expires' value=\"{$expires}\" /></li>\n";
//COOKIES
$editsurvey .= "<li><label for=''>".$clang->gT("Set cookie to prevent repeated participation?")."</label>\n"
. "<select name='usecookie'>\n"
Expand Down Expand Up @@ -3238,13 +3238,13 @@

// Timed Start
$newsurvey .= "<li><label for='startdate'>".$clang->gT("Start date:")."</label>\n"
. "<input type='text' class='popupdate' id='startdate' size='12' name='startdate' value='' />"
. "<font size='1'> ".sprintf($clang->gT("Date format: %s"), $dateformatdetails['dateformat'])."</font></li>\n";
. "<input type='text' class='popupdatetime' id='startdate' size='20' name='startdate' value='' />"
. "<font size='1'> ".sprintf($clang->gT("Date format: %s"), $dateformatdetails['dateformat'].' hh:nn')."</font></li>\n";

// Expiration
$newsurvey .= "<li><label for='enddate'>".$clang->gT("Expiry Date:")."</label>\n"
. "<input type='text' class='popupdate' id='enddate' size='12' name='expires' value='' />"
. "<font size='1'> ".sprintf($clang->gT("Date format: %s"), $dateformatdetails['dateformat'])."</font></li>\n";
. "<input type='text' class='popupdatetime' id='enddate' size='20' name='expires' value='' />"
. "<font size='1'> ".sprintf($clang->gT("Date format: %s"), $dateformatdetails['dateformat'].' hh:nn')."</font></li>\n";

//COOKIES
$newsurvey .= "<li><label for='usecookie'>".$clang->gT("Set cookie to prevent repeated participation?")."</label>\n"
Expand Down
2 changes: 1 addition & 1 deletion admin/install/create-mssql.sql
Expand Up @@ -375,7 +375,7 @@ CREATE TABLE [prefix_templates] (
-- Table [settings_global]
--

INSERT INTO [prefix_settings_global] VALUES ('DBVersion', '141');
INSERT INTO [prefix_settings_global] VALUES ('DBVersion', '142');
INSERT INTO [prefix_settings_global] VALUES ('SessionName', '$sessionname');


Expand Down
6 changes: 3 additions & 3 deletions admin/install/create-mysql.sql
Expand Up @@ -174,8 +174,8 @@ CREATE TABLE `prefix_surveys` (
`owner_id` int(11) NOT NULL,
`admin` varchar(50) default NULL,
`active` char(1) NOT NULL default 'N',
`expires` date default NULL,
`startdate` date default NULL,
`expires` datetime default NULL,
`startdate` datetime default NULL,
`adminemail` varchar(320) default NULL,
`private` char(1) default NULL,
`faxto` varchar(20) default NULL,
Expand Down Expand Up @@ -323,7 +323,7 @@ create index `saved_control_idx2` on `prefix_saved_control` (`sid`);


-- data
INSERT INTO `prefix_settings_global` VALUES ('DBVersion', '141');
INSERT INTO `prefix_settings_global` VALUES ('DBVersion', '142');
INSERT INTO `prefix_settings_global` VALUES ('SessionName', '$sessionname');

INSERT INTO `prefix_users` (`users_name`, `password`, `full_name`, `parent_id`, `lang` ,`email`, `create_survey`,`create_user` ,`delete_user` ,`superadmin` ,`configurator` ,`manage_template` , `manage_label`) VALUES ('$defaultuser', '$defaultpass', '$siteadminname', 0, '$defaultlang', '$siteadminemail', 1,1,1,1,1,1,1);
Expand Down
11 changes: 3 additions & 8 deletions admin/install/create-postgres.sql
Expand Up @@ -229,8 +229,8 @@ CREATE TABLE prefix_surveys (
owner_id integer NOT NULL,
"admin" character varying(50),
active character(1) DEFAULT 'N'::bpchar NOT NULL,
startdate date,
expires date,
startdate timestamp,
expires timestamp,
adminemail character varying(320) NOT NULL,
private character(1),
faxto character varying(20),
Expand Down Expand Up @@ -512,7 +512,7 @@ CREATE INDEX prefix_labels_ixcode_idx ON prefix_labels USING btree (code);
-- Table `settings_global`
--

INSERT INTO prefix_settings_global VALUES ('DBVersion', '141');
INSERT INTO prefix_settings_global VALUES ('DBVersion', '142');
INSERT INTO prefix_settings_global VALUES ('SessionName', '$sessionname');


Expand Down Expand Up @@ -542,8 +542,3 @@ INSERT INTO prefix_users(
create_survey, create_user, delete_user, superadmin, configurator,
manage_template, manage_label,htmleditormode)
VALUES ('$defaultuser', '$defaultpass', '$siteadminname', 0, '$defaultlang', '$siteadminemail',1,1,1,1,1,1,1,'default');





8 changes: 7 additions & 1 deletion admin/update/upgrade-mssql.php
Expand Up @@ -348,7 +348,13 @@ function db_upgrade($oldversion) {
modify_database("", "UPDATE [prefix_settings_global] SET [stg_value]='141' WHERE stg_name='DBVersion'"); echo $modifyoutput; flush();
}

return true;
if ($oldversion < 142) //Modify surveys table
{
modify_database("", "ALTER TABLE [prefix_surveys] ALTER COLUMN [startdate] datetime NULL"); echo $modifyoutput; flush();
modify_database("", "ALTER TABLE [prefix_surveys] ALTER COLUMN [expires] datetime NULL"); echo $modifyoutput; flush();
modify_database("", "UPDATE [prefix_settings_global] SET [stg_value]='142' WHERE stg_name='DBVersion'"); echo $modifyoutput; flush();
}
return true;
}


Expand Down
6 changes: 6 additions & 0 deletions admin/update/upgrade-mysql.php
Expand Up @@ -336,6 +336,12 @@ function db_upgrade($oldversion) {
modify_database("", "UPDATE `prefix_settings_global` SET `stg_value`='141' WHERE stg_name='DBVersion'"); echo $modifyoutput; flush();
}

if ($oldversion < 142) //Modify surveys table
{
modify_database("","ALTER TABLE `prefix_surveys` CHANGE `expires` `expires` datetime"); echo $modifyoutput; flush();
modify_database("","ALTER TABLE `prefix_surveys` CHANGE `startdate` `startdate` datetime"); echo $modifyoutput; flush();
modify_database("", "UPDATE `prefix_settings_global` SET `stg_value`='142' WHERE stg_name='DBVersion'"); echo $modifyoutput; flush();
}
return true;
}

Expand Down
7 changes: 7 additions & 0 deletions admin/update/upgrade-postgres.php
Expand Up @@ -175,6 +175,13 @@ function db_upgrade($oldversion) {
modify_database("", "UPDATE prefix_settings_global SET stg_value='141' WHERE stg_name='DBVersion'"); echo $modifyoutput; flush();
}

if ($oldversion < 142) //Modify surveys table
{
modify_database("", "ALTER TABLE prefix_surveys ALTER COLUMN \"startdate\" timestamp"); echo $modifyoutput; flush();
modify_database("", "ALTER TABLE prefix_surveys ALTER COLUMN \"expires\" timestamp"); echo $modifyoutput; flush();
modify_database("", "UPDATE prefix_settings_global SET stg_value='142' WHERE stg_name='DBVersion'"); echo $modifyoutput; flush();
}

return true;
}

Expand Down
2 changes: 1 addition & 1 deletion common.php
Expand Up @@ -665,7 +665,7 @@ function getsurveylist($returnarray=false)
if ($sv['sid'] == $surveyid) {$inactivesurveys .= " selected='selected'"; $svexist = 1;}
$inactivesurveys .=" value='$scriptname?sid={$sv['sid']}'>{$sv['surveyls_title']}</option>\n";
}
elseif($sv['expires']!='' && $sv['expires'] < date_shift(date("Y-m-d H:i:s"), "Y-m-d", $timeadjust))
elseif($sv['expires']!='' && $sv['expires'] < date_shift(date("Y-m-d H:i:s"), "Y-m-d H:i:s", $timeadjust))
{
$expiredsurveys .="<option ";
if ($_SESSION['loginID'] == $sv['owner_id']) {$expiredsurveys .= " style=\"font-weight: bold;\"";}
Expand Down
6 changes: 3 additions & 3 deletions index.php
Expand Up @@ -338,8 +338,8 @@
AND surveyls_language=a.language
AND a.active='Y'
AND a.listpublic='Y'
AND ((a.expires >= '".date("Y-m-d")."') OR (a.expires is null))
AND ((a.startdate <= '".date("Y-m-d")."') OR (a.startdate is null))
AND ((a.expires >= '".date("Y-m-d H:i")."') OR (a.expires is null))
AND ((a.startdate <= '".date("Y-m-d H:i")."') OR (a.startdate is null))
ORDER BY surveyls_title";
$result = db_execute_assoc($query,false,true) or die("Could not connect to database. If you try to install LimeSurvey please refer to the <a href='http://docs.limesurvey.org'>installation docs</a> and/or contact the system administrator of this webpage."); //Checked
$list=array();
Expand Down Expand Up @@ -447,7 +447,7 @@


//MAKE SURE SURVEY HASN'T EXPIRED
if ($thissurvey['expiry']!='' and date_shift(date("Y-m-d H:i:s"), "Y-m-d H:i:s", $timeadjust)>date_shift($thissurvey['expiry'], "Y-m-d H:i:s", '+24 hours') && $thissurvey['active']!='N')
if ($thissurvey['expiry']!='' and date_shift(date("Y-m-d H:i:s"), "Y-m-d H:i:s", $timeadjust)>$thissurvey['expiry'] && $thissurvey['active']!='N')
{
sendcacheheaders();
doHeader();
Expand Down
Binary file modified locale/de-informal/LC_MESSAGES/de-informal.mo
Binary file not shown.

0 comments on commit 51f5fdd

Please sign in to comment.