Ignore:
Timestamp:
Jan 13, 2007, 4:13:40 AM (17 years ago)
Author:
rvelices
Message:

very small improvements:

  • mass_inserts does not requires keys to start at 0
  • recent_cats categories are sorted by global_rank (consistency)
  • removed warning from page_header.php (when included from redirect)
  • added 2 template functions for plugins (get_var and concat_var)
  • removed unused code from profile.php
  • changed css width for tag selection (search page) from 55em to almost 100%
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/template.php

    r1589 r1719  
    33// | PhpWebGallery - a PHP based picture gallery                           |
    44// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
    5 // | Copyright (C) 2003-2005 PhpWebGallery Team - http://phpwebgallery.net |
     5// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
    66// +-----------------------------------------------------------------------+
    77// | branch        : BSF (Best So Far)
    8 // | file          : $RCSfile$
     8// | file          : $Id$
    99// | last update   : $Date$
    1010// | last modifier : $Author$
     
    294294    {
    295295      $this->_tpldata['.'][0][$varname] = $varval;
    296 
    297       return true;
    298     }
    299 
     296      return true;
     297    }
     298
     299  /**
     300   * Root-level variable concatenation. Appends a  string to an existing
     301   * variable assignment with the same name.
     302   */
     303  function concat_var($varname, $varval)
     304    {
     305      if ( isset($this->_tpldata['.'][0][$varname]) )
     306      {
     307        $this->_tpldata['.'][0][$varname] .= $varval;
     308      }
     309      else
     310      {
     311        $this->_tpldata['.'][0][$varname] = $varval;
     312      }
     313      return true;
     314    }
     315
     316  /**
     317   * Returns a root-level variable value
     318   */
     319  function get_var($varname, $default=null)
     320    {
     321      if ( isset($this->_tpldata['.'][0][$varname]) )
     322      {
     323        return $this->_tpldata['.'][0][$varname];
     324      }
     325      return $default;
     326    }
    300327
    301328  /**
Note: See TracChangeset for help on using the changeset viewer.