| 1 | <?php |
| 2 | class CRM_Custom_Import_Controller extends CRM_Core_Controller { |
| 3 | /** |
| 4 | * class constructor |
| 5 | */ |
| 6 | function __construct($title = NULL, $action = CRM_Core_Action::NONE, $modal = TRUE) { |
| 7 | parent::__construct($title, $modal); |
| 8 | |
| 9 | // lets get around the time limit issue if possible, CRM-2113 |
| 10 | if (!ini_get('safe_mode')) { |
| 11 | set_time_limit(0); |
| 12 | } |
| 13 | |
| 14 | $this->_stateMachine = new CRM_Import_StateMachine($this, $action); |
| 15 | |
| 16 | // create and instantiate the pages |
| 17 | $this->addPages($this->_stateMachine, $action); |
| 18 | |
| 19 | // add all the actions |
| 20 | $config = CRM_Core_Config::singleton(); |
| 21 | $this->addActions($config->uploadDir, array('uploadFile')); |
| 22 | } |
| 23 | } |