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

Source for file pntables.php

Documentation is available at pntables.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: pntables.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 FAQ
  11.  */
  12.  
  13. /**
  14.  * Populate pntables array for FAQ module
  15.  *
  16.  * This function is called internally by the core whenever the module is
  17.  * loaded. It delivers the table information to the core.
  18.  * It can be loaded explicitly using the pnModDBInfoLoad() API function.
  19.  *
  20.  * @author       Xiaoyu Huang
  21.  * @return       array       The table information.
  22.  */
  23. function FAQ_pntables()
  24. {
  25.     // Initialise table array
  26.     $pntable array();
  27.  
  28.     // Full table definition
  29.     $pntable['faqanswer'DBUtil::getLimitedTablename('faqanswer');
  30.     $pntable['faqanswer_column'array ('faqid'         => 'pn_id',
  31.                                           'question'      => 'pn_question',
  32.                                           'urltitle'      => 'pn_urltitle',
  33.                                           'answer'        => 'pn_answer',
  34.                                           'submittedbyid' => 'pn_submittedbyid',
  35.                                           'answeredbyid'  => 'pn_answeredbyid');
  36.     $pntable['faqanswer_column_def'array('faqid'           => 'I NOTNULL AUTO PRIMARY',
  37.                                              'question'        => 'X DEFAULT NULL',
  38.                                              'urltitle'        => "X NOTNULL DEFAULT ''",
  39.                                              'answer'          => 'X',
  40.                                              'submittedbyid'   => 'I NOTNULL',
  41.                                              'answeredbyid'    => 'I NOTNULL');
  42.  
  43.     // Enable categorization services
  44.     $pntable['faqanswer_db_extra_enable_categorization'pnModGetVar('FAQ''enablecategorization');
  45.     $pntable['faqanswer_primary_key_column''faqid';
  46.  
  47.     // add standard data fields
  48.     ObjectUtil::addStandardFieldsToTableDefinition ($pntable['faqanswer_column']'pn_');
  49.     ObjectUtil::addStandardFieldsToTableDataDefinition($pntable['faqanswer_column_def']);
  50.  
  51.     // old tables for upgrade purposes
  52.     $pntable['faqcategories'DBUtil::getLimitedTablename('faqcategories');
  53.  
  54.     return $pntable;
  55. }

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