コード例 #1
0
ファイル: model.php プロジェクト: kumarsivarajan/jaderp
 /**
  * Gets the parameters for database creation
  *
  * @return	boolean True if successful
  * @access	public
  * @since	1.5
  */
 function dbConfig()
 {
     global $mainframe;
     $vars =& $this->getVars();
     if (!isset($vars['DBPrefix'])) {
         $vars['DBPrefix'] = 'jos_';
     }
     $lists = array();
     $files = array('mysql', 'mysqli');
     $db = JInstallationHelper::detectDB();
     foreach ($files as $file) {
         $option = array();
         $option['text'] = $file;
         if (strcasecmp($option['text'], $db) == 0) {
             $option['selected'] = 'selected="true"';
         }
         $lists['dbTypes'][] = $option;
     }
     $doc =& JFactory::getDocument();
     $this->setData('lists', $lists);
     return true;
 }