15 if ( !isset($this->contents) ){
16 $this->contents = array(
'Users'=>array(),
'Administrators'=>array(),
'Developers'=>array());
23 return array(
'name'=>$name,
'url'=>$url,
'path'=>
$path,
'description'=>$description,
'target'=>$target);
28 $name = ucwords(str_replace(
'_',
' ',basename(
$path)));
32 $fh = fopen(
$path,
'r');
33 $beginning = fread($fh, 1024);
38 if ( preg_match(
'/<title>(.*?)</title>/i', $beginning, $matches) ){
41 if ( preg_match(
'/<meta name="description" content="([^"]+)".*?>/is', $beginning, $matches) ){
42 $description = $matches[1];
44 if ( preg_match(
'/<meta name="target-audience" content="([^"]+)".*?>/is', $beginning, $matches) ){
45 $target = $matches[1];
59 if ( isset(
$app->_conf[
'lang']) ) $lang =
$app->_conf[
'lang'];
61 if (is_dir($docRoot.
'/'.$lang) and is_readable($docRoot.
'/'.$lang) ){
62 return $docRoot.
'/'.$lang;
70 if ( isset(
$app->_conf[
'lang']) ) $lang =
$app->_conf[
'lang'];
72 $moduleName2 = preg_replace(
'/^modules_/',
'',$moduleName);
73 $docsDir = DATAFACE_PATH.
'modules/'.$moduleName2.
'/docs';
80 if ( isset(
$app->_conf[
'lang']) ) $lang =
$app->_conf[
'lang'];
82 $docsDir = DATAFACE_SITE_PATH.
'tables/'.
$tablename.
'/docs';
89 if ( isset(
$app->_conf[
'lang']) ) $lang =
$app->_conf[
'lang'];
91 $docsDir = DATAFACE_SITE_PATH.
'/docs';
99 if ( isset(
$app->_conf[
'lang']) ) $lang =
$app->_conf[
'lang'];
101 $docsDir = DATAFACE_PATH.
'/docs';