*/
public static function getDocBaseURL() {
// FIXME: move this to configuration at some stage
- return 'http://book.civicrm.org/';
+ return 'http://docs.civicrm.org/';
}
/**
}
else {
$docBaseURL = self::getDocBaseURL();
+ $page = self::formatDocUrl($page);
}
return $docBaseURL . str_replace(' ', '+', $page);
}
}
else {
$docBaseURL = self::getDocBaseURL();
+ $params['page'] = self::formatDocUrl($params['page']);
}
if (!isset($params['title']) or $params['title'] === NULL) {
}
}
+ /**
+ * Add language and version parameters to the doc url.
+ *
+ * Note that this function may run before CiviCRM is initialized and so should not call ts() or perform any db lookups.
+ *
+ * @param $url
+ * @return mixed
+ */
+ public static function formatDocUrl($url) {
+ return preg_replace('#^user/#', 'user/en/4.6/', $url);
+ }
+
/**
* Get the locale set in the hosting CMS.
*