public function setUp() { parent::setUp(); /* Load our plugin functions */ GFPDF_InstallUpdater::check_filesystem_api(); GFPDF_InstallUpdater::maybe_deploy(); }
public function setUp() { parent::setUp(); /* Load our plugin functions */ GFPDF_InstallUpdater::check_filesystem_api(); GFPDF_InstallUpdater::maybe_deploy(); /* * Admin init was restricted to Gravity Form-only pages */ global $gfpdf; $gfpdf = new GFPDF_Core(); }
public function setUp() { parent::setUp(); GFPDF_InstallUpdater::check_filesystem_api(); GFPDF_InstallUpdater::maybe_deploy(); global $gfpdf; $gfpdf = new GFPDF_Core(); $gfpdf->configuration = array(array('form_id' => 1, 'template' => 'example-template.php', 'filename' => 'testform.pdf'), array('form_id' => 1, 'template' => 'example-template-2.php', 'filename' => 'seconddoc.pdf'), array('form_id' => 2, 'template' => 'default-template.php', 'filename' => 'third-pdf.pdf'), array('form_id' => 2, 'template' => 'default-template.php', 'filename' => 'fourth-pdf.pdf'), array('form_id' => 2, 'template' => 'default-template.php', 'filename' => 'fifth-pdf.pdf'), array('form_id' => 4, 'template' => 'my-custom-template.php', 'security' => true, 'pdf_master_password' => 'admin password'), array('form_id' => 5, 'template' => 'default-template-no-style.php', 'default-show-html' => true, 'default-show-empty' => false, 'default-show-page-names' => true), array('form_id' => 6, 'template' => 'default-template-no-style.php', 'default-show-html' => true, 'default-show-empty' => true, 'default-show-page-names' => true, 'default-show-section-content' => true), array('form_id' => array(7, 8, 9, 10), 'template' => 'default-template-no-style.php', 'default-show-html' => true, 'default-show-empty' => true, 'default-show-page-names' => true, 'default-show-section-content' => true)); /* reenable the configuration */ $gfpdf->disabled = false; /* reset the index */ $gfpdf->index = array(); /* init config index */ $this->set_form_pdfs(); }
public function setUp() { /* * Replace set up with cut down version * so we don't use 'temporary' tables in MySQL */ $this->cut_down_setup(); /* initialise GF tables */ GFForms::setup(true); /* Load our plugin functions */ GFPDF_InstallUpdater::check_filesystem_api(); GFPDF_InstallUpdater::maybe_deploy(); /* create GF data */ $this->create_form_and_entries(); $this->setupConfiguration(); }
public function setUp() { /* * For some reasons this wasn't automatically set up so * we are running it here. */ $this->factory = new WP_UnitTest_Factory(); /* * Replace set up with cut down version * so we don't use 'temporary' tables in MySQL */ $this->cut_down_setup(); /* initialise GF tables */ GFForms::setup(true); /* Load our plugin functions */ GFPDF_InstallUpdater::check_filesystem_api(); GFPDF_InstallUpdater::maybe_deploy(); /* create GF data */ $this->create_form_and_entries(); }
public static function fully_loaded_admin() { /* * Check user has the correct permissions to deploy the software */ if (!current_user_can('manage_options')) { return; } global $gfpdfe_data; /* * Don't run initialiser if we cannot... */ if ($gfpdfe_data->allow_initilisation === false) { /* * Prompt user about a server configuration problem */ add_action($gfpdfe_data->notice_type, array("GFPDF_Notices", "gf_pdf_server_problem_detected")); return false; } /* * Check if we have direct write access to the server */ GFPDF_InstallUpdater::check_filesystem_api(); /* * Check if we can automatically deploy the software. * 90% of sites should be able to do this as they will have 'direct' write abilities * to their server files. */ GFPDF_InstallUpdater::maybe_deploy(); /* * Check if we need to deploy the software */ self::check_deployment(); /* * Check if the template folder location needs to be migrated */ if (!rgpost('upgrade')) { GFPDF_InstallUpdater::check_template_migration(); } }