*/
public static function getDocBaseURL() {
// FIXME: move this to configuration at some stage
- return 'http://book.civicrm.org/';
+ return 'https://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/((\w\w/)?stable/)?#', 'user/en/stable/', $url);
+ }
+
/**
* Exit with provided exit code.
*
<td>{ts}Online event registration and participant tracking.{/ts}</td>
</tr>
<tr class="even">
- <td class="tasklist nowrap">{docURL page="user/membership/introduction-to-memberships" text="CiviMember"}</td>
+ <td class="tasklist nowrap">{docURL page="user/membership/what-is-civimember" text="CiviMember"}</td>
<td>{ts}Online signup and membership management.{/ts}</td>
</tr>
<tr class="even">