Viewing File: /usr/local/cpanel/whostmgr/docroot/cgi/softaculous/enduser/hooks/pre_install.php

<?php


if(!defined('SOFTACULOUS')){
	die('Hacking Attempt');
}

const HC_PHP_SWITCHER_LIBRARY = '/opt/hc_php/unversioned/SoftaculousPHPSwitcher.php';
if(file_exists(HC_PHP_SWITCHER_LIBRARY)){
  include_once(HC_PHP_SWITCHER_LIBRARY);
  define("USE_HC_PHP_SWITCHER", 1);
}

/**
 * This function will be called whenever a script is installed.
 * $software will have details of the script being installed.
 *
 * @package      hooks
 * @author       Max Nikitenko
 * @return       bool
 * @since     	 4.3.0
 */

function __pre_install(){

    global $cpanel, $soft, $software, $globals, $scripts, $softpanel, $error, $__hooks;

    if(!defined('USE_HC_PHP_SWITCHER')){
        return true;
    }
    if(method_exists($softpanel, 'soft_req_check') || is_null($cpanel)){
        return true;
    }
    $domain = $_POST['softdomain'];

	return HOOK_PHP_VERSION_SWITCH($domain);
}
Back to Directory File Manager