コード例 #1
0
ファイル: SugarShadow.php プロジェクト: adderall/shadow
 /**
  * Enables Shadowing on a Sugar Server
  *
  * @param STRING $server
  */
 static function shadow($server, $templatePath = null)
 {
     if (empty($templatePath) && !empty($_SERVER['DOCUMENT_ROOT'])) {
         $templatePath = $_SERVER['DOCUMENT_ROOT'];
     }
     if (empty($templatePath) && !empty($_SERVER['SHADOW_ROOT'])) {
         $templatePath = $_SERVER['SHADOW_ROOT'];
     }
     $shadow = new SugarShadow($server);
     $info = $shadow->getServerInfo();
     if (empty($templatePath) || empty($info)) {
         die('<h3>Invalid SugarCRM Instance</h3>');
     } else {
         if (!file_exists($info['path'])) {
             die('<h3>Invalid SugarCRM Instance</h3>');
         }
         shadow($templatePath, $info['path'], array('cache', 'upload', 'config.php'));
     }
 }
コード例 #2
0
ファイル: SugarShadow.php プロジェクト: adderall/shadow
 /**
  *
  * Enables Shadowing on a Sugar Server
  * @param STRING $server
  */
 static function shadow($server)
 {
     $shadow = new SugarShadow($server);
     $info = $shadow->getServerInfo();
     if (empty($info)) {
         die('<h3>Invalid SugarCRM Instance</h3>');
     } else {
         if (!file_exists($info['path'])) {
             if ($shadow->config['shadow']['createDir']) {
                 $shadow->createInstance($info['path']);
             } else {
                 die('<h3>Invalid SugarCRM Instance</h3>');
             }
         }
         shadow(dirname(__FILE__), $info['path'], array('cache', 'config.php'));
     }
 }
コード例 #3
0
ファイル: install.php プロジェクト: adderall/shadow
 * remove SugarCRM copyrights from the source code or user interface.
 *
 * All copies of the Covered Code must include on each user interface screen:
 *  (i) the "Powered by SugarCRM" logo and
 *  (ii) the SugarCRM copyright notice
 * in the same form as they appear in the distribution.  See full license for
 * requirements.
 *
 * Your Warranty, Limitations of liability and Indemnity are expressly stated
 * in the License.  Please refer to the License for the specific language
 * governing these rights and limitations under the License.  Portions created
 * by SugarCRM are Copyright (C) 2004-2010 SugarCRM, Inc.; All Rights Reserved.
 ********************************************************************************/
//session_destroy();
require 'SugarShadow.php';
SugarShadow::shadow($_SERVER['SERVER_NAME']);
if (version_compare(phpversion(), '5.2.0') < 0) {
    $msg = 'Minimum PHP version required is 5.2.0.  You are using PHP version  ' . phpversion();
    die($msg);
}
$session_id = session_id();
if (empty($session_id)) {
    @session_start();
}
$GLOBALS['installing'] = true;
define('SUGARCRM_IS_INSTALLING', $GLOBALS['installing']);
$GLOBALS['sql_queries'] = 0;
require_once 'include/SugarLogger/LoggerManager.php';
require_once 'sugar_version.php';
require_once 'include/utils.php';
require_once 'install/install_utils.php';