From: <gem...@li...> - 2011-09-21 07:23:30
|
Revision: 56 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=56&view=rev Author: mennodekker Date: 2011-09-21 07:23:20 +0000 (Wed, 21 Sep 2011) Log Message: ----------- DocBlock fixes Modified Paths: -------------- trunk/library/classes/Gems/Default/LogAction.php trunk/library/classes/Gems/Default/LogMaintenanceAction.php trunk/library/classes/Gems/Tracker/ChangeTracker.php trunk/library/classes/Gems/Util/Localized.php Modified: trunk/library/classes/Gems/Default/LogAction.php =================================================================== --- trunk/library/classes/Gems/Default/LogAction.php 2011-09-21 07:05:58 UTC (rev 55) +++ trunk/library/classes/Gems/Default/LogAction.php 2011-09-21 07:23:20 UTC (rev 56) @@ -1,10 +1,8 @@ <?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 @@ -15,7 +13,7 @@ * * 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 @@ -28,29 +26,38 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +/** + * Show the action log + * + * @package Gems + * @subpackage Default + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @since Class available since version 1.4 + */ class Gems_Default_LogAction extends Gems_Controller_BrowseEditAction { - + public $sortKey = array('glua_created' => SORT_DESC); - + public $defaultPeriodEnd = 1; public $defaultPeriodStart = -4; public $defaultPeriodType = 'W'; - + public $maxPeriod = 1; public $minPeriod = -15; - + public function getAutoSearchElements(MUtil_Model_ModelAbstract $model, array $data) { $elements = parent::getAutoSearchElements($model, $data); - + if ($elements) { $elements[] = null; // break into separate spans } - + // Create date range elements $min = -91; $max = 91; $size = max(strlen($min), strlen($max)); - + $element = new Zend_Form_Element_Text('period_start', array('label' => $this->_('from'), 'size' => $size - 1, 'maxlength' => $size, 'class' => 'rightAlign')); $element->addValidator(new Zend_Validate_Int()); $element->addValidator(new Zend_Validate_Between($min, $max)); @@ -85,32 +92,32 @@ $elements[] = $element; $elements[] = null; // break into separate spans - + $elements[] = $this->_('Staff:'); $sql = "SELECT glua_by, CONCAT(gsf_last_name, ', ', COALESCE(CONCAT(gsf_first_name, ' '), ''), COALESCE(gsf_surname_prefix, '')) AS name " . "FROM gems__log_useractions " - . "JOIN gems__staff ON glua_by = gsf_id_user"; + . "JOIN gems__staff ON glua_by = gsf_id_user"; $elements[] = $this->_createSelectElement('glua_by', $sql, $this->_('All staff')); - + $elements[] = $this->_('Patient:'); $sql = "SELECT glua_by, CONCAT(grs_last_name, ', ', COALESCE(CONCAT(grs_first_name, ' '), ''), COALESCE(grs_surname_prefix, '')) AS name " . "FROM gems__log_useractions " - . "JOIN gems__respondents ON glua_by = grs_id_user"; + . "JOIN gems__respondents ON glua_by = grs_id_user"; $elements[] = $this->_createSelectElement('glua_to', $sql, $this->_('All patients')); - + $elements[] = MUtil_Html::create('br'); $elements[] = $this->_('Action:'); $sql = "SELECT glac_id_action, glac_name " . "FROM gems__log_actions "; $elements[] = $this->_createSelectElement('glua_action', $sql, $this->_('All actions')); - + return $elements; } - + public function getDataFilter(array $data) { $filter = array(); - - + + // Check for period selected switch ($data['date_type']) { case 'W': @@ -134,7 +141,7 @@ return $filter; } - + public function getDefaultSearchData() { return array( @@ -145,7 +152,7 @@ } protected function createModel($detailed, $action) { - //MUtil_Model::$verbose=true; + //MUtil_Model::$verbose=true; $model = new Gems_Model_JoinModel('Log', 'gems__log_useractions'); $model->addLeftTable('gems__log_actions', array('glua_action'=>'glac_id_action')); $model->addLeftTable('gems__respondents', array('glua_to'=>'grs_id_user')); Modified: trunk/library/classes/Gems/Default/LogMaintenanceAction.php =================================================================== --- trunk/library/classes/Gems/Default/LogMaintenanceAction.php 2011-09-21 07:05:58 UTC (rev 55) +++ trunk/library/classes/Gems/Default/LogMaintenanceAction.php 2011-09-21 07:23:20 UTC (rev 56) @@ -1,10 +1,8 @@ <?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 @@ -15,7 +13,7 @@ * * 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 @@ -28,16 +26,26 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +/** + * The maintenace screen for the action log + * + * @package Gems + * @subpackage Default + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @since Class available since version 1.4 + */ + class Gems_Default_LogMaintenanceAction extends Gems_Controller_BrowseEditAction { - + public $sortKey = array('glac_name' => SORT_ASC); - + public function addFormElements(MUtil_Model_FormBridge $bridge, MUtil_Model_ModelAbstract $model, array $data, $new = false) { $model->set('glac_name', 'elementClass', 'exhibitor'); $model->set('glac_log', 'elementClass', 'checkBox'); parent::addFormElements($bridge, $model, $data, $new); } - + protected function createModel($detailed, $action) { //MUtil_Model::$verbose=true; $model = new Gems_Model_JoinModel('log_maint', 'gems__log_actions', true); @@ -46,22 +54,22 @@ return $model; } - + public function getAfterSaveRoute($data) { Gems_AccessLog::getLog()->loadActions(true); return parent::getAfterSaveRoute($data); } - + public function getAutoSearchElements(MUtil_Model_ModelAbstract $model, array $data) { $elements = parent::getAutoSearchElements($model, $data); - + if ($elements) { $elements[] = null; // break into separate spans } - + $elements[] = $this->_('Log:'); $elements[] = $this->_createSelectElement('glac_log', $this->util->getTranslated()->getYesNo(), $this->_('All')); - + return $elements; } Modified: trunk/library/classes/Gems/Tracker/ChangeTracker.php =================================================================== --- trunk/library/classes/Gems/Tracker/ChangeTracker.php 2011-09-21 07:05:58 UTC (rev 55) +++ trunk/library/classes/Gems/Tracker/ChangeTracker.php 2011-09-21 07:23:20 UTC (rev 56) @@ -4,7 +4,7 @@ /** * 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 @@ -15,7 +15,7 @@ * * 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 @@ -26,24 +26,23 @@ * 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. - */ - -/** - * File description of ChangeTracker * - * @author Matijs de Jong <mj...@ma...> - * @since 1.2 - * @version 1.2 - * @package - * @subpackage + * + * @package Gems + * @subpackage Tracker + * @author Matijs de Jong <mj...@ma...> + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @version $Id$ */ /** - * Class description of ChangeTracker * - * @author Matijs de Jong <mj...@ma...> - * @package - * @subpackage + * @package Gems + * @subpackage Tracker + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @since Class available since version 1.4 */ class Gems_Tracker_ChangeTracker { @@ -54,11 +53,11 @@ public $roundChangeUpdates = 0; public $roundCompletionCauses = 0; public $roundCompletionChanges = 0; - public $surveyCompletionChanges = 0; + public $surveyCompletionChanges = 0; public $tokenDateCauses = 0; public $tokenDateChanges = 0; - public function getMessages(Zend_Translate $t) + public function getMessages(Zend_Translate $t) { if ($this->checkedRespondentTracks) { $messages[] = sprintf($t->_('Checked %d tracks.'), $this->checkedRespondentTracks); @@ -89,10 +88,10 @@ } else { $messages[] = $t->_('No tokens were changed.'); } - + return $messages; } - + public function hasChanged() { return $this->resultDataChanges || $this->surveyCompletionChanges || $this->roundCompletionChanges || $this->tokenDateCauses || $this->roundChangeUpdates || $this->createdTokens; Modified: trunk/library/classes/Gems/Util/Localized.php =================================================================== --- trunk/library/classes/Gems/Util/Localized.php 2011-09-21 07:05:58 UTC (rev 55) +++ trunk/library/classes/Gems/Util/Localized.php 2011-09-21 07:23:20 UTC (rev 56) @@ -1,33 +1,49 @@ <?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. - */ - + +/** + * 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$ + */ + +/** + * Localization class, allowing for project specific overrides + * + * @package Gems + * @subpackage Util + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + */ class Gems_Util_Localized extends Gems_Registry_TargetAbstract { /** @@ -92,7 +108,7 @@ } } - /* + /* public function formatDateTime($dateTimeValue, $showRecentTime = false) { if ($dateTimeValue) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |