Skip to content

Commit

Permalink
got docs to build
Browse files Browse the repository at this point in the history
  • Loading branch information
parroit committed Sep 30, 2012
1 parent f827235 commit b262eef
Show file tree
Hide file tree
Showing 6 changed files with 106 additions and 21 deletions.
13 changes: 6 additions & 7 deletions build.php.hxml
@@ -1,17 +1,16 @@
# @tm-preview
# @tm-html <iframe src="http://ufront/index.php" style="width: 100%; height:500px"></iframe>
-cp ../core/src
#-cp ../uform/src
-cp ../hxculture/src
-lib hxevents
-cp ../utest/src
-cp ../htemplate/src
-cp src
-cp test
-cp ../htemplate/src
-lib hscript
-lib umock
-lib utest
-lib thx
-lib hxevents
-lib erazor
-php bin
-main TestAll
-D htemplate
-D hxculture
-debug
-xml ufront.xml
80 changes: 80 additions & 0 deletions cfg.chxdoc
@@ -0,0 +1,80 @@
<xml>

<!--Title, subtitle, headers and footers on pages-->
<title value="Haxe Application" />
<subtitle value="<a href='http://www.haxe.org/' target='new'>http://www.haxe.org/</a>" />
<headerText value="" />
<footerText value="" />

<!--Files to read in as header or footer text-->
<headerTextFile value="" />
<footerTextFile value="" />

<!--Xml files to parse. List of <file name="" platform="" [remap=""]>-->
<files>
<!--
<file name="flash9.xml" remap="flash9" platform="flash" />
<file name="neko.xml" platform="neko" />
-->
</files>

<!--Format for dates-->
<dateShort value="%Y-%m-%d" />
<dateLong value="%a %b %d %H:%M:%S %Z %Y" />

<!--Turns on all show* values, regardless of their value. Should come before any show* entries-->
<developer value="false" />

<!--Show @author values in docs-->
<showAuthorTags value="false" />
<showMeta value="true" />

<!--Output items marked private-->
<showPrivateClasses value="false" />
<showPrivateTypedefs value="false" />
<showPrivateEnums value="false" />
<showPrivateMethods value="false" />
<showPrivateVars value="false" />
<showTodoTags value="true" />

<!--Turn on todo generation. and file to output todo list to-->
<generateTodo value="true" />

<!--Output directory-->
<output value="docs" />

<!--Excluded packages or classes in <exclude value='my.pkg.*'> elements-->
<filters policy="deny">

<filter path="ufront.*" policy="allow" />


</filters>

<!--Template name, templates base directory and macros file name of main macros-->
<template value="default" />
<templatesDir value="" />
<macros value="macros.mtt" />

<!--File extension for html documentation files-->
<htmlFileExtension value="html" />

<!--The stylesheet to use-->
<stylesheet value="stylesheet.css" />

<!--Merge metadata with same names as @doc tags with the @doc tags-->
<mergeMeta value="true" />

<!--Copy the images or css from template to output directory-->
<installImagesDir value="true" />
<installCssFile value="true" />

<!--Turn on verbose mode-->
<verbose value="false" />

<!--Temporary directory name for template compilation-->
<tmpDir value="./__chxdoctmp/" />

<!--Password for mod_neko integration-->
<webPassword value="" />
</xml>
6 changes: 1 addition & 5 deletions doc.bat
@@ -1,5 +1 @@
cd doc
chxdoc.exe -f flash -f haxe -f neko -f php -f test --installTemplate=true --showPrivateClasses=false --showPrivateTypedefs=false --showPrivateEnums=false --showPrivateMethods=false --showPrivateVars=false --generateTodoFile=true --showTodoTags=true --ignoreRoot=true --title=ufront doc.neko.xml,neko
;doc.php.xml,php
cd ..
PAUSE
chxdoc.exe --config=cfg.chxdoc --policy=deny --allow=neko.ufront.* --allow=php.ufront.* --allow=ufront.* -f ufront.xml
17 changes: 10 additions & 7 deletions src/php/ufront/web/FileSession.hx
@@ -1,6 +1,7 @@
/**
* ...
* @author Andreas Söderlund
* @author Andrea Parodi
*/

package php.ufront.web;
Expand All @@ -14,7 +15,7 @@ import haxe.BaseCode;
import haxe.Unserializer;
import haxe.Serializer;

//TODO:compare with neko implementation
/** @todo compare with neko implementation */
class FileSession implements IHttpSessionState
{

Expand Down Expand Up @@ -86,8 +87,8 @@ class FileSession implements IHttpSessionState

} else {

//TODO:sanitize coockie id to avoid directory escapes
//TODO:rebuild a new coockie id on every request and rename storage folder?
/** @todo sanitize coockie id to avoid directory escapes */
/** @todo rebuild a new coockie id on every request and rename storage folder? */
var id=cookie;
if (!FileSystem.exists(this.savePath+"/"+id)){
//this code is to prevent session fixation. create a new cookie
Expand All @@ -100,8 +101,10 @@ class FileSession implements IHttpSessionState

this.sessionId=id;
}
} //TODO:check for existence of directory for provided session ids
//TODO:MD5 the sessionId to avoid knowledge of the cookie looking at filesystem
}

/** @todo check for existence of directory for provided session ids */
/** @todo MD5 the sessionId to avoid knowledge of the cookie looking at filesystem */
this.sessionStoragePath=this.savePath+"/"+this.sessionId;

// var writer=File.append("c:\\log.txt",false);
Expand All @@ -128,7 +131,7 @@ class FileSession implements IHttpSessionState
FileSystem.deleteFile(sessionStoragePath+"/"+file);

FileSystem.deleteDirectory(sessionStoragePath);
//FileSystem.createDirectory(sessionStoragePath);

}


Expand All @@ -138,7 +141,7 @@ class FileSession implements IHttpSessionState
return Unserializer.run(File.getContent(getVarPath(name)));
}

//TODO:sanitize name to avoid directory escapes
/** @todo sanitize name to avoid directory escapes*/
private function getVarPath(name : String){
return sessionStoragePath+"/"+name;
}
Expand Down
5 changes: 3 additions & 2 deletions src/ufront/web/mvc/view/TranslationHelper.hx
Expand Up @@ -12,7 +12,8 @@ class TranslationHelper implements IViewHelper

public function register(data : Hash<Dynamic>)
{
data.set("_", translator._);
data.set("__", translator.__);
//doesnt' compile!
//data.set("_", translator._);
//data.set("__", translator.__);
}
}
6 changes: 6 additions & 0 deletions test/ufront/web/HttpSessionStateMock.hx
Expand Up @@ -43,4 +43,10 @@ class HttpSessionStateMock implements IHttpSessionState
{
return "mock";
}

public function setLifeTime(lifetime:Int)
{


}
}

0 comments on commit b262eef

Please sign in to comment.