Changeset - 73b131aa114b
[Not reviewed]
default
0 2 0
Nathan Brink (binki) - 14 years ago 2011-04-09 13:29:31
ohnobinki@ohnopublishing.net
Completely disallow calling `new page()'. Use page::page_create() instead.
2 files changed with 10 insertions and 2 deletions:
0 comments (0 inline, 0 general)
ajax.php
Show inline comments
 
@@ -76,7 +76,7 @@ if (isset($_REQUEST['school_registration
 
	  slate_permutate_json_error('Unable to load any school.');
 
      }
 

	
 
    $page = new Page('', array(), FALSE);
 
    $page = page::page_create('');
 

	
 
    $courses = array();
 
    if (!empty($_REQUEST['courses']) && is_array($_REQUEST['courses']))
inc/class.page.php
Show inline comments
 
@@ -93,6 +93,14 @@ class page
 
  private $school_semester_constant;
 

	
 
  /**
 
   * \brief
 
   *   Construct a new page.
 
   *
 
   * Only to be called by page::page_construct(). Use that function
 
   * instead of the new keyword.
 
   *
 
   * \see page::page_construct()
 
   *
 
   * \param $ntitle
 
   *   Must be a valid HTML string (i.e., escaped with htmlentities()).
 
   * \param $nscripts
 
@@ -102,7 +110,7 @@ class page
 
   *     - 'school': The school to use instead of the autodetected one.
 
   *     - 'semester': The semester to use instead of the autodetected one.
 
   */
 
  public function __construct($ntitle, $nscripts = array(), $immediate = TRUE, array $options = array())
 
  protected function __construct($ntitle, $nscripts = array(), $immediate = TRUE, array $options = array())
 
  {
 
    /* Begin tracking generation time */
 
    $this->pageGenTime = round(microtime(),4);
0 comments (0 inline, 0 general)