|
From: <gem...@li...> - 2011-10-21 12:29:46
|
Revision: 124
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=124&view=rev
Author: matijsdejong
Date: 2011-10-21 12:29:37 +0000 (Fri, 21 Oct 2011)
Log Message:
-----------
Merge from trunk r144-r122
Revision Links:
--------------
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=144&view=rev
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=122&view=rev
Modified Paths:
--------------
branches/newUser/classes/Gems/Default/MailLogAction.php
branches/newUser/classes/Gems/Default/ProjectInformationAction.php
branches/newUser/classes/Gems/Default/SourceAction.php
branches/newUser/classes/Gems/Menu/MenuAbstract.php
branches/newUser/classes/Gems/Menu/SubMenuItem.php
branches/newUser/classes/Gems/Snippets/ModelTableSnippetAbstract.php
branches/newUser/classes/Gems/Tracker/Survey.php
branches/newUser/classes/Gems/Tracker.php
branches/newUser/classes/Gems/Util/DatabasePatcher.php
branches/newUser/classes/GemsEscort.php
branches/newUser/classes/MUtil/Controller/ModelSnippetActionAbstract.php
branches/newUser/classes/MUtil/Snippets/ModelTableSnippetAbstract.php
branches/newUser/configs/db/patches.sql
branches/newUser/configs/db/tables/gems__mail_jobs.300.sql
branches/newUser/configs/db/tables/gems__reception_codes.10.sql
branches/newUser/configs/db/tables/gems__roles.20.sql
branches/newUser/configs/db/tables/gems__surveys.30.sql
branches/newUser/controllers/MailLogController.php
branches/newUser/languages/default-en.mo
branches/newUser/languages/default-en.po
branches/newUser/languages/default-nl.mo
branches/newUser/languages/default-nl.po
branches/newUser/snippets/Generic/ModelItemTableSnippet.php
branches/newUser/snippets/Generic/ModelTableSnippet.php
Added Paths:
-----------
branches/newUser/classes/Gems/Snippets/ModelTableSnippetGeneric.php
branches/newUser/snippets/Mail/
branches/newUser/snippets/Mail/Log/
branches/newUser/snippets/Mail/Log/MailLogBrowseSnippet.php
Removed Paths:
-------------
branches/newUser/classes/Gems/Default/MailLogActionOldStyle.php
branches/newUser/snippets/Mail/Log/
branches/newUser/snippets/Mail/Log/MailLogBrowseSnippet.php
Property Changed:
----------------
branches/newUser/
Property changes on: branches/newUser
___________________________________________________________________
Added: svn:mergeinfo
+ /trunk/library:114-122
Modified: branches/newUser/classes/Gems/Default/MailLogAction.php
===================================================================
--- branches/newUser/classes/Gems/Default/MailLogAction.php 2011-10-21 12:15:43 UTC (rev 123)
+++ branches/newUser/classes/Gems/Default/MailLogAction.php 2011-10-21 12:29:37 UTC (rev 124)
@@ -37,10 +37,8 @@
*/
/**
- * Short description for class
+ * Controller for looking at mail activity
*
- * Long description for class (if any)...
- *
* @package Gems
* @subpackage Default
* @copyright Copyright (c) 2011 Erasmus MC
@@ -50,28 +48,12 @@
class Gems_Default_MailLogAction extends Gems_Controller_ModelSnippetActionAbstract
{
/**
- * Adds columns from the model to the bridge that creates the browse table.
+ * The snippets used for the autofilter action.
*
- * Adds a button column to the model, if such a button exists in the model.
- *
- * @param MUtil_Model_TableBridge $bridge
- * @param MUtil_Model_ModelAbstract $model
- * @rturn void
+ * @var mixed String or array of snippets name
*/
- public function addTableColumns(MUtil_Model_TableBridge $bridge, MUtil_Model_ModelAbstract $model)
- {
- if ($menuItem = $this->firstAllowedMenuItem('show')) {
- $bridge->addItemLink($menuItem->toActionLinkLower($this->getRequest(), $bridge));
- }
+ protected $autofilterSnippets = 'Mail_Log_MailLogBrowseSnippet';
- // Newline placeholder
- $br = MUtil_Html::create('br');
-
- $bridge->addMultiSort('grco_created', $br, 'respondent_name', $br, 'grco_address');
- $bridge->addMultiSort('grco_id_token', $br, 'assigned_by', $br, 'grco_sender');
- $bridge->addMultiSort('grco_topic');
- }
-
/**
* The automatically filtered result
*/
@@ -79,7 +61,6 @@
{
$filter = array('grco_organization' => $this->escort->getCurrentOrganization());
- $this->autofilterParameters['addTableColumns'] = array($this, 'addTableColumns');
$this->autofilterParameters['extraFilter'] = $filter;
$this->autofilterParameters['extraSort'] = array('grco_created' => SORT_DESC);
@@ -147,7 +128,6 @@
{
$this->html->h3($this->_('Mail Activity Log'));
- // MUtil_Echo::track($this->indexParameters);
parent::indexAction();
}
Deleted: branches/newUser/classes/Gems/Default/MailLogActionOldStyle.php
===================================================================
--- branches/newUser/classes/Gems/Default/MailLogActionOldStyle.php 2011-10-21 12:15:43 UTC (rev 123)
+++ branches/newUser/classes/Gems/Default/MailLogActionOldStyle.php 2011-10-21 12:29:37 UTC (rev 124)
@@ -1,150 +0,0 @@
-<?php
-
-/**
- * Copyright (c) 2011, Erasmus MC
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Erasmus MC nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * Short description of file
- *
- * @package Gems
- * @subpackage Default
- * @author Matijs de Jong <mj...@ma...>
- * @copyright Copyright (c) 2011 Erasmus MC
- * @license New BSD License
- * @version $Id: Sample.php 203 2011-07-07 12:51:32Z matijs $
- */
-
-/**
- * Temprary class until Gems_Controller_ModelSnippetActionAbstract works
- *
- * @package Gems
- * @subpackage Default
- * @copyright Copyright (c) 2011 Erasmus MC
- * @license New BSD License
- * @since Class available since version 1.4.2
- */
-class Gems_Default_MailLogActionOldStyle extends Gems_Controller_BrowseEditAction
-{
- public $sortKey = array('grco_created' => SORT_DESC);
-
- /**
- * Adds columns from the model to the bridge that creates the browse table.
- *
- * Adds a button column to the model, if such a button exists in the model.
- *
- * @param MUtil_Model_TableBridge $bridge
- * @param MUtil_Model_ModelAbstract $model
- * @rturn void
- */
- protected function addBrowseTableColumns(MUtil_Model_TableBridge $bridge, MUtil_Model_ModelAbstract $model)
- {
- if ($menuItem = $this->findAllowedMenuItem('show')) {
- $bridge->addItemLink($menuItem->toActionLinkLower($this->getRequest(), $bridge));
- }
-
- // Newline placeholder
- $br = MUtil_Html::create('br');
-
- $bridge->addMultiSort('grco_created', $br, 'respondent_name', $br, 'grco_address');
- $bridge->addMultiSort('grco_id_token', $br, 'assigned_by', $br, 'grco_sender');
- $bridge->addMultiSort('grco_topic');
- }
-
- /**
- * Creates a model for getModel(). Called only for each new $action.
- *
- * The parameters allow you to easily adapt the model to the current action. The $detailed
- * parameter was added, because the most common use of action is a split between detailed
- * and summarized actions.
- *
- * @param boolean $detailed True when the current action is not in $summarizedActions.
- * @param string $action The current action.
- * @return MUtil_Model_ModelAbstract
- */
- public function createModel($detailed, $action)
- {
- $model = new Gems_Model_JoinModel('maillog', 'gems__log_respondent_communications');
-
- $model->addLeftTable('gems__respondents', array('grco_id_to' => 'grs_id_user'));
- $model->addLeftTable('gems__staff', array('grco_id_by' => 'gsf_id_user'));
- $model->addLeftTable('gems__mail_templates', array('grco_id_message' => 'gmt_id_message'));
-
- $model->addColumn(
- "TRIM(CONCAT(COALESCE(CONCAT(grs_last_name, ', '), '-, '), COALESCE(CONCAT(grs_first_name, ' '), ''), COALESCE(grs_surname_prefix, '')))",
- 'respondent_name');
- $model->addColumn(
- "CASE WHEN gems__staff.gsf_id_user IS NULL
- THEN '-'
- ELSE
- CONCAT(
- COALESCE(gems__staff.gsf_last_name, ''),
- ', ',
- COALESCE(gems__staff.gsf_first_name, ''),
- COALESCE(CONCAT(' ', gems__staff.gsf_surname_prefix), '')
- )
- END",
- 'assigned_by');
-
- $model->resetOrder();
-
- $model->set('grco_created', 'label', $this->_('Date sent'));
- $model->set('respondent_name', 'label', $this->_('Receiver'));
- $model->set('grco_address', 'label', $this->_('To address'), 'itemDisplay', 'MUtil_Html_AElement::ifmail');
- $model->set('assigned_by', 'label', $this->_('Sender'));
- $model->set('grco_sender', 'label', $this->_('From address'), 'itemDisplay', 'MUtil_Html_AElement::ifmail');
- $model->set('grco_id_token', 'label', $this->_('Token'));
- $model->set('grco_topic', 'label', $this->_('Subject'));
-
- if ($detailed) {
- $model->set('gmt_subject', 'label', $this->_('Template'));
- } else {
- $model->set('grco_created', 'formatFunction', $this->util->getTranslated()->formatDate);
- }
-
- return $model;
- }
-
- /**
- * Helper function to allow generalized statements about the items in the model.
- *
- * @param int $count
- * @return $string
- */
- public function getTopic($count = 1)
- {
- return $this->plural('Activity Log', 'Activity Logs', $count);
- }
-
-
- /**
- * Helper function to allow generalized treatment of the header.
- *
- * return $string
- */
- public function getTopicTitle()
- {
- return $this->_('Mail Activity Log');
- }
-}
Modified: branches/newUser/classes/Gems/Default/ProjectInformationAction.php
===================================================================
--- branches/newUser/classes/Gems/Default/ProjectInformationAction.php 2011-10-21 12:15:43 UTC (rev 123)
+++ branches/newUser/classes/Gems/Default/ProjectInformationAction.php 2011-10-21 12:29:37 UTC (rev 124)
@@ -45,6 +45,18 @@
*/
class Gems_Default_ProjectInformationAction extends Gems_Controller_Action
{
+ /**
+ *
+ * @var GemsEscort
+ */
+ public $escort;
+
+ /**
+ *
+ * @var Gems_Menu
+ */
+ public $menu;
+
public $useHtmlView = true;
protected function _showTable($caption, $data, $nested = false)
@@ -132,18 +144,40 @@
$data[$this->_('Server OS')] = php_uname('s');
$data[$this->_('Time on server')] = date('r');
+ if (file_exists($this->escort->getMaintenanceLockFilename())) {
+ $label = $this->_('Turn Maintenance Mode OFF');
+ } else {
+ $label = $this->_('Turn Maintenance Mode ON');
+ }
+ $request = $this->getRequest();
+ $buttonList = $this->menu->getMenuList();
+ $buttonList->addParameterSources($request)
+ ->addByController($request->getControllerName(), 'maintenance', $label);
+
+ // $this->html->buttonDiv($buttonList);
+
$this->_showTable($this->_('Version information'), $data);
+
+ $this->html->buttonDiv($buttonList);
}
public function maintenanceAction()
{
- $lockFile = GEMS_ROOT_DIR . '/var/settings/lock.txt';
- if(file_exists($lockFile)) {
+ $lockFile = $this->escort->getMaintenanceLockFilename();
+ if (file_exists($lockFile)) {
unlink($lockFile);
} else {
touch($lockFile);
}
- $this->_forward('index');
+
+ // Dump the existing maintenance mode messages.
+ $this->escort->getMessenger()->clearCurrentMessages();
+ $this->escort->getMessenger()->clearMessages();
+ MUtil_Echo::out();
+
+ // Redirect
+ $request = $this->getRequest();
+ $this->_reroute(array($request->getActionKey() => 'index'));
}
public function phpAction()
Modified: branches/newUser/classes/Gems/Default/SourceAction.php
===================================================================
--- branches/newUser/classes/Gems/Default/SourceAction.php 2011-10-21 12:15:43 UTC (rev 123)
+++ branches/newUser/classes/Gems/Default/SourceAction.php 2011-10-21 12:29:37 UTC (rev 124)
@@ -76,14 +76,14 @@
}
$bridge->addHidden('gso_id_source');
- $bridge->addText('gso_source_name', array('size' => 15, 'minlength' => 4));
+ $bridge->addText('gso_source_name', 'description', $this->_('E.g. the name of the project - for single source projects.'), 'size', 15, 'minlength', 4);
$bridge->addValidator('gso_source_name', $model->createUniqueValidator('gso_source_name'));
- $bridge->addText('gso_ls_url', array('size' => 50));
+ $bridge->addText('gso_ls_url', 'description', $this->_('For creating token-survey url.'), 'size', 50);
$bridge->addValidator('gso_ls_url', $model->createUniqueValidator('gso_ls_url'));
$bridge->addValidator('gso_ls_url', new MUtil_Validate_Url());
$bridge->addSelect('gso_ls_class');
- $bridge->addSelect('gso_ls_adapter');
+ $bridge->addSelect('gso_ls_adapter', 'description', $this->_('The database server used by the source.'));
$bridge->addText('gso_ls_table_prefix', array('size' => 15, 'description' => $this->_('Do not forget the underscores.')));
$bridge->addText('gso_ls_dbhost', array('size' => 15, 'description' => $in_gems));
@@ -140,15 +140,16 @@
$model = new MUtil_Model_TableModel('gems__sources');
$model->set('gso_source_name', 'label', $this->_('Name'));
- $model->set('gso_ls_url', 'label', $this->_('Url'), 'default', 'http://');
+ $model->set('gso_ls_url', 'label', $this->_('Source Url'), 'default', 'http://');
$model->set('gso_ls_class', 'label', $this->_('Adaptor class'), 'multiOptions', $tracker->getSourceClasses());
if ($detailed) {
- $model->set('gso_ls_adapter', 'label', $this->_('DB Adaptor'), 'multiOptions', $tracker->getSourceDatabaseClasses());
+ $model->set('gso_ls_adapter', 'label', $this->_('Database Server'), 'multiOptions', $tracker->getSourceDatabaseClasses(), 'default', substr(get_class($this->db), strlen('Zend_Db_Adapter_')));
$model->set('gso_ls_dbhost', 'label', $this->_('Database host'));
$model->set('gso_ls_database', 'label', $this->_('Database'));
}
+
$model->set('gso_ls_table_prefix', 'label', $this->_('Table prefix'), 'default', 'ls__');
$model->set('gso_active', 'default', 0);
Modified: branches/newUser/classes/Gems/Menu/MenuAbstract.php
===================================================================
--- branches/newUser/classes/Gems/Menu/MenuAbstract.php 2011-10-21 12:15:43 UTC (rev 123)
+++ branches/newUser/classes/Gems/Menu/MenuAbstract.php 2011-10-21 12:29:37 UTC (rev 124)
@@ -230,7 +230,7 @@
// MAIL ACTIVITY CONTROLLER
//$setup->addBrowsePage();
- $page = $setup->addPage($this->_('Activity'), 'pr.mail.log', 'mail-log');
+ $page = $setup->addPage($this->_('Activity log'), 'pr.mail.log', 'mail-log');
$page->addAutofilterAction();
$page->addExcelAction();
$page->addShowAction();
@@ -300,7 +300,7 @@
$page->addAction($this->_('PHP'), null, 'php');
$page->addAction($this->_('Project'), null, 'project');
$page->addAction($this->_('Session'), null, 'session');
- $page->addAction($this->_('Maintenance mode'), 'pr.maintenance', 'maintenance');
+ $page->addButtonOnly($this->_('Maintenance mode'), 'pr.maintenance', 'project-information', 'maintenance');
return $page;
}
Modified: branches/newUser/classes/Gems/Menu/SubMenuItem.php
===================================================================
--- branches/newUser/classes/Gems/Menu/SubMenuItem.php 2011-10-21 12:15:43 UTC (rev 123)
+++ branches/newUser/classes/Gems/Menu/SubMenuItem.php 2011-10-21 12:29:37 UTC (rev 124)
@@ -551,11 +551,12 @@
return $menu;
}
- public function applyHiddenParameters(Gems_Menu_ParameterSource $source)
+ public function applyHiddenParameters(Zend_Controller_Request_Abstract $request, Gems_Menu_ParameterSource $source)
{
if ($this->_hiddenParameters) {
- foreach ($this->_hiddenParameters as $key => $name) {
- $source[$key] = $name;
+ foreach ($this->_hiddenParameters as $key => $value) {
+ $request->setParam($key, $value);
+ $source[$key] = $value;
}
}
Modified: branches/newUser/classes/Gems/Snippets/ModelTableSnippetAbstract.php
===================================================================
--- branches/newUser/classes/Gems/Snippets/ModelTableSnippetAbstract.php 2011-10-21 12:15:43 UTC (rev 123)
+++ branches/newUser/classes/Gems/Snippets/ModelTableSnippetAbstract.php 2011-10-21 12:29:37 UTC (rev 124)
@@ -103,6 +103,24 @@
protected $sortParamDesc = 'dsrt';
/**
+ * Adds columns from the model to the bridge that creates the browse table.
+ *
+ * Overrule this function to add different columns to the browse table, without
+ * having to recode the core table building code.
+ *
+ * @param MUtil_Model_TableBridge $bridge
+ * @param MUtil_Model_ModelAbstract $model
+ * @return void
+ */
+ protected function addBrowseTableColumns(MUtil_Model_TableBridge $bridge, MUtil_Model_ModelAbstract $model)
+ {
+ // make sure search results are highlighted
+ $this->applyTextMarker();
+
+ return parent::addBrowseTableColumns($bridge, $model);
+ }
+
+ /**
* Add the paginator panel to the table.
*
* Only called when $this->browse is true. Overrule this function
@@ -116,6 +134,30 @@
}
/**
+ * Make sure generic search text results are marked
+ *
+ * @return void
+ */
+ protected function applyTextMarker()
+ {
+ $model = $this->getModel();
+
+ $textKey = $model->getTextFilter();
+ $filter = $model->getFilter();
+
+ if (isset($filter[$textKey])) {
+ $searchText = $filter[$textKey];
+ // MUtil_Echo::r('[' . $searchText . ']');
+ $marker = new MUtil_Html_Marker($model->getTextSearches($searchText), 'strong', 'UTF-8');
+ foreach ($model->getItemNames() as $name) {
+ if ($model->get($name, 'label')) {
+ $model->set($name, 'markCallback', array($marker, 'mark'));
+ }
+ }
+ }
+ }
+
+ /**
* Should be called after answering the request to allow the Target
* to check if all required registry values have been set correctly.
*
@@ -204,7 +246,7 @@
$data = $this->requestCache->getProgramParams();
$model->applyParameters($data);
-
+
} else {
parent::processFilterAndSort($model);
}
Copied: branches/newUser/classes/Gems/Snippets/ModelTableSnippetGeneric.php (from rev 122, trunk/library/classes/Gems/Snippets/ModelTableSnippetGeneric.php)
===================================================================
--- branches/newUser/classes/Gems/Snippets/ModelTableSnippetGeneric.php (rev 0)
+++ branches/newUser/classes/Gems/Snippets/ModelTableSnippetGeneric.php 2011-10-21 12:29:37 UTC (rev 124)
@@ -0,0 +1,94 @@
+<?php
+
+/**
+ * Copyright (c) 2011, Erasmus MC
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Erasmus MC nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * @package MUtil
+ * @subpackage Snippets
+ * @author Matijs de Jong <mj...@ma...>
+ * @copyright Copyright (c) 2011 Erasmus MC
+ * @license New BSD License
+ * @version $Id$
+ */
+
+/**
+ * Displays multiple items from a model in a tabel by row using
+ * the model set through the $model snippet parameter.
+ *
+ * If you want to use this class "as is" use the 'Generic_ModelTableSnippet' snippet.
+ *
+ * This class is not in the standard snippet loading directories and does not follow
+ * their naming conventions, but exists only to make it simple to extend this class
+ * for a specific implementation.
+ *
+ * @package MUtil
+ * @subpackage Snippets
+ * @copyright Copyright (c) 2011 Erasmus MC
+ * @license New BSD License
+ * @since Class available since version 1.4.4
+ */
+class Gems_Snippets_ModelTableSnippetGeneric extends Gems_Snippets_ModelTableSnippetAbstract
+{
+ /**
+ *
+ * @var MUtil_Model_ModelAbstract
+ */
+ protected $model;
+
+ /**
+ *
+ * @var Gems_Util
+ */
+ protected $util;
+
+ /**
+ * Automatically add request cacge
+ *
+ * Should be called after answering the request to allow the Target
+ * to check if all required registry values have been set correctly.
+ *
+ * @return boolean False if required are missing.
+ */
+ public function checkRegistryRequestsAnswers()
+ {
+ if ($this->util && (! $this->requestCache)) {
+ $this->requestCache = $this->util->getRequestCache();
+ }
+
+ return parent::checkRegistryRequestsAnswers();
+ }
+
+ /**
+ * Creates the model
+ *
+ * @return MUtil_Model_ModelAbstract
+ */
+ protected function createModel()
+ {
+ return $this->model;
+ }
+}
Modified: branches/newUser/classes/Gems/Tracker/Survey.php
===================================================================
--- branches/newUser/classes/Gems/Tracker/Survey.php 2011-10-21 12:15:43 UTC (rev 123)
+++ branches/newUser/classes/Gems/Tracker/Survey.php 2011-10-21 12:29:37 UTC (rev 124)
@@ -104,6 +104,26 @@
}
/**
+ * Makes sure the receptioncode data is part of the $this->_gemsData
+ *
+ * @param boolean $reload Optional parameter to force reload.
+ */
+ private function _ensureGroupData($reload = false)
+ {
+ if ($reload || (! isset($this->_gemsSurvey['ggp_id_group']))) {
+ $sql = "SELECT * FROM gems__groups WHERE ggp_id_group = ?";
+ $code = $this->_gemsSurvey['gsu_id_primary_group'];
+
+ if ($row = $this->db->fetchRow($sql, $code)) {
+ $this->_gemsSurvey = $row + $this->_gemsSurvey;
+ } else {
+ $name = $this->getName();
+ throw new Gems_Exception("Group code $code is missing for survey '$name'.");
+ }
+ }
+ }
+
+ /**
* Update the survey, both in the database and in memory.
*
* @param array $values The values that this token should be set to
@@ -466,6 +486,20 @@
}
/**
+ * Should this survey be filled in by staff members.
+ *
+ * @return boolean
+ */
+ public function isTakenByStaff()
+ {
+ if (! isset($this->_gemsSurvey['ggp_staff_members'])) {
+ $this->_ensureGroupData();
+ }
+
+ return (boolean) $this->_gemsSurvey['ggp_staff_members'];
+ }
+
+ /**
* Update the survey, both in the database and in memory.
*
* @param array $values The values that this token should be set to
Modified: branches/newUser/classes/Gems/Tracker.php
===================================================================
--- branches/newUser/classes/Gems/Tracker.php 2011-10-21 12:15:43 UTC (rev 123)
+++ branches/newUser/classes/Gems/Tracker.php 2011-10-21 12:29:37 UTC (rev 124)
@@ -73,7 +73,7 @@
* @var array Of classname => description
*/
protected $_sourceClasses = array(
- 'LimeSurvey1m9Database' => 'Lime Survey 1.90 DB',
+ 'LimeSurvey1m9Database' => 'Lime Survey 1.90 DB',
'LimeSurvey1m91Database' => 'Lime Survey 1.91+ DB',
);
@@ -114,29 +114,29 @@
private $_trackEngines = array();
/**
+ * Allows sub classes of Gems_Loader_LoaderAbstract to specify the subdirectory where to look for.
*
- * @var Zend_Translate
+ * @var string $cascade An optional subdirectory where this subclass always loads from.
*/
- protected $translate;
+ protected $cascade = 'Tracker';
/**
*
- * @var Zend_Session
+ * @var Zend_Db_Adapter_Abstract
*/
- protected $session;
+ protected $db;
/**
- * Allows sub classes of Gems_Loader_LoaderAbstract to specify the subdirectory where to look for.
*
- * @var string $cascade An optional subdirectory where this subclass always loads from.
+ * @var Zend_Translate
*/
- protected $cascade = 'Tracker';
+ protected $translate;
/**
*
- * @var Zend_Db_Adapter_Abstract
+ * @var Zend_Session
*/
- protected $db;
+ protected $session;
/**
* Set to true to get detailed information on all tracker actions
@@ -413,12 +413,18 @@
// TODO: this should be moved to Gems_Tracker_Source_SourceInterface,
// but do not have time to implement is of minor importance at this moment.
- return array(
- '' => '-- none --',
- 'Mysqli' => 'MySQL',
- 'Pdo_Mysql' => 'MySQL (PDO)',
- 'Sqlsrv' => 'SQL Server',
- 'Pdo_Mssql' => 'SQL Server (PDO)');
+ // If the project uses Pdo database, use Pdo classes, otherwise MySQL
+ if (stripos(get_class($this->db), '_Pdo_')) {
+ return array(
+ '' => '-- none --',
+ 'Pdo_Mysql' => 'MySQL (PDO)',
+ 'Pdo_Mssql' => 'SQL Server (PDO)');
+ } else {
+ return array(
+ '' => '-- none --',
+ 'Mysqli' => 'MySQL',
+ 'Sqlsrv' => 'SQL Server');
+ }
}
/**
Modified: branches/newUser/classes/Gems/Util/DatabasePatcher.php
===================================================================
--- branches/newUser/classes/Gems/Util/DatabasePatcher.php 2011-10-21 12:15:43 UTC (rev 123)
+++ branches/newUser/classes/Gems/Util/DatabasePatcher.php 2011-10-21 12:29:37 UTC (rev 124)
@@ -1,43 +1,47 @@
<?php
-
-/**
- * Copyright (c) 2011, Erasmus MC
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Erasmus MC nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @version $Id$
+
+/**
+ * Copyright (c) 2011, Erasmus MC
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Erasmus MC nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
* @package Gems
* @subpackage Util
+ * @author Matijs de Jong <mj...@ma...>
* @copyright Copyright (c) 2011 Erasmus MC
* @license New BSD License
+ * @version $Id$
*/
/**
+ * File for checking and executing (new) patches.
+ *
* @package Gems
* @subpackage Util
* @copyright Copyright (c) 2011 Erasmus MC
* @license New BSD License
+ * @since Class available since version 1.1
*/
class Gems_Util_DatabasePatcher
{
@@ -175,6 +179,22 @@
return $executed;
}
+ /**
+ * New installations should not be trequired to run patches. This esthablishes that level.
+ *
+ * @return int The lowest level of patch stored in the database.
+ */
+ protected function getMinimumPatchLevel()
+ {
+ static $level;
+
+ if (! $level) {
+ $level = intval($this->db->fetchOne("SELECT COALESCE(MIN(gpl_level), 1) FROM gems__patch_levels"));
+ }
+
+ return $level;
+ }
+
public function hasPatchFiles()
{
return (boolean) $this->patch_files;
@@ -195,33 +215,36 @@
$tree = MUtil_Ra_Nested::toTree($existing, 'gpa_level', 'gpa_location', 'gpa_name', 'gpa_order');
$changed = 0;
$current = new Zend_Db_Expr('CURRENT_TIMESTAMP');
+ $minimum = $this->getMinimumPatchLevel();
+ // MUtil_Echo::track($minimum);
$this->_loadPatches($applicationLevel);
foreach ($this->_loaded_patches as $patch) {
+ if ($minimum <= $patch['gpa_level']) {
+ $level = $patch['gpa_level'];
+ $location = $patch['gpa_location'];
+ $name = $patch['gpa_name'];
+ $order = $patch['gpa_order'];
- $level = $patch['gpa_level'];
- $location = $patch['gpa_location'];
- $name = $patch['gpa_name'];
- $order = $patch['gpa_order'];
+ // Does it exist?
+ if (isset($tree[$level][$location][$name][$order])) {
+ $sql = $patch['gpa_sql'];
+ if ($sql != $tree[$level][$location][$name][$order]['gpa_sql']) {
+ $values['gpa_sql'] = $sql;
+ $values['gpa_executed'] = 0;
+ $values['gpa_completed'] = 0;
+ $values['gpa_changed'] = $current;
- // Does it exist?
- if (isset($tree[$level][$location][$name][$order])) {
- $sql = $patch['gpa_sql'];
- if ($sql != $tree[$level][$location][$name][$order]['gpa_sql']) {
- $values['gpa_sql'] = $sql;
- $values['gpa_executed'] = 0;
- $values['gpa_completed'] = 0;
- $values['gpa_changed'] = $current;
+ $this->db->update('gems__patches', $values, $this->db->quoteInto('gpa_id_patch = ?', $tree[$level][$location][$name][$order]['gpa_id_patch']));
+ $changed++;
+ }
- $this->db->update('gems__patches', $values, $this->db->quoteInto('gpa_id_patch = ?', $tree[$level][$location][$name][$order]['gpa_id_patch']));
+ } else {
+ $patch['gpa_changed'] = $current;
+ $patch['gpa_created'] = $current;
+ $this->db->insert('gems__patches', $patch);
$changed++;
}
-
- } else {
- $patch['gpa_changed'] = $current;
- $patch['gpa_created'] = $current;
- $this->db->insert('gems__patches', $patch);
- $changed++;
}
} // */
Modified: branches/newUser/classes/GemsEscort.php
===================================================================
--- branches/newUser/classes/GemsEscort.php 2011-10-21 12:15:43 UTC (rev 123)
+++ branches/newUser/classes/GemsEscort.php 2011-10-21 12:29:37 UTC (rev 124)
@@ -1133,6 +1133,15 @@
}
/**
+ *
+ * @return string Name of the file that performs the maintenance lock
+ */
+ public function getMaintenanceLockFilename()
+ {
+ return GEMS_ROOT_DIR . '/var/settings/lock.txt';
+ }
+
+ /**
* Retrieve the GemsEscort object
*
* @return GemsEscort
@@ -1523,7 +1532,7 @@
* Check if we are in maintenance mode or not. This is triggeren by a file in the var/settings
* directory with the name lock.txt
*/
- if(file_exists(GEMS_ROOT_DIR . '/var/settings/lock.txt')) {
+ if (file_exists($this->getMaintenanceLockFilename())) {
if ($this->session->user_id && $this->session->user_role !== 'super') {
//Still allow logoff so we can relogin as super
if (!('index' == $request->getControllerName() && 'logoff' == $request->getActionName())) {
@@ -1533,7 +1542,7 @@
$this->_('System is in maintenance mode'));
}
} else {
- $this->getMessenger()->addMessage($this->_('System is in maintenance mode'));
+ $this->addMessage($this->_('System is in maintenance mode'));
MUtil_Echo::r($this->_('System is in maintenance mode'));
}
}
@@ -1598,7 +1607,7 @@
}
if (isset($menuItem)) {
- $menuItem->applyHiddenParameters($this->menu->getParameterSource());
+ $menuItem->applyHiddenParameters($request, $this->menu->getParameterSource());
$this->menu->setCurrent($menuItem);
}
}
Modified: branches/newUser/classes/MUtil/Controller/ModelSnippetActionAbstract.php
===================================================================
--- branches/newUser/classes/MUtil/Controller/ModelSnippetActionAbstract.php 2011-10-21 12:15:43 UTC (rev 123)
+++ branches/newUser/classes/MUtil/Controller/ModelSnippetActionAbstract.php 2011-10-21 12:29:37 UTC (rev 124)
@@ -98,6 +98,19 @@
protected $showSnippets = 'ModelVerticalTableSnippet';
/**
+ * Array of the actions that use a summarized version of the model.
+ *
+ * This determines the value of $detailed in createAction(). As it is usually
+ * less of a problem to use a $detailed model with an action that should use
+ * a summarized model and I guess there will usually be more detailed actions
+ * than summarized ones it seems less work to specify these.
+ *
+ * @var array $summarizedActions Array of the actions that use a
+ * summarized version of the model.
+ */
+ public $summarizedActions = array('index', 'autofilter');
+
+ /**
* Set the action key in request
*
* Use this when an action is a Ajax action for retrieving
@@ -137,7 +150,9 @@
}
if ($resetMvc && MUtil_Echo::hasOutput()) {
- $this->html->raw(MUtil_Echo::out());
+ // Lazy call here, because any echo calls in the snippets have not yet been
+ // performed. so they will appear only in the next call when not lazy.
+ $this->html->raw(MUtil_Lazy::call(array('MUtil_Echo', 'out')));
}
}
Modified: branches/newUser/classes/MUtil/Snippets/ModelTableSnippetAbstract.php
===================================================================
--- branches/newUser/classes/MUtil/Snippets/ModelTableSnippetAbstract.php 2011-10-21 12:15:43 UTC (rev 123)
+++ branches/newUser/classes/MUtil/Snippets/ModelTableSnippetAbstract.php 2011-10-21 12:29:37 UTC (rev 124)
@@ -57,13 +57,6 @@
protected $_marker;
/**
- * Functional extension: optionally use this function to add the browse columns
- *
- * @var callable With signature: function(MUtil_Model_TableBridge $bridge, MUtil_Model_ModelAbstract $model, MUtil_Snippets_ModelTableSnippetAbstract $snippet)
- */
- public $addTableColumns;
-
- /**
* Url parts added to each link in the resulting table
*
* @var array
@@ -171,11 +164,7 @@
$bridge->setBaseUrl($this->baseUrl);
}
- if (is_callable($this->addTableColumns)) {
- call_user_func($this->addTableColumns, $bridge, $model, $this);
- } else {
- $this->addBrowseTableColumns($bridge, $model);
- }
+ $this->addBrowseTableColumns($bridge, $model);
return $bridge->getTable();
}
Modified: branches/newUser/configs/db/patches.sql
===================================================================
--- branches/newUser/configs/db/patches.sql 2011-10-21 12:15:43 UTC (rev 123)
+++ branches/newUser/configs/db/patches.sql 2011-10-21 12:29:37 UTC (rev 124)
@@ -1,4 +1,8 @@
+-- GEMS VERSION: 1
+-- PATCH: Test skip earlier patch levels
+SELECT NULL;
+
-- GEMS VERSION: 27
-- PATCH: Use OK reception code
@@ -204,6 +208,10 @@
UPDATE gems__roles SET grl_privileges = CONCAT(grl_privileges,',pr.maintenance') WHERE grl_name = 'super' AND grl_privileges NOT LIKE '%pr.maintenance%';
-- GEMS VERSION: 42
+-- PATCH: Add mail actions to admin role
+UPDATE gems__roles SET grl_privileges = CONCAT(grl_privileges, ',pr.mail.log') WHERE grl_name = 'admin' AND grl_privileges NOT LIKE '%pr.mail.log%';
+UPDATE gems__roles SET grl_privileges = CONCAT(grl_privileges, ',pr.mail.server,pr.mail.server.create,pr.mail.server.delete,pr.mail.server.edit') WHERE grl_name = 'super' AND grl_privileges NOT LIKE '%pr.mail.server%';
+
-- PATCH: New user login structure
INSERT INTO gems__users (gsu_id_user, gsu_login, gsu_id_organization, gsu_user_class, gsu_active,
gsu_password, gsu_failed_logins, gsu_last_failed, gsu_reset_key, gsu_reset_requested, gsu_reset_required,
@@ -213,4 +221,4 @@
gr2o_changed, gr2o_changed_by, gr2o_created, gr2o_created_by
FROM gems__respondents INNER JOIN gems__respondent2org ON grs_id_user = gr2o_id_user
INNER JOIN gems__organizations ON gr2o_id_organization = gor_id_organization
- WHERE gor_name = 'HCU / Xpert Clinic';
+ WHERE gor_name = 'HCU / Xpert Clinic';
\ No newline at end of file
Modified: branches/newUser/configs/db/tables/gems__mail_jobs.300.sql
===================================================================
--- branches/newUser/configs/db/tables/gems__mail_jobs.300.sql 2011-10-21 12:15:43 UTC (rev 123)
+++ branches/newUser/configs/db/tables/gems__mail_jobs.300.sql 2011-10-21 12:29:37 UTC (rev 124)
@@ -4,8 +4,6 @@
gmj_id_organization bigint unsigned not null
references gems__organizations (gor_id_organization),
- gmj_id_message bigint unsigned not null
- references gems__mail_templates (gmt_id_message),
gmj_id_user_as bigint unsigned not null
references gems__staff (gsf_id_user),
Modified: branches/newUser/configs/db/tables/gems__reception_codes.10.sql
===================================================================
--- branches/newUser/configs/db/tables/gems__reception_codes.10.sql 2011-10-21 12:15:43 UTC (rev 123)
+++ branches/newUser/configs/db/tables/gems__reception_codes.10.sql 2011-10-21 12:29:37 UTC (rev 124)
@@ -29,5 +29,5 @@
grc_changed, grc_changed_by, grc_created, grc_created_by)
VALUES
('OK', '', 1, 1, 0, 1, 1, 1, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1),
- ('skip', 'Skipped by calculation', 0, 1, 0, 0, 0, 0, 0, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1);
+ ('skip', 'Skipped by calculation', 0, 1, 0, 0, 0, 0, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1);
Modified: branches/newUser/configs/db/tables/gems__roles.20.sql
===================================================================
--- branches/newUser/configs/db/tables/gems__roles.20.sql 2011-10-21 12:15:43 UTC (rev 123)
+++ branches/newUser/configs/db/tables/gems__roles.20.sql 2011-10-21 12:29:37 UTC (rev 124)
@@ -32,5 +32,5 @@
('staff','staff','pr.option.edit,pr.option.password,pr.plan,pr.plan.overview,pr.plan.token,pr.project,pr.project.questions,pr.respondent.create,pr.respondent.edit,pr.respondent.who,pr.setup,pr.staff,pr.survey,pr.survey.create,pr.token,pr.token.answers,pr.token.delete,pr.token.edit,pr.token.mail,pr.token.print,pr.track,pr.track.create,pr.track.delete,pr.track.edit,pr.respondent.reportdeath','guest', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1),
('physician','physician','','staff', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1),
('researcher','researcher','pr.invitation,pr.result,pr.islogin','', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1),
- ('admin','admin','pr.consent,pr.consent.create,pr.consent.edit,pr.group,pr.role,pr.mail,pr.mail.create,pr.mail.delete,pr.mail.edit,pr.organization,pr.organization-switch,pr.plan.overview.excel,pr.plan.respondent,pr.plan.respondent.excel,pr.plan.token.excel,pr.project-information,pr.reception,pr.reception.create,pr.reception.edit,pr.respondent.choose-org,pr.respondent.delete,pr.respondent.result,pr.source,pr.staff.create,pr.staff.delete,pr.staff.edit,pr.staff.see.all,pr.survey-maintenance,pr.track-maintenance,pr.token.mail.freetext','staff,researcher,security', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1),
- ('super','super','pr.consent.delete,pr.country,pr.country.create,pr.country.delete,pr.country.edit,pr.database,pr.database.create,pr.database.delete,pr.database.edit,pr.database.execute,pr.database.patches,pr.group.create,pr.group.edit,pr.role.create,pr.role.edit,pr.language,pr.organization.create,pr.organization.edit,pr.plan.choose-org,pr.plan.mail-as-application,pr.reception.delete,pr.source.create,pr.source.edit,pr.source.synchronize,pr.source.synchronize-all,pr.staff.edit.all,pr.survey-maintenance.edit,pr.track-maintenance.create,pr.track-maintenance.edit,pr.maintenance','admin', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1);
+ ('admin','admin','pr.consent,pr.consent.create,pr.consent.edit,pr.group,pr.role,pr.mail,pr.mail.create,pr.mail.delete,pr.mail.edit,pr.mail.log,pr.organization,pr.organization-switch,pr.plan.overview.excel,pr.plan.respondent,pr.plan.respondent.excel,pr.plan.token.excel,pr.project-information,pr.reception,pr.reception.create,pr.reception.edit,pr.respondent.choose-org,pr.respondent.delete,pr.respondent.result,pr.source,pr.staff.create,pr.staff.delete,pr.staff.edit,pr.staff.see.all,pr.survey-maintenance,pr.track-maintenance,pr.token.mail.freetext','staff,researcher,security', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1),
+ ('super','super','pr.consent.delete,pr.country,pr.country.create,pr.country.delete,pr.country.edit,pr.database,pr.database.create,pr.database.delete,pr.database.edit,pr.database.execute,pr.database.patches,pr.group.create,pr.group.edit,pr.language,pr.mail.server,pr.mail.server.create,pr.mail.server.delete,pr.mail.server.edit,pr.organization.create,pr.organization.edit,pr.plan.choose-org,pr.plan.mail-as-application,pr.reception.delete,pr.role.create,pr.role.edit,pr.source.create,pr.source.edit,pr.source.synchronize,pr.source.synchronize-all,pr.staff.edit.all,pr.survey-maintenance.edit,pr.track-maintenance.create,pr.track-maintenance.edit,pr.maintenance','admin', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1);
Modified: branches/newUser/configs/db/tables/gems__surveys.30.sql
===================================================================
--- branches/newUser/configs/db/tables/gems__surveys.30.sql 2011-10-21 12:15:43 UTC (rev 123)
+++ branches/newUser/configs/db/tables/gems__surveys.30.sql 2011-10-21 12:29:37 UTC (rev 124)
@@ -20,7 +20,10 @@
references gems__sources (gso_id_source),
gsu_active boolean not null default 0,
gsu_status varchar(127) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci',
+
+ -- depreciated
gsu_staff boolean not null default 0,
+ -- end depreciated
gsu_id_primary_group bigint unsigned null
references gems__groups (ggp_id_group),
Modified: branches/newUser/controllers/MailLogController.php
===================================================================
--- branches/newUser/controllers/MailLogController.php 2011-10-21 12:15:43 UTC (rev 123)
+++ branches/newUser/controllers/MailLogController.php 2011-10-21 12:29:37 UTC (rev 124)
@@ -42,6 +42,5 @@
* @license New BSD License
* @since Class available since version 1.4.2
*/
-class MailLogController extends Gems_Default_MailLogActionOldStyle
-{
-}
+class MailLogController extends Gems_Default_MailLogAction
+{ }
Modified: branches/newUser/languages/default-en.mo
===================================================================
(Binary files differ)
Modified: branches/newUser/languages/default-en.po
===================================================================
--- branches/newUser/languages/default-en.po 2011-10-21 12:15:43 UTC (rev 123)
+++ branches/newUser/languages/default-en.po 2011-10-21 12:29:37 UTC (rev 124)
@@ -2,9 +2,9 @@
msgstr ""
"Project-Id-Version: Pulse EN\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-10-17 15:19+0100\n"
+"POT-Creation-Date: 2011-10-20 17:52+0100\n"
"PO-Revision-Date: \n"
-"Last-Translator: Menno Dekker <men...@er...>\n"
+"Last-Translator: Matijs de Jong <mj...@ma...>\n"
"Language-Team: Erasmus MGZ <mat...@ma...>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -32,44 +32,44 @@
msgid "version"
msgstr "version"
-#: classes/GemsEscort.php:1410
+#: classes/GemsEscort.php:1419
msgid "Take note: your session has expired, your inputs where not saved. Please check the input data and try again"
msgstr "Take note: your session has expired, your inputs where not saved. Please check the input data and try again"
-#: classes/GemsEscort.php:1531
+#: classes/GemsEscort.php:1540
msgid "Please check back later."
msgstr "Please check back later."
-#: classes/GemsEscort.php:1533
-#: classes/GemsEscort.php:1536
-#: classes/GemsEscort.php:1537
+#: classes/GemsEscort.php:1542
+#: classes/GemsEscort.php:1545
+#: classes/GemsEscort.php:1546
msgid "System is in maintenance mode"
msgstr "System is in maintenance mode"
-#: classes/GemsEscort.php:1551
+#: classes/GemsEscort.php:1560
msgid "No access to site."
msgstr "No access to site."
-#: classes/GemsEscort.php:1553
-#: classes/GemsEscort.php:1589
+#: classes/GemsEscort.php:1562
+#: classes/GemsEscort.php:1598
msgid "You have no access to this site."
msgstr "You have no access to this site."
-#: classes/GemsEscort.php:1569
+#: classes/GemsEscort.php:1578
msgid "No access to page"
msgstr "No access to page"
-#: classes/GemsEscort.php:1571
+#: classes/GemsEscort.php:1580
#, php-format
msgid "Access to this page is not allowed for current role: %s."
msgstr "Access to this page is not allowed for current role: %s."
-#: classes/GemsEscort.php:1576
-#: classes/GemsEscort.php:1587
+#: classes/GemsEscort.php:1585
+#: classes/GemsEscort.php:1596
msgid "You are no longer logged in."
msgstr "You are no longer logged in."
-#: classes/GemsEscort.php:1577
+#: classes/GemsEscort.php:1586
msgid "You must login to access this page."
msgstr "You must login to access this page."
@@ -381,7 +381,7 @@
msgid "Birthday"
msgstr "Birthday"
-#: classes/Gems/Tracker.php:726
+#: classes/Gems/Tracker.php:732
msgid "Checks performed"
msgstr "Checks performed"
@@ -1151,8 +1151,7 @@
msgstr "Log maintenance"
#: classes/Gems/Default/MailAction.php:61
-#: classes/Gems/Default/MailLogAction.php:132
-#: classes/Gems/Default/MailLogActionOldStyle.php:118
+#: classes/Gems/Default/MailLogAction.php:113
msgid "Subject"
msgstr "Subject"
@@ -1170,51 +1169,38 @@
msgid "Email templates"
msgstr "Email templates"
-#: classes/Gems/Default/MailLogAction.php:126
-#: classes/Gems/Default/MailLogActionOldStyle.php:112
+#: classes/Gems/Default/MailLogAction.php:107
msgid "Date sent"
msgstr "Date sent"
-#: classes/Gems/Default/MailLogAction.php:127
-#: classes/Gems/Default/MailLogActionOldStyle.php:113
+#: classes/Gems/Default/MailLogAction.php:108
msgid "Receiver"
msgstr "Receiver"
-#: classes/Gems/Default/MailLogAction.php:128
-#: classes/Gems/Default/MailLogActionOldStyle.php:114
+#: classes/Gems/Default/MailLogAction.php:109
msgid "To address"
msgstr "To address"
-#: classes/Gems/Default/MailLogAction.php:129
-#: classes/Gems/Default/MailLogActionOldStyle.php:115
+#: classes/Gems/Default/MailLogAction.php:110
msgid "Sender"
msgstr "Sender"
-#: classes/Gems/Default/MailLogAction.php:130
-#: classes/Gems/Default/MailLogActionOldStyle.php:116
+#: classes/Gems/Default/MailLogAction.php:111
msgid "From address"
msgstr "From address"
-#: classes/Gems/Default/MailLogAction.php:135
-#: classes/Gems/Default/MailLogActionOldStyle.php:121
+#: classes/Gems/Default/MailLogAction.php:116
msgid "Template"
msgstr "Template"
-#: classes/Gems/Default/MailLogAction.php:148
-#: classes/Gems/Default/MailLogActionOldStyle.php:148
+#: classes/Gems/Default/MailLogAction.php:129
msgid "Mail Activity Log"
msgstr "Mail Activity Log"
-#: classes/Gems/Default/MailLogAction.php:160
+#: classes/Gems/Default/MailLogAction.php:140
msgid "Show Mail Activity Log item"
msgstr "Show Mail Activity Log item"
-#: classes/Gems/Default/MailLogActionOldStyle.php:137
-msgid "Activity Log"
-msgid_plural "Activity Logs"
-msgstr[0] "Activity Log"
-msgstr[1] "Activity Logs"
-
#: classes/Gems/Default/MailServerAction.php:68
msgid "From address [part]"
msgstr "From address [part]"
@@ -1256,6 +1242,8 @@
msgstr "User ID"
#: classes/Gems/Default/MailServerAction.php:90
+#: classes/Gems/Default/OptionAction.php:107
+#: classes/Gems/Default/OptionAction.php:112
msgid "Repeat password"
msgstr "Repeat password"
@@ -1274,14 +1262,10 @@
msgstr "Email servers"
#: classes/Gems/Default/OptionAction.php:73
-#: classes/Gems/Default/OrganizationAction.php:128
-#: classes/Gems/Default/RespondentAction.php:173
-#: classes/Gems/Default/StaffAction.php:188
msgid "Language"
msgstr "Language"
#: classes/Gems/Default/OptionAction.php:74
-#: classes/Gems/Default/StaffAction.php:189
msgid "Logout on survey"
msgstr "Logout on survey"
@@ -1346,7 +1330,6 @@
msgstr "Invalid organization."
#: classes/Gems/Default/OrganizationAction.php:117
-#: classes/Gems/Default/SourceAction.php:143
msgid "Url"
msgstr "Url"
@@ -1402,107 +1385,115 @@
msgid "Planning overview"
msgstr "Planning overview"
-#: classes/Gems/Default/ProjectInformationAction.php:71
+#: classes/Gems/Default/ProjectInformationAction.php:83
msgid "empty file"
msgstr "empty file"
-#: classes/Gems/Default/ProjectInformationAction.php:75
+#: classes/Gems/Default/ProjectInformationAction.php:87
msgid "file not found"
msgstr "file not found"
-#: classes/Gems/Default/ProjectInformationAction.php:108
+#: classes/Gems/Default/ProjectInformationAction.php:120
msgid "Logged errors"
msgstr "Logged errors"
-#: classes/Gems/Default/ProjectInformationAction.php:108
+#: classes/Gems/Default/ProjectInformationAction.php:120
msgid "Empty logfile"
msgstr "Empty logfile"
-#: classes/Gems/Default/ProjectInformationAction.php:113
+#: classes/Gems/Default/ProjectInformationAction.php:125
msgid "Project information"
msgstr "Project information"
-#: classes/Gems/Default/ProjectInformationAction.php:117
+#: classes/Gems/Default/ProjectInformationAction.php:129
msgid "Project name"
msgstr "Project name"
-#: classes/Gems/Default/ProjectInformationAction.php:118
+#: classes/Gems/Default/ProjectInformationAction.php:130
msgid "Project version"
msgstr "Project version"
-#: classes/Gems/Default/ProjectInformationAction.php:119
+#: classes/Gems/Default/ProjectInformationAction.php:131
msgid "Gems version"
msgstr "Gems version"
-#: classes/Gems/Default/ProjectInformationAction.php:121
+#: classes/Gems/Default/ProjectInformationAction.php:133
msgid "Gems project"
msgstr "Gems project"
-#: classes/Gems/Default/ProjectInformationAction.php:122
+#: classes/Gems/Default/ProjectInformationAction.php:134
msgid "Gems web directory"
msgstr "Gems web directory"
-#: classes/Gems/Default/ProjectInformationAction.php:123
+#: classes/Gems/Default/ProjectInformationAction.php:135
msgid "Gems code directory"
msgstr "Gems code directory"
-#: classes/Gems/Default/ProjectInformationAction.php:124
+#: classes/Gems/Default/ProjectInformationAction.php:136
msgid "Gems project path"
msgstr "Gems project path"
-#: classes/Gems/Default/ProjectInformationAction.php:125
+#: classes/Gems/Default/ProjectInformationAction.php:137
msgid "MUtil version"
msgstr "MUtil version"
-#: classes/Gems/Default/ProjectInformationAction.php:126
+#: classes/Gems/Default/ProjectInformationAction.php:138
msgid "Zend version"
msgstr "Zend version"
-#: classes/Gems/Default/ProjectInformationAction.php:127
+#: classes/Gems/Default/ProjectInformationAction.php:139
msgid "Application environment"
msgstr "Application environment"
-#: classes/Gems/Default/ProjectInformationAction.php:128
+#: classes/Gems/Default/ProjectInformationAction.php:140
msgid "Application baseuri"
msgstr "Application baseuri"
-#: classes/Gems/Default/ProjectInformationAction.php:129
+#: classes/Gems/Default/ProjectInformationAction.php:141
msgid "Application directory"
msgstr "Application directory"
-#: classes/Gems/Default/ProjectInformationAction.php:130
+#: classes/Gems/Default/ProjectInformationAction.php:142
msgid "PHP version"
msgstr "PHP version"
-#: classes/Gems/Default/ProjectInformationAction.php:131
+#: classes/Gems/Default/ProjectInformationAction.php:143
msgid "Server Hostname"
msgstr "Server Hostname"
-#: classes/Gems/Default/ProjectInformationAction.php:132
+#: classes/Gems/Default/ProjectInformationAction.php:144
msgid "Server OS"
msgstr "Server OS"
-#: classes/Gems/Default/ProjectInformationAction.php:133
+#: classes/Gems/Default/ProjectInformationAction.php:145
msgid "Time on server"
msgstr "Time on server"
-#: classes/Gems/Default/ProjectInformationAction.php:135
+#: classes/Gems/Default/ProjectInformationAction.php:148
+msgid "Turn Maintenance Mode OFF"
+msgstr "Turn Maintenance Mode OFF"
+
+#: classes/Gems/Default/ProjectInformationAction.php:150
+msgid "Turn Maintenance Mode ON"
+msgstr "Turn Maintenance Mode ON"
+
+#: classes/Gems/Default/ProjectInformationAction.php:159
msgid "Version information"
msgstr "Version information"
-#: classes/Gems/Default/ProjectInformationAction.php:151
+#: classes/Gems/Default/ProjectInformationAction.php:185
msgid "Server PHP Info"
msgstr "Server PHP Info"
-#: classes/Gems/Default/ProjectInformationAction.php:164
+#: classes/Gems/Default/ProjectInformationAction.php:198
msgid "Project settings"
msgstr "Project settings"
-#: classes/Gems/Default/ProjectInformationAction.php:171
+#: classes/Gems/Default/ProjectInformationAction.php:205
msgid "Session content"
msgstr "Session content"
-#: classes/Gems/Default/ProjectInformationAction.php:172
+#: classes/Gems/Default/ProjectInformationAction.php:206
msgid "Session"
msgstr "Session"
@@ -1561,6 +1552,7 @@
msgstr "Survey not specified."
#: classes/Gems/Default/ProjectTracksAction.php:120
+#: classes/Gems/Default/TrackActionAbstract.php:479
#, php-format
msgid "Track %s does not exist."
msgstr "Track %s does not exist."
@@ -1791,6 +1783,18 @@
msgid "Leave empty for the Gems database."
msgstr "Leave empty for the Gems database."
+#: classes/Gems/Default/SourceAction.php:79
+msgid "E.g. the name of the project - for single source projects."
+msgstr "E.g. the name of the project - for single source projects."
+
+#: classes/Gems/Default/SourceAction.php:81
+msgid "For creating token-survey url."
+msgstr "For creating token-survey url."
+
+#: classes/Gems/Default/SourceAction.php:86
+msgid "The database server used by the source."
+msgstr "The database server used by the source."
+
#: classes/Gems/Default/SourceAction.php:88
msgid "Do not forget the underscores."
msgstr "Do not forget the underscores."
@@ -1808,63 +1812,67 @@
msgid "Checking survey results for %s source."
msgstr "Checking survey res...
[truncated message content] |