projects
/
civicrm-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Cleanup phpdoc comments
[civicrm-core.git]
/
install
/
civicrm.php
diff --git
a/install/civicrm.php
b/install/civicrm.php
index 1f8e0492dd03e42d6ac9e6e33539779d35273c86..02b50b994cdf6ec95d01889ec221c778311e3a65 100644
(file)
--- a/
install/civicrm.php
+++ b/
install/civicrm.php
@@
-1,9
+1,9
@@
<?php
/*
+--------------------------------------------------------------------+
<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.
4
|
+ | CiviCRM version 4.
5
|
+--------------------------------------------------------------------+
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-201
3
|
+ | Copyright CiviCRM LLC (c) 2004-201
4
|
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
@@
-28,7
+28,7
@@
/**
*
* @package CRM
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-201
3
+ * @copyright CiviCRM LLC (c) 2004-201
4
* $Id$
*
*/
* $Id$
*
*/
@@
-36,6
+36,12
@@
function civicrm_setup($filesDirectory) {
global $crmPath, $sqlPath, $pkgPath, $tplPath;
global $compileDir;
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;
$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);
}
$compileDir = addslashes($compileDir);
}
+/**
+ * @param string $name
+ * @param $buffer
+ */
function civicrm_write_file($name, &$buffer) {
$fd = fopen($name, "w");
if (!$fd) {
function civicrm_write_file($name, &$buffer) {
$fd = fopen($name, "w");
if (!$fd) {
@@
-65,6
+75,9
@@
function civicrm_write_file($name, &$buffer) {
fclose($fd);
}
fclose($fd);
}
+/**
+ * @param $config
+ */
function civicrm_main(&$config) {
global $sqlPath, $crmPath, $cmsPath, $installType;
function civicrm_main(&$config) {
global $sqlPath, $crmPath, $cmsPath, $installType;
@@
-115,14
+128,23
@@
function civicrm_main(&$config) {
}
}
+/**
+ * @param $dsn
+ * @param string $fileName
+ * @param bool $lineMode
+ */
function civicrm_source($dsn, $fileName, $lineMode = FALSE) {
global $crmPath;
function civicrm_source($dsn, $fileName, $lineMode = FALSE) {
global $crmPath;
+
require_once "$crmPath/packages/DB.php";
$db = DB::connect($dsn);
if (PEAR::isError($db)) {
die("Cannot open $dsn: " . $db->getMessage());
}
require_once "$crmPath/packages/DB.php";
$db = DB::connect($dsn);
if (PEAR::isError($db)) {
die("Cannot open $dsn: " . $db->getMessage());
}
+ $db->query("SET NAMES utf8");
+
+ $db->query("SET NAMES utf8");
if (!$lineMode) {
$string = file_get_contents($fileName);
if (!$lineMode) {
$string = file_get_contents($fileName);
@@
-164,6
+186,11
@@
function civicrm_source($dsn, $fileName, $lineMode = FALSE) {
}
}
}
}
+/**
+ * @param $config
+ *
+ * @return string
+ */
function civicrm_config(&$config) {
global $crmPath, $comPath;
global $compileDir;
function civicrm_config(&$config) {
global $crmPath, $comPath;
global $compileDir;
@@
-216,6
+243,9
@@
function civicrm_config(&$config) {
return trim($str);
}
return trim($str);
}
+/**
+ * @return string
+ */
function civicrm_cms_base() {
global $installType;
function civicrm_cms_base() {
global $installType;
@@
-266,6
+296,9
@@
function civicrm_cms_base() {
return $url . $baseURL;
}
return $url . $baseURL;
}
+/**
+ * @return string
+ */
function civicrm_home_url() {
$drupalURL = civicrm_cms_base();
return $drupalURL . 'index.php?q=civicrm';
function civicrm_home_url() {
$drupalURL = civicrm_cms_base();
return $drupalURL . 'index.php?q=civicrm';