Ignore:
Timestamp:
Jun 3, 2006 7:47:48 PM (18 years ago)
Author:
scdev
Message:

Q - Merged branches/2.0singleton into trunk. Completed updating classes to use singleton methods. Implemented tests. Fixed some bugs. Changed some interfaces.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/PageSequence.inc.php

    r42 r136  
    44 * Code by Strangecode :: www.strangecode.com :: This document contains copyrighted information
    55 *
    6  * The PageSequence:: class provides an interface to simplify the creation of a multi-step form.
     6 * The PageSequence class provides an interface to simplify the creation of a multi-step form.
    77 *
    88 * @requires  This class requires Prefs.inc.php
     
    133133    function setCurrent($step_id)
    134134    {
     135        $app =& App::getInstance();
     136
    135137        if (false !== ($pos = $this->getPosition($step_id))) {
    136138            // Specified step exists (even if numeric).
     
    138140        } else {
    139141            // Step with specified key does not exist.
    140             App::logMsg(sprintf(_("Step %s not defined in sequence %s"), $step_id, $this->sequence_title), LOG_INFO, __FILE__, __LINE__);
     142            $app->logMsg(sprintf(_("Step %s not defined in sequence %s"), $step_id, $this->sequence_title), LOG_INFO, __FILE__, __LINE__);
    141143            return false;
    142144        }
     
    257259    function printEditLink($step_id=null)
    258260    {
     261        $app =& App::getInstance();
     262
    259263        $pos = isset($step_id) ? $this->getPosition($step_id) : $this->getPosition();
    260264        if ($_SESSION[$this->seq]['steps'][$pos]['editable']) {
    261             printf('[<a href="%s">%s</a>]', App::oHREF($_SERVER['PHP_SELF'] . '?step=' . $pos . '&boomerang=confirmation'), _("edit"));
     265            printf('[<a href="%s">%s</a>]', $app->oHREF($_SERVER['PHP_SELF'] . '?step=' . $pos . '&boomerang=confirmation'), _("edit"));
    262266        }
    263267    }
     
    320324    function _auto_timeout()
    321325    {
     326        $app =& App::getInstance();
     327
    322328        if (isset($_SESSION[$this->seq]['last_access_time'])
    323329        && $_SESSION[$this->seq]['last_access_time'] < time() - $this->idle_timeout) {
    324330            // Session has expired, flush all vars to start over.
    325331            $this->startOver();
    326             App::dieURL($this->start_url);
     332            $app->dieURL($this->start_url);
    327333        } else {
    328334            // Set timer.
Note: See TracChangeset for help on using the changeset viewer.