Skip to content
Permalink
Browse files

Merge branch 'develop' for Release 3.0.2

  • Loading branch information
bgreiner committed Sep 29, 2015
2 parents acccc8c + be2a309 commit 6da7e46bee7391ee8e167f433fc36330a3b3cfa1
Showing with 44 additions and 16 deletions.
  1. +1 −1 config/system.php
  2. +4 −0 install/CHANGELOG
  3. +19 −2 install/UPGRADE.howto
  4. +7 −3 tagsets/email.php
  5. +7 −6 tagsets/experimentmail.php
  6. +5 −3 tagsets/pdfoutput.php
  7. +1 −1 tagsets/sessions.php
@@ -1,7 +1,7 @@
<?php
// part of orsee. see orsee.org
// THIS FILE WILL CHANGE FROM VERSION TO VERSION. BETTER NOT EDIT.
$system__version="3.0.1";
$system__version="3.0.2";

// implemented experiment types
$system__experiment_types=array('laboratory','online-survey','internet');
@@ -1,4 +1,8 @@

ORSEE 3.0.2:
Some critical bugfixes.
Updated install/UPGRADE.howto.

ORSEE 3.0.1:
Many minor bugfixes.
config/settings.php is now in install/settings-dist.php
@@ -1,6 +1,23 @@
This are upgrade instructions for ORSEE 3.0.0 from previous versions.

ORSEE 3.0.0 is a major new versions, with many changes to the database structure and to the code. For this reason, the procedure to upgrade includes two simple steps:
*Upgrade from ORSEE 3.x.x versions to the current version*
Since there have been no changes to the database structure, yet, upgrading is easy.

- Unzip the .tgz / .zip file anywhere. Let's assume this is <my-unzip-path>.
- Let's also assume your older version ORSEE 3.x.x is located in <my-orsee-path>
- Then simply over the files from subdirectories 'tagsets', 'admin', 'public', and 'config', i.e.:
cp -r <my-unzip-path>/tagsets/* <my-orsee-path>/tagsets/
cp -r <my-unzip-path>/admin/* <my-orsee-path>/admin/
cp -r <my-unzip-path>/public/* <my-orsee-path>/public/
cp -r <my-unzip-path>/config/* <my-orsee-path>/config/

That's it.

Note that since ORSEE 3.0.1, there is no file settings.php in <my-unzip-path>/config/, such that your original settings.php in <my-orsee-path>/config/ will not be changed by this copying. There is a settings-dist.php in <my-unzip-path>/install/ which has to be copied over to config/settings.php when doing a new install.


*Upgrade from ORSEE 2.x.x versions to an ORSEE 3.x.x version*

ORSEE 3.0.0 was a major new versions, with many changes to the database structure and to the code. For this reason, the procedure to upgrade includes two simple steps:
- install the new version as described in INSTALL.howto and the ORSEE3 wiki
- import your previous data as described in the ORSEE3 wiki

@@ -37,9 +37,11 @@ function email__retrieve_incoming() {
if (isset($settings['email_module_delete_emails_from_server']) && $settings['email_module_delete_emails_from_server']=='n') {
if (!isset($all_email_ids)) {
$query="SELECT message_id FROM ".table('emails');
$result = or_query($query);
$qresult = or_query($query);
$all_email_ids=array();
while ($m=pdo_fetch_assoc($result)) $all_email_ids[]=$m['message_id'];
while ($m=pdo_fetch_assoc($qresult)) {
$all_email_ids[]=$m['message_id'];
}
}
if (in_array($message['message_id'],$all_email_ids)) $continue=false;
}
@@ -60,7 +62,9 @@ function email__retrieve_incoming() {
}
$to_adds=array(); $cc_adds=array();
foreach ($email['headers']['to'] as $to_add) $to_adds[]=$to_add['mailbox']."@".$to_add['host'];
foreach ($email['headers']['cc'] as $cc_add) $cc_adds[]=$cc_add['mailbox']."@".$cc_add['host'];
if (isset($email['headers']['cc']) && is_array($email['headers']['cc'])) {
foreach ($email['headers']['cc'] as $cc_add) $cc_adds[]=$cc_add['mailbox']."@".$cc_add['host'];
}
$pars=array();
$pars[':message_id']=$message['message_id'];
$pars[':message_type']='incoming';
@@ -501,11 +501,13 @@ function experimentmail__send_mails_from_queue($number=0,$type="",$experiment_id

// handle errors
$pars=array(); $mails_errors=count($errors);
foreach ($errors as $mail) $pars[]=array(':error'=>$mail['error'],':mail_id'=>$mail['mail_id']);
$query="UPDATE ".table('mail_queue')."
SET error= :error
WHERE mail_id= :mail_id";
$done=or_query($query,$pars);
if ($mails_errors>0) {
foreach ($errors as $mail) $pars[]=array(':error'=>$mail['error'],':mail_id'=>$mail['mail_id']);
$query="UPDATE ".table('mail_queue')."
SET error= :error
WHERE mail_id= :mail_id";
$done=or_query($query,$pars);
}
$mess['mails_sent']=$mails_sent;
$mess['mails_invmails_not_sent']=$invmails_not_sent;
$mess['mails_errors']=$mails_errors;
@@ -936,7 +938,6 @@ function experimentmail__send_registration_notice($line) {
$list_name=lang('participant_list_filename').' '.date("Y-m-d",$now);
$list_filename=str_replace(" ","_",$list_name).".pdf";
$list_file=pdfoutput__make_part_list($line['experiment_id'],$line['session_id'],'registered','lname,fname',true,$tlang);
$list_file=pdfoutput__make_part_list($line['experiment_id'],$line['session_id'],"","","");
$done=experimentmail__mail_attach($recipient,$settings['support_mail'],$subject,$message,$list_filename,$list_file);
}
}
@@ -177,10 +177,12 @@ function pdfoutput__make_pdf_calendar($displayfrom=0,$wholeyear=false,$admin=fal
$calendar__weekdays=explode(",",$lang['format_datetime_weekday_abbr']);
for ($i3 = 1; $i3 <= 7; ++$i3) {
if (!isset($lang['format_datetime_firstdayofweek_0:Su_1:Mo']) || (!$lang['format_datetime_firstdayofweek_0:Su_1:Mo'])) {
$wdindex = $i3-2;
if ($wdindex<0) $wdindex=6;
} else {
$wdindex = $i3-1;
} else {
$wdindex = $i3;
if ($wdindex==7) {
$wdindex=0;
}
}
$table_headings[$i3]=$calendar__weekdays[$wdindex];
}
@@ -207,7 +207,7 @@ function session__check_lab_time_clash($entry) {
AND event_id!=:event_id
AND NOT (event_start >= :this_end_time OR event_stop <= :this_start_time)
ORDER BY event_start";
$result=or_query($query);
$result=or_query($query,$pars);

while ($osession=pdo_fetch_assoc($result)) {
$ostart_string=ortime__format(ortime__sesstime_to_unixtime($osession['event_start']));

0 comments on commit 6da7e46

Please sign in to comment.
You can’t perform that action at this time.