diff --git a/include/class.cron.php b/include/class.cron.php index e545c5afb7acddf48a97f6e9c0b05b252c5ac116..232d6bf2bee90bad3824e238ee77812ee411a187 100644 --- a/include/class.cron.php +++ b/include/class.cron.php @@ -51,6 +51,11 @@ class Cron { AttachmentFile::deleteOrphans(); } + function CleanExpiredSessions() { + require_once(INCLUDE_DIR.'class.ostsession.php'); + DbSessionBackend::cleanup(); + } + function MaybeOptimizeTables() { // Once a week on a 5-minute cron $chance = rand(1,2000); @@ -100,6 +105,7 @@ class Cron { self::MailFetcher(); self::TicketMonitor(); self::PurgeLogs(); + self::CleanExpiredSessions(); // Run file purging about every 10 cron runs if (mt_rand(1, 9) == 4) self::CleanOrphanedFiles(); diff --git a/include/class.format.php b/include/class.format.php index 0ff1b75e00875da44edb440b79be2b1c6a0b3e3e..7c5bc2ad47996fe5f6da65ad4956d49f506418c7 100644 --- a/include/class.format.php +++ b/include/class.format.php @@ -321,7 +321,7 @@ class Format { 'hook_tag' => function($e, $a=0) { return Format::__html_cleanup($e, $a); }, 'elements' => '*+iframe', 'spec' => - 'iframe=-*,height,width,type,style,src(match="`^(https?:)?//(www\.)?(youtube|dailymotion|vimeo)\.com/`i"),frameborder'.($options['spec'] ? '; '.$options['spec'] : ''), + 'iframe=-*,height,width,type,style,src(match="`^(https?:)?//(www\.)?(youtube|dailymotion|vimeo|player.vimeo)\.com/`i"),frameborder'.($options['spec'] ? '; '.$options['spec'] : ''), ); return Format::html($html, $config); diff --git a/include/class.ostsession.php b/include/class.ostsession.php index dbb5cf6312551abc4e24e4eb905eca53e0a74188..51f8bd2fc5e934dd2b67e95518999959fdbedb30 100644 --- a/include/class.ostsession.php +++ b/include/class.ostsession.php @@ -158,6 +158,10 @@ abstract class SessionBackend { return $this->update($id, $i['touched'] ? session_encode() : $data); } + function cleanup() { + $this->gc(0); + } + abstract function read($id); abstract function update($id, $data); abstract function destroy($id); @@ -220,6 +224,10 @@ extends SessionBackend { return SessionData::objects()->filter(['session_id' => $id])->delete(); } + function cleanup() { + self::gc(0); + } + function gc($maxlife){ SessionData::objects()->filter([ 'session_expire__lte' => SqlFunction::NOW() diff --git a/include/class.task.php b/include/class.task.php index 7cb0aab791dd552a0c4330d4931477a94c08f8cd..14292a2d92080a7e08865f4db2f6ca2acbf3e2a4 100644 --- a/include/class.task.php +++ b/include/class.task.php @@ -1254,6 +1254,8 @@ class Task extends TaskModel implements RestrictedAccess, Threadable { $thisstaff); } + $this->updated = SqlFunction::NOW(); + if ($changes) $this->logEvent('edited', array('fields' => $changes)); diff --git a/include/staff/templates/task-view.tmpl.php b/include/staff/templates/task-view.tmpl.php index 84cbcdea7823c8fe4e8bf441d539d5092c10df4d..500c7cec9b23307233322a01458051345fd9b485 100644 --- a/include/staff/templates/task-view.tmpl.php +++ b/include/staff/templates/task-view.tmpl.php @@ -268,7 +268,7 @@ if ($task->isOverdue()) <?php foreach ($actions as $action) {?> <span class="action-button <?php echo $action['class'] ?: ''; ?>"> - <a class="task-action" + <a class="<?php echo ($action['class'] == 'no-pjax') ? '' : 'task-action'; ?>" <?php if ($action['dialog']) echo sprintf("data-dialog-config='%s'", $action['dialog']);