Merge pull request #18739 from eileenmcnaughton/ef
[civicrm-core.git] / CRM / Custom / Import / Controller.php
CommitLineData
9ff5f6c0 1<?php
4c6ce474
EM
2
3/**
4 * Class CRM_Custom_Import_Controller
5 */
9ff5f6c0 6class CRM_Custom_Import_Controller extends CRM_Core_Controller {
518fa0ee 7
9ff5f6c0 8 /**
7a9ab499
EM
9 * Class constructor.
10 *
11 * @param string $title
12 * @param bool|int $action
13 * @param bool $modal
9ff5f6c0 14 */
00be9182 15 public function __construct($title = NULL, $action = CRM_Core_Action::NONE, $modal = TRUE) {
9ff5f6c0
N
16 parent::__construct($title, $modal);
17
18 // lets get around the time limit issue if possible, CRM-2113
19 if (!ini_get('safe_mode')) {
20 set_time_limit(0);
21 }
22
23 $this->_stateMachine = new CRM_Import_StateMachine($this, $action);
24
25 // create and instantiate the pages
26 $this->addPages($this->_stateMachine, $action);
27
28 // add all the actions
29 $config = CRM_Core_Config::singleton();
be2fb01f 30 $this->addActions($config->uploadDir, ['uploadFile']);
9ff5f6c0 31 }
96025800 32
4c6ce474 33}