From 72d97ac54b393915df1d144b677bac9168007bb5 Mon Sep 17 00:00:00 2001 From: Victor Dubiniuk Date: Wed, 2 Apr 2014 19:56:42 +0300 Subject: [PATCH] Numerate guest users. Closes #158 --- public.php | 9 +++++++++ templates/public.php | 1 + 2 files changed, 10 insertions(+) diff --git a/public.php b/public.php index a0c16314..52cbcffc 100644 --- a/public.php +++ b/public.php @@ -38,6 +38,15 @@ if (isset($_GET['t'])) { \OCP\Util::addStyle( 'documents', '3rdparty/webodf/dojo-app'); \OCP\Util::addStyle( 'documents', '3rdparty/webodf/editor' ); \OCP\Util::addScript('documents', 'documents'); + if ($file->getFileId()){ + $session = new Db_Session(); + $sessionData = $session->loadBy('file_id', $file->getFileId())->getData(); + $member = new Db_Member(); + $members = $member->getCollectionBy('es_id', $sessionData['es_id']); + $tmpl->assign('total', count($members)+1); + } else { + $tmpl->assign('total', 1); + } $tmpl->assign('document', $token); } } catch (\Exception $e){ diff --git a/templates/public.php b/templates/public.php index 8c28808f..eb52973e 100644 --- a/templates/public.php +++ b/templates/public.php @@ -14,6 +14,7 @@ +