Ignore:
Timestamp:
2013/08/26 12:42:34 (11 years ago)
Author:
kimoto
Message:

#2275 PEAR更新
不要なrequire_onceの削除
レガシーなPEARモジュールは使わない
SearchReplace?.phpのパスが間違っているので修正

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_13-dev/data/module/Calendar/Table/Helper.php

    r20119 r23125  
    11<?php 
    22/* vim: set expandtab tabstop=4 shiftwidth=4: */ 
    3 // 
    4 // +----------------------------------------------------------------------+ 
    5 // | PHP Version 4                                                        | 
    6 // +----------------------------------------------------------------------+ 
    7 // | Copyright (c) 1997-2002 The PHP Group                                | 
    8 // +----------------------------------------------------------------------+ 
    9 // | This source file is subject to version 2.02 of the PHP license,      | 
    10 // | that is bundled with this package in the file LICENSE, and is        | 
    11 // | available at through the world-wide-web at                           | 
    12 // | http://www.php.net/license/3_0.txt.                                  | 
    13 // | If you did not receive a copy of the PHP license and are unable to   | 
    14 // | obtain it through the world-wide-web, please send a note to          | 
    15 // | license@php.net so we can mail you a copy immediately.               | 
    16 // +----------------------------------------------------------------------+ 
    17 // | Authors: Harry Fuecks <hfuecks@phppatterns.com>                      | 
    18 // +----------------------------------------------------------------------+ 
    19 // 
    20 // $Id: Helper.php,v 1.5 2005/10/22 09:51:53 quipo Exp $ 
    21 // 
     3 
    224/** 
    23  * @package Calendar 
    24  * @version $Id: Helper.php,v 1.5 2005/10/22 09:51:53 quipo Exp $ 
     5 * Contains the Calendar_Decorator_Wrapper class 
     6 * 
     7 * PHP versions 4 and 5 
     8 * 
     9 * LICENSE: Redistribution and use in source and binary forms, with or without 
     10 * modification, are permitted provided that the following conditions are met: 
     11 * 1. Redistributions of source code must retain the above copyright 
     12 *    notice, this list of conditions and the following disclaimer. 
     13 * 2. Redistributions in binary form must reproduce the above copyright 
     14 *    notice, this list of conditions and the following disclaimer in the 
     15 *    documentation and/or other materials provided with the distribution. 
     16 * 3. The name of the author may not be used to endorse or promote products 
     17 *    derived from this software without specific prior written permission. 
     18 * 
     19 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED 
     20 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
     21 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
     22 * IN NO EVENT SHALL THE FREEBSD PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY 
     23 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 
     24 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
     25 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 
     26 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
     27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 
     28 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
     29 * 
     30 * @category  Date and Time 
     31 * @package   Calendar 
     32 * @author    Harry Fuecks <hfuecks@phppatterns.com> 
     33 * @copyright 2003-2007 Harry Fuecks 
     34 * @license   http://www.debian.org/misc/bsd.license  BSD License (3 Clause) 
     35 * @version   CVS: $Id: Helper.php 246317 2007-11-16 20:05:32Z quipo $ 
     36 * @link      http://pear.php.net/package/Calendar 
    2537 */ 
    2638 
     
    2840 * Used by Calendar_Month_Weekdays, Calendar_Month_Weeks and Calendar_Week to 
    2941 * help with building the calendar in tabular form 
    30  * @package Calendar 
    31  * @access protected 
     42 * 
     43 * @category  Date and Time 
     44 * @package   Calendar 
     45 * @author    Harry Fuecks <hfuecks@phppatterns.com> 
     46 * @copyright 2003-2007 Harry Fuecks 
     47 * @license   http://www.debian.org/misc/bsd.license  BSD License (3 Clause) 
     48 * @link      http://pear.php.net/package/Calendar 
     49 * @access public 
    3250 */ 
    3351class Calendar_Table_Helper 
     
    91109    /** 
    92110     * Constructs Calendar_Table_Helper 
    93      * @param object Calendar_Month_Weekdays, Calendar_Month_Weeks, Calendar_Week 
    94      * @param int (optional) first day of the week e.g. 1 for Monday 
     111     * 
     112     * @param object &$calendar Calendar_Month_Weekdays, Calendar_Month_Weeks, Calendar_Week 
     113     * @param int    $firstDay  (optional) first day of the week e.g. 1 for Monday 
     114     * 
    95115     * @access protected 
    96116     */ 
     
    113133    /** 
    114134     * Constructs $this->daysOfWeek based on $this->firstDay 
     135     * 
    115136     * @return void 
    116137     * @access private 
     
    141162    /** 
    142163     * Constructs $this->daysOfMonth 
     164     * 
    143165     * @return void 
    144166     * @access private 
     
    175197    /** 
    176198     * Returns the first day of the month 
     199     * 
     200     * @return int 
     201     * @access protected 
    177202     * @see Calendar_Engine_Interface::getFirstDayOfWeek() 
    178      * @return int 
    179      * @access protected 
    180203     */ 
    181204    function getFirstDay() 
     
    186209    /** 
    187210     * Returns the order array of days in a week 
     211     * 
    188212     * @return int 
    189213     * @access protected 
     
    196220    /** 
    197221     * Returns the number of tabular weeks in a month 
     222     * 
    198223     * @return int 
    199224     * @access protected 
     
    206231    /** 
    207232     * Returns the number of real days + empty days 
     233     * 
    208234     * @return int 
    209235     * @access protected 
     
    216242    /** 
    217243     * Returns the number of empty days before the real days begin 
     244     * 
    218245     * @return int 
    219246     * @access protected 
     
    226253    /** 
    227254     * Returns the index of the last real day in the month 
     255     * 
    228256     * @todo Potential performance optimization with static 
    229257     * @return int 
     
    233261    { 
    234262        // Causes bug when displaying more than one month 
    235 //        static $index; 
    236 //        if (!isset($index)) { 
     263        //static $index; 
     264        //if (!isset($index)) { 
    237265            $index = $this->getEmptyDaysBefore() + $this->cE->getDaysInMonth( 
    238266                $this->calendar->thisYear(), $this->calendar->thisMonth()); 
    239 //        } 
     267        //} 
    240268        return $index; 
    241269    } 
     
    244272     * Returns the index of the last real day in the month, relative to the 
    245273     * beginning of the tabular week it is part of 
     274     * 
    246275     * @return int 
    247276     * @access protected 
     
    255284                $this->calendar->thisMonth(), 
    256285                $this->calendar->thisDay() 
    257             ) * ($this->numWeeks-1) ); 
     286            ) * ($this->numWeeks-1)); 
    258287    } 
    259288 
    260289    /** 
    261290     * Returns the timestamp of the first day of the current week 
     291     * 
     292     * @param int $y        year 
     293     * @param int $m        month 
     294     * @param int $d        day 
     295     * @param int $firstDay first day of the week (default 1 = Monday) 
     296     * 
     297     * @return int timestamp 
    262298     */ 
    263299    function getWeekStart($y, $m, $d, $firstDay=1) 
Note: See TracChangeset for help on using the changeset viewer.