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 Ephemerids
  11.  */
  12.  
  13. /**
  14.  * Initialise ephemerids module
  15.  * @author Xiaoyu Huang
  16.  * @return bool true on success, false on failiure
  17.  */
  18. function Ephemerids_init()
  19. {
  20.     if (!DBUtil::createTable('ephem')) {
  21.         return false;
  22.     }
  23.  
  24.     // Set up config variables
  25.     pnModSetVar('Ephemerids''itemsperpage'25);
  26.  
  27.     // Initialisation successful
  28.     return true;
  29. }
  30.  
  31. /**
  32.  * upgrade ephemerids module
  33.  * @author Xiaoyu Huang
  34.  * @return bool true on success, false on failiure
  35.  */
  36. function Ephemerids_upgrade($oldversion)
  37. {
  38.     if (!DBUtil::changeTable('ephem')) {
  39.         return false;
  40.     }
  41.  
  42.     // Upgrade dependent on old version number
  43.     switch($oldversion{
  44.         case 1.2:
  45.             // version 1.2 shipped with postnuke .72x/.75
  46.             pnModSetVar('Ephemerids''itemsperpage'25);
  47.             break;
  48.     }
  49.  
  50.     // upgrade success
  51.     return true;
  52. }
  53.  
  54. /**
  55.  * delete ephemerids module
  56.  * @author Xiaoyu Huang
  57.  * @return bool true on success, false on failiure
  58. */
  59. function Ephemerids_delete()
  60. {
  61.     if (!DBUtil::dropTable('ephem')) {
  62.         return false;
  63.     }
  64.  
  65.     // Delete module variables
  66.     pnModDelVar('Ephemerids');
  67.  
  68.     // Deletion successful
  69.     return true;
  70. }

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