Added:
trunk/Classes/Phaux-render/WHButtonTag.php (contents, props changed)
trunk/Classes/Phaux-render/WHLabelTag.php (contents, props changed)
Modified:
trunk/ (props changed)
trunk/Classes/Phaux-base/WHConfiguration.php
trunk/Classes/Phaux-base/WHSession.php
trunk/Classes/Phaux-render/phaux-render.php
trunk/Configuration/base.ini
trunk/HtmlRoot/phaux.php
Log:
Some needed updateswq
Modified: trunk/Classes/Phaux-base/WHConfiguration.php
==============================================================================
--- trunk/Classes/Phaux-base/WHConfiguration.php (original)
+++ trunk/Classes/Phaux-base/WHConfiguration.php Mon Mar 23 17:52:57 2009
@@ -27,9 +27,10 @@
public function appUrl(){
global $app;
return $_SESSION[$app]['session']->configuration()->baseUrl().
- "/$app?SID=".$_SESSION[$app]['session']->sessionId();
+
"/$app?".$this->sessionName()."=".$_SESSION[$app]['session']->sessionId();
}
+
public function baseUrl(){
//die(var_dump($url));
return $_SERVER['SCRIPT_NAME'];
@@ -92,6 +93,14 @@
return $this->configValueBySubjectAndKey('general','use_cookie');
}
+ public function sessionName(){
+ $session_name =
$this->configValueBySubjectAndKey('general','session_name');
+ if(empty($session_name)){
+ return "SID";
+ }
+ return $session_name;
+ }
+
public function sessionClass(){
return $this->configValueBySubjectAndKey('general','session_class');
}
@@ -153,7 +162,7 @@
static function startUpOnAppWithIni($app,$app_configuration){
ini_set("session.use_cookies",$app_configuration['general']['use_cookie']);
- ini_set("session.name","SID");
+ session_name($configuration->sessionName());
$configuration_class =
$app_configuration['general']['configuration_class'];
$configuration = Object::construct($configuration_class);
Modified: trunk/Classes/Phaux-base/WHSession.php
==============================================================================
--- trunk/Classes/Phaux-base/WHSession.php (original)
+++ trunk/Classes/Phaux-base/WHSession.php Mon Mar 23 17:52:57 2009
@@ -250,7 +250,7 @@
"?_r=".$this->currentRegistryKey();
if(!$this->configuration()->useCookie()){
- $url .= "&SID=".$this->sessionId();
+
$url .= "&".$this->configuration()->sessionName()."=".$this->sessionId();
}
return $url;
}
Added: trunk/Classes/Phaux-render/WHButtonTag.php
==============================================================================
--- (empty file)
+++ trunk/Classes/Phaux-render/WHButtonTag.php Mon Mar 23 17:52:57 2009
@@ -0,0 +1,27 @@
+<?php
+/**
+ * @package Phaux-render
+ */
+class WHButtonTag extends WHFormInputTag {
+
+
+ public function tag(){
+ return "button";
+ }
+
+ public function type() {
+ return "submit";
+ }
+
+ public function value($aString){
+ $this->with($aString);
+ return $this;
+ }
+
+ public function with($contents){
+ $this->contents = $contents;
+ return $this;
+ }
+
+
+}
\ No newline at end of file
Added: trunk/Classes/Phaux-render/WHLabelTag.php
==============================================================================
--- (empty file)
+++ trunk/Classes/Phaux-render/WHLabelTag.php Mon Mar 23 17:52:57 2009
@@ -0,0 +1,35 @@
+<?
+
+class WHFormLabelTag extends WHTag {
+
+ protected $label;
+ protected $input;
+ protected $reverse = false;
+
+ public function tag() {
+ return 'label';
+ }
+
+ public function input() {
+ return $this->input;
+ }
+
+ public function reverse() {
+ $this->reverse = true;
+ $this->class('reverse');
+ $this->input =
Object::construct('WHGenericTag')->setTag('span')->class('reverse')->with($this->input());
+ return $this;
+ }
+
+ public function setInput($aWHTag) {
+ $this->input = $aWHTag;
+ $this->input->ensure_id();
+ $this->setAttribute('for', $this->input->attributeAt('id'));
+ return $this;
+ }
+
+ public function __toString() {
+ return (!$this->reverse ?
parent::__toString() : '').$this->input().($this->reverse ?
parent::__toString() : '');
+ }
+
+}
\ No newline at end of file
Modified: trunk/Classes/Phaux-render/phaux-render.php
==============================================================================
--- trunk/Classes/Phaux-render/phaux-render.php (original)
+++ trunk/Classes/Phaux-render/phaux-render.php Mon Mar 23 17:52:57 2009
@@ -33,5 +33,5 @@
include('WHTextAreaTag.php');
include('WHStyleTag.php');
include('WHFileInputTag.php');
-//include('WHLabelTag.php');
-//include('WHButtonTag.php');
+include('WHLabelTag.php');
+include('WHButtonTag.php');
Modified: trunk/Configuration/base.ini
==============================================================================
--- trunk/Configuration/base.ini (original)
+++ trunk/Configuration/base.ini Mon Mar 23 17:52:57 2009
@@ -3,19 +3,22 @@
main_class="WHComponent"
configuration_class="WHConfiguration"
render_class="WHHtmlCanvas"
-use_cookie=1
-showtoolbar = 1
-#If set to 0 the website users will not see tracebacks
-debug=1
+use_cookie=0
+showtoolbar = 0
+;If set to 0 the website users will not see tracebacks
+debug=0
-#The ip address of the client that is allowed to see the workspace
+session_cookie_expiration = 0
+session_name = sidmobile
+
+;The ip address of the client that is allowed to see the workspace
workspace_ipaddr="127.0.0.1"
-#set this to the email address users will see when the trigger a problem
+;set this to the email address users will see when the trigger a problem
admin_email='f...@bar.com'
-#prevents the user hitting reload and doing the same thing twice
-redirect_after_callback=1 #State registry does not work when set to 0
+;prevents the user hitting reload and doing the same thing twice
+redirect_after_callback="0" #State registry does not work when set to 0
[server]
@@ -24,8 +27,8 @@
secure=0 #Not yet used
[includes]
-#Now assumed
-#Phaux ../Classes/Phaux-base/phaux-base.php
+;Now assumed
+;Phaux ../Classes/Phaux-base/phaux-base.php
Render="../Classes/Phaux-render/phaux-render.php"
[styles]
@@ -36,5 +39,5 @@
[scripts]
;standard="scripts-standard/standardScript.js"
-#Dicectories were you keep css/js/images should be listed here
-[resources]
\ No newline at end of file
+;Dicectories were you keep css/js/images should be listed here
+[resources]
Modified: trunk/HtmlRoot/phaux.php
==============================================================================
--- trunk/HtmlRoot/phaux.php (original)
+++ trunk/HtmlRoot/phaux.php Mon Mar 23 17:52:57 2009
@@ -6,6 +6,9 @@
** It might be better to move most of it out to an
** Object
*/
+
+
+
error_reporting(E_ALL);
if(get_magic_quotes_gpc()){
foreach($_REQUEST as $var => $value){
@@ -55,9 +58,9 @@
$configuration = Object::construct($configuration_class);
$configuration->setApplicationName($app)->
setConfigValues($app_configurations[$app]);
-
+
session_set_cookie_params($app_configurations[$app]['general']['session_cookie_expiration']);
ini_set("session.use_cookies",$configuration->useCookie());
- ini_set("session.name","SID");
+ session_name($configuration->sessionName());
$session_class = $configuration->sessionClass();
$session = call_user_func(array(