Zikula_Value_Addons
[ class tree: Zikula_Value_Addons ] [ index: Zikula_Value_Addons ] [ all elements ]

Source for file pninit.php

Documentation is available at pninit.php

  1. <?php
  2. /**
  3.  * Zikula Application Framework
  4.  *
  5.  * @copyright (c) 2002, Zikula Development Team
  6.  * @link http://www.zikula.org
  7.  * @version $Id: pninit.php 24342 2008-06-06 12:03:14Z markwest $
  8.  * @license GNU/GPL - http://www.gnu.org/copyleft/gpl.html
  9.  * @package Zikula_Value_Addons
  10.  * @subpackage AvantGo
  11.  */
  12.  
  13. /**
  14.  * initialise the AvantGo module
  15.  * This function is only ever called once during the lifetime of a particular
  16.  * module instance
  17.  * @author Mark West
  18.  * @link http://www.markwest.me.uk
  19.  * @return bool true if initalisation successful, false otherwise
  20.  */
  21. function AvantGo_init()
  22. {
  23.  
  24.     // Set up an initial value for a module variable.  Note that all module
  25.     // variables should be initialised with some value in this way rather
  26.     // than just left blank, this helps the user-side code and means that
  27.     // there doesn't need to be a check to see if the variable is set in
  28.     // the rest of the code as it always will be
  29.     pnModSetVar('AvantGo''itemsperpage'10);
  30.  
  31.     // Initialisation successful
  32.     return true;
  33. }
  34.  
  35. /**
  36.  * upgrade the AvantGo module from an old version
  37.  * This function can be called multiple times
  38.  * @author Mark West
  39.  * @link http://www.markwest.me.uk
  40.  * @param 'oldversion' the previous version number of the module
  41.  * @return bool true if upgrade successful, false otherwise
  42.  */
  43. function AvantGo_upgrade($oldversion)
  44. {
  45.     // Upgrade dependent on old version number
  46.     switch($oldversion{
  47.         case 1.3:
  48.             // Code to upgrade from version 1.3 goes here
  49.             pnModSetVar('AvantGo''itemsperpage'10);
  50.             break;
  51.     }
  52.  
  53.     // Update successful
  54.     return true;
  55. }
  56.  
  57. /**
  58.  * Delete the AvantGo module
  59.  * This function is only ever called once during the lifetime of a particular
  60.  * module instance
  61.  * @author Mark West
  62.  * @link http://www.markwest.me.uk
  63.  * @return bool true if deletion successful, false otherwise
  64.  */
  65. function AvantGo_delete()
  66. {
  67.     // Delete any module variables
  68.     pnModDelVar('AvantGo''itemsperpage');
  69.  
  70.     // Deletion successful
  71.     return true;
  72. }

Documentation generated on Fri, 18 Jul 2008 21:53:41 +0200 by phpDocumentor 1.4.1