Ignore:
Timestamp:
Feb 20, 2014 3:03:59 AM (10 years ago)
Author:
anonymous
Message:

Completed integrating /branches/eli_branch into /trunk. Changes include:

  • Removed closing ?> from end of files
  • Upgrade old-style contructor methods to use construct() instead.
  • Class properties and methods defined as public, private, static or protected
  • Ensure code runs under E_ALL with only mysql_* deprecated warnings
  • Search for the '@' symbol anywhere it might be used to supress runtime errors, then replace with proper error recovery.
  • Run the php cli -l option to check files for syntax errors.
  • Bring tests up-to-date with latest version and methods of PHPUnit
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/lib/PEdit.inc.php

    r441 r468  
    7070
    7171    // PEdit object parameters.
    72     var $_params = array(
     72    private $_params = array(
    7373        'data_dir' => '',
    7474        'character_set' => 'utf-8',
     
    7777    );
    7878
    79     var $_data = array(); // Array to store loaded data.
    80     var $_data_file = ''; // Full file path to the pedit data file.
    81     var $_authorized = false; // User is authenticated to see extended functions.
    82     var $_data_loaded = false;
    83     var $op = '';
     79    private $_data = array(); // Array to store loaded data.
     80    private $_data_file = ''; // Full file path to the pedit data file.
     81    private $_authorized = false; // User is authenticated to see extended functions.
     82    private $_data_loaded = false;
     83    public $op = '';
    8484
    8585    /**
     
    9393     * @param optional array $params  A hash containing connection parameters.
    9494     */
    95     function PEdit($params)
     95    public function __construct($params)
    9696    {
    9797        $this->setParam($params);
     
    121121     * @param  array    $params     Array of parameters (key => val pairs).
    122122     */
    123     function setParam($params)
     123    public function setParam($params)
    124124    {
    125125        $app =& App::getInstance();
     
    140140     * @return mixed               Configured parameter value.
    141141     */
    142     function getParam($param)
     142    public function getParam($param)
    143143    {
    144144        $app =& App::getInstance();
     
    159159    * @since    12 Apr 2006 12:43:47
    160160    */
    161     function start($initialize_data_file=false)
     161    public function start($initialize_data_file=false)
    162162    {
    163163        $app =& App::getInstance();
     
    217217     * @param array     $options         Additional options to store with this data.
    218218     */
    219     function set($name, $options=array())
     219    public function set($name, $options=array())
    220220    {
    221221        $app =& App::getInstance();
     
    236236     * @return string        The trimmed content of the named data.
    237237     */
    238     function get($name)
     238    public function get($name)
    239239    {
    240240        $name = preg_replace('/\s/', '_', $name);
     
    251251     * @return bool  False if unauthorized or current page is a version.
    252252     */
    253     function formBegin()
     253    public function formBegin()
    254254    {
    255255        $app =& App::getInstance();
     
    288288     * @access public
    289289     */
    290     function printAllForms()
     290    public function printAllForms()
    291291    {
    292292        if ($this->_authorized && $this->op == 'Edit' && is_array($this->_data) && $this->_data_loaded) {
     
    305305     * @param string $type      Type of form to print. Currently only 'text' and 'textarea' supported.
    306306     */
    307     function printForm($name, $type='text')
     307    public function printForm($name, $type='text')
    308308    {
    309309        if ($this->_authorized && $this->op == 'Edit' && $this->_data_loaded) {
     
    345345     * @return bool  False if unauthorized or current page is a version.
    346346     */
    347     function formEnd()
     347    public function formEnd()
    348348    {
    349349        if (!$this->_authorized || empty($this->_data)) {
     
    399399     * @access public
    400400     */
    401     function printVersions()
     401    public function printVersions()
    402402    {
    403403        $app =& App::getInstance();
     
    442442    * @since    12 Apr 2006 10:52:35
    443443    */
    444     function _fileHash()
     444    private function _fileHash()
    445445    {
    446446        $app =& App::getInstance();
     
    457457    * @since    11 Apr 2006 20:36:26
    458458    */
    459     function _loadDataFile()
     459    private function _loadDataFile()
    460460    {
    461461        $app =& App::getInstance();
     
    496496    * @since    11 Apr 2006 20:53:42
    497497    */
    498     function _initializeDataFile()
     498    private function _initializeDataFile()
    499499    {
    500500        $app =& App::getInstance();
     
    512512     * @return bool  False if unauthorized or on failure. True on success.
    513513     */
    514     function _writeData()
     514    private function _writeData()
    515515    {
    516516        $app =& App::getInstance();
     
    560560    * @since    11 Apr 2006 22:48:30
    561561    */
    562     function _filePutContents($filename, $content)
     562    private function _filePutContents($filename, $content)
    563563    {
    564564        $app =& App::getInstance();
     
    610610     * @return bool  False on failure. True on success.
    611611     */
    612     function _createVersion()
     612    private function _createVersion()
    613613    {
    614614        $app =& App::getInstance();
     
    648648    * @since    12 Apr 2006 11:08:11
    649649    */
    650     function _deleteOldVersions()
     650    private function _deleteOldVersions()
    651651    {
    652652        $app =& App::getInstance();
     
    676676     * @return array  Array of versions.
    677677     */
    678     function _getVersions()
     678    private function _getVersions()
    679679    {
    680680        $version_files = array();
     
    707707     * @return bool  False on failure. True on success.
    708708     */
    709     function _restoreVersion($version)
     709    private function _restoreVersion($version)
    710710    {
    711711        $app =& App::getInstance();
     
    742742
    743743} // End class.
    744 
    745 ?>
Note: See TracChangeset for help on using the changeset viewer.