diff --git a/dev.sh b/dev.sh index fd665d6..5569946 100755 --- a/dev.sh +++ b/dev.sh @@ -17,7 +17,7 @@ if test ! -d vendor; then php composer.phar install || exit $? cp -v dist/authsources_example.php vendor/simplesamlphp/simplesamlphp/config/authsources.php cp -v dist/saml20-idp-remote.php vendor/simplesamlphp/simplesamlphp/metadata/saml20-idp-remote.php - # cp -v vendor/simplesamlphp/simplesamlphp/config-templates/config.php vendor/simplesamlphp/simplesamlphp/config/config.php + cp -v vendor/simplesamlphp/simplesamlphp/config-templates/config.php vendor/simplesamlphp/simplesamlphp/config/config.php sed -e "s/'trusted.url.domains' => array()/'trusted.url.domains' => array('localhost:1080')/g" < vendor/simplesamlphp/simplesamlphp/config-templates/config.php > vendor/simplesamlphp/simplesamlphp/config/config.php ln -s ../vendor/simplesamlphp/simplesamlphp/www/ www/simplesaml fi diff --git a/inc/include.php b/inc/include.php index 00464c7..ca3b5de 100644 --- a/inc/include.php +++ b/inc/include.php @@ -27,7 +27,7 @@ use \pvv\side\Agenda; $agenda = new \pvv\side\Agenda([ new \pvv\side\social\NerdepitsaActivity, // new \pvv\side\social\AnimekveldActivity, - // new \pvv\side\social\DriftkveldActivity, + new \pvv\side\social\DriftkveldActivity, new \pvv\side\DBActivity($pdo), ]); diff --git a/src/pvv/side/social/driftkveldactivity.php b/src/pvv/side/social/driftkveldactivity.php index 97ebc73..9627723 100644 --- a/src/pvv/side/social/driftkveldactivity.php +++ b/src/pvv/side/social/driftkveldactivity.php @@ -11,8 +11,10 @@ class DriftkveldActivity implements Activity { if ($date->format('H') > 18 || $date->format('H') == 17 && $date->format('i') > 30) return $this->nextDate($date->add(new DateInterval('P1D'))->setTime(18, 15, 0)); $date = $date->setTime(18, 15, 0); - if ($date->format('N') != 2) + if ($date->format('N') != 6) return $this->nextDate($date->add(new DateInterval('P1D'))); + if ($date->format('W') % 2) + return $this->nextDate($date->add(new DateInterval('P7D'))); return $date; } @@ -20,8 +22,10 @@ class DriftkveldActivity implements Activity { if ($date->format('H') < 17 || $date->format('H') == 18 && $date->format('i') < 30) return $this->prevDate($date->sub(new DateInterval('P1D'))->setTime(18, 15, 0)); $date = $date->setTime(18, 15, 0); - if ($date->format('N') != 2) + if ($date->format('N') != 6) return $this->prevDate($date->sub(new DateInterval('P1D'))); + if ($date->format('W') % 2) + return $this->prevDate($date->sub(new DateInterval('P7D'))); return $date; } diff --git a/src/pvv/side/social/driftkveldevent.php b/src/pvv/side/social/driftkveldevent.php index 689f918..56eb132 100644 --- a/src/pvv/side/social/driftkveldevent.php +++ b/src/pvv/side/social/driftkveldevent.php @@ -24,7 +24,7 @@ class DriftkveldEvent extends Event { } public function getURL() /* : string */ { - return '/drift/'; + return '/driftkveld/'; } public function getImageURL() { @@ -37,7 +37,7 @@ class DriftkveldEvent extends Event { 'Vil du være kul kis TM?', 'Kom på driftkveld!', '', - 'Vi møtes en gang i uka for å ta unna driftarbeid og drikke kaffe.', + 'Vi møtes annenhver uke for å ta unna driftarbeid og drikke kaffe.', 'Alle PVVere er velkommene, enten de er erfarne driftere eller helt utenforstående!' ]; } diff --git a/www/drift/index.php b/www/driftkveld/index.php similarity index 97% rename from www/drift/index.php rename to www/driftkveld/index.php index c2d2f0b..f9903bc 100644 --- a/www/drift/index.php +++ b/www/driftkveld/index.php @@ -14,7 +14,7 @@ use \pvv\side\Agenda; Drifterverkstedet -
Sosial­verk­stedet
+
Drift­verk­stedet