X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=install%2Fcivicrm.php;h=debefb2925b073d0778f5299f764d52e7019738e;hb=156fd9b9cc7cb9fc9c719c280484481017f21373;hp=11b8931934d1c5e1d59c2aa14523cd413f10538a;hpb=68d6b897b10ec82e276280d07d9614c79561639d;p=civicrm-core.git diff --git a/install/civicrm.php b/install/civicrm.php index 11b8931934..debefb2925 100644 --- a/install/civicrm.php +++ b/install/civicrm.php @@ -36,6 +36,12 @@ function civicrm_setup($filesDirectory) { global $crmPath, $sqlPath, $pkgPath, $tplPath; global $compileDir; + $pkgPath = $crmPath . DIRECTORY_SEPARATOR . 'packages'; + set_include_path($crmPath . PATH_SEPARATOR . + $pkgPath . PATH_SEPARATOR . + get_include_path() + ); + $sqlPath = $crmPath . DIRECTORY_SEPARATOR . 'sql'; $tplPath = $crmPath . DIRECTORY_SEPARATOR . 'templates' . DIRECTORY_SEPARATOR . 'CRM' . DIRECTORY_SEPARATOR . 'common' . DIRECTORY_SEPARATOR; @@ -56,6 +62,10 @@ function civicrm_setup($filesDirectory) { $compileDir = addslashes($compileDir); } +/** + * @param $name + * @param $buffer + */ function civicrm_write_file($name, &$buffer) { $fd = fopen($name, "w"); if (!$fd) { @@ -65,6 +75,9 @@ function civicrm_write_file($name, &$buffer) { fclose($fd); } +/** + * @param $config + */ function civicrm_main(&$config) { global $sqlPath, $crmPath, $cmsPath, $installType; @@ -115,8 +128,14 @@ function civicrm_main(&$config) { } +/** + * @param $dsn + * @param $fileName + * @param bool $lineMode + */ function civicrm_source($dsn, $fileName, $lineMode = FALSE) { global $crmPath; + require_once "$crmPath/packages/DB.php"; $db = DB::connect($dsn); @@ -167,6 +186,11 @@ function civicrm_source($dsn, $fileName, $lineMode = FALSE) { } } +/** + * @param $config + * + * @return string + */ function civicrm_config(&$config) { global $crmPath, $comPath; global $compileDir; @@ -219,6 +243,9 @@ function civicrm_config(&$config) { return trim($str); } +/** + * @return string + */ function civicrm_cms_base() { global $installType; @@ -269,6 +296,9 @@ function civicrm_cms_base() { return $url . $baseURL; } +/** + * @return string + */ function civicrm_home_url() { $drupalURL = civicrm_cms_base(); return $drupalURL . 'index.php?q=civicrm';