From: <gem...@li...> - 2013-04-11 15:43:13
|
Revision: 1227 http://sourceforge.net/p/gemstracker/code/1227 Author: matijsdejong Date: 2013-04-11 15:43:08 +0000 (Thu, 11 Apr 2013) Log Message: ----------- Split field names on last underscore Deleted 2 snippets that should not be deleted Modified Paths: -------------- tags/1.6/library/classes/Gems/Event/Survey/Display/YesOnTop.php Added Paths: ----------- tags/1.6/library/snippets/EditRoundSnippet.php tags/1.6/library/snippets/ShowRoundSnippet.php Modified: tags/1.6/library/classes/Gems/Event/Survey/Display/YesOnTop.php =================================================================== --- tags/1.6/library/classes/Gems/Event/Survey/Display/YesOnTop.php 2013-04-11 15:42:23 UTC (rev 1226) +++ tags/1.6/library/classes/Gems/Event/Survey/Display/YesOnTop.php 2013-04-11 15:43:08 UTC (rev 1227) @@ -76,10 +76,9 @@ if ($value === 'Y') { $onTop[$name] = $name; } else { - $nameParts = explode('_', $name); - - if (count($nameParts) > 1) { - if (isset($onTop[$nameParts[0]])) { + // Split on last underscore instead of first + if ($i = strrpos($name, '_')) { + if (isset($onTop[substr($name, 0, $i)])) { $onTop[$name] = $name; } } Added: tags/1.6/library/snippets/EditRoundSnippet.php =================================================================== --- tags/1.6/library/snippets/EditRoundSnippet.php (rev 0) +++ tags/1.6/library/snippets/EditRoundSnippet.php 2013-04-11 15:43:08 UTC (rev 1227) @@ -0,0 +1,48 @@ +<?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 Gems + * @subpackage Tracker + * @author Matijs de Jong <mj...@ma...> + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @version $Id: EditRoundStepSnippet.php 28 2011-09-16 06:24:15Z mennodekker $ + */ + +/** + * + * @package Gems + * @subpackage Tracker + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @since Class available since version 1.4 + */ +class EditRoundSnippet extends Gems_Tracker_Snippets_EditRoundSnippetAbstract +{ +} Added: tags/1.6/library/snippets/ShowRoundSnippet.php =================================================================== --- tags/1.6/library/snippets/ShowRoundSnippet.php (rev 0) +++ tags/1.6/library/snippets/ShowRoundSnippet.php 2013-04-11 15:43:08 UTC (rev 1227) @@ -0,0 +1,48 @@ +<?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 Gems + * @subpackage Tracker + * @author Matijs de Jong <mj...@ma...> + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @version $Id: ShowRoundStepSnippet.php 473 2012-02-14 14:36:43Z mennodekker $ + */ + +/** + * + * @package Gems + * @subpackage Tracker + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @since Class available since version 1.4 + */ +class ShowRoundSnippet extends Gems_Tracker_Snippets_ShowRoundSnippetAbstract +{ +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |