public function supports_feature($feature) { static $features = array('login' => false); return isset($features[$feature]) ? $features[$feature] : parent::supports_feature($feature); }
* You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ /* File : enter-options.php. * Description: The web app page that allows the user to enter their FUPS * options. Varies depending on forum type. */ require_once __DIR__ . '/common.php'; require_once __DIR__ . '/classes/CFUPSBase.php'; $forum_type = isset($_GET['forum_type']) ? $_GET['forum_type'] : ''; $errmsg = ''; if (!$forum_type) { $errmsg = 'Forum type not provided'; } else { $valid_forum_types = FUPSBase::get_valid_forum_types(); if (!isset($valid_forum_types[$forum_type])) { $errmsg = 'Unsupported forum type: "' . $forum_type . '"'; } } $head_extra = ''; if ($errmsg) { $head_extra = '<meta http-equiv="refresh" content="5; url=." />'; } else { $head_extra = <<<EOF <style type="text/css"> #table_fups_enter_options { \tborder-collapse: collapse; } #table_fups_enter_options td { \tvertical-align: top;
if ($web_initiated) { $settings_filename = make_settings_filename($token); } else { if ($web_initiated === false) { if (!$settings_filename || !$output_dirname) { FUPSBase::exit_err_s('Fatal error: no ' . (!$settings_filename ? 'settings' : 'output') . ' filename specified in commandline arguments.', __FILE__, __METHOD__, __LINE__); } } else { FUPSBase::exit_err_s('Fatal error: $web_initiated is uninitialised after parsing commandline arguments (this error should never occur, and indicates a bug).', __FILE__, __METHOD__, __LINE__); } } } $forum_type = FUPSBase::read_forum_type_from_settings_file_s($settings_filename); $valid_forum_types = FUPSBase::get_valid_forum_types(); if (!isset($valid_forum_types[$forum_type])) { FUPSBase::exit_err_s('Fatal error: missing or invalid forum_type in settings file "' . $settings_filename . '": "' . $forum_type . '".', __FILE__, __METHOD__, __LINE__); } $forum_type_caps = $valid_forum_types[$forum_type]; require_once __DIR__ . '/classes/C' . $forum_type_caps . '.php'; if ($chained) { $token_or_settings_filename = $web_initiated ? $token : $settings_filename; $FUPS = unserialize(file_get_contents(make_serialize_filename($token_or_settings_filename))); } else { if ($web_initiated) { $params = array('token' => $token); } else { $params = array('settings_filename' => $settings_filename, 'output_dirname' => $output_dirname, 'quiet' => $quiet); } $class = $forum_type_caps . 'FUPS'; $FUPS = new $class($web_initiated, $params); }
protected function validate_settings() { parent::validate_settings(); if (filter_var($this->settings['extract_user_id'], FILTER_VALIDATE_INT) === false) { $this->exit_err('The value supplied for the extract_user_id setting, "' . $this->settings['extract_user_id'] . '", is not an integer, which it is required to be for phpBB boards.', __FILE__, __METHOD__, __LINE__); } }