WordPress.org

Plugin Directory

Changeset 382084


Ignore:
Timestamp:
05/07/11 09:48:14 (3 years ago)
Author:
Coolkevman
Message:

Setting defaults for forum import options is enough in case of missing bbPress plugin.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • e107-importer/trunk/e107-importer.php

    r382083 r382084  
    2929define("E107_REDIRECTOR_PLUGIN", 'e107-importer/e107-redirector.php'); 
    3030define("BBPRESS_PLUGIN"        , 'bbpress/bbpress.php'); 
    31  
    32  
    33 // Redefine some bbPress methods to avoid PHP errors if bbPress is not installed or activated 
    34 if (!function_exists('bbp_get_forum_post_type')) { function bbp_get_forum_post_type() { return 'forum';}} 
    35 if (!function_exists('bbp_get_topic_post_type')) { function bbp_get_topic_post_type() { return 'topic';}} 
    36 if (!function_exists('bbp_get_reply_post_type')) { function bbp_get_reply_post_type() { return 'reply';}} 
    3731 
    3832 
     
    17321726    // Register each option as class global variables 
    17331727    foreach ($e107_option_names as $o) 
    1734       if ($_POST[$o]) 
     1728      if (array_key_exists($o, $_POST) and $_POST[$o]) 
    17351729        $this->$o = $_POST[$o]; 
    17361730 
     
    17391733    $this->e107_import_news  == 'import_news'  ? $this->e107_import_news  = True : $this->e107_import_news  = False; 
    17401734    $this->e107_import_pages == 'import_pages' ? $this->e107_import_pages = True : $this->e107_import_pages = False; 
     1735 
     1736    // Set default forum options 
     1737    if (!isset($this->e107_import_forums   )) $this->e107_import_forums    = 'skip_forums'; 
     1738    if (!isset($this->e107_import_forum_ids)) $this->e107_import_forum_ids = ''; 
    17411739 
    17421740    // Normalize ID list 
Note: See TracChangeset for help on using the changeset viewer.