summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxue <>2006-03-25 22:00:48 +0000
committerxue <>2006-03-25 22:00:48 +0000
commitdbf96121469b00c070b95095dcae2b1c408581dc (patch)
tree3ed37a37ead906c88e1c680213d57aae7c48d464
parent686805ddf0f760e2c30ff8aa02994daf9fd386fa (diff)
Added more meaningful error message when creating runtime directory fails.
-rw-r--r--demos/quickstart/protected/pages/Controls/Standard.page35
-rw-r--r--framework/Exceptions/messages.txt1
-rw-r--r--framework/TApplication.php3
3 files changed, 20 insertions, 19 deletions
diff --git a/demos/quickstart/protected/pages/Controls/Standard.page b/demos/quickstart/protected/pages/Controls/Standard.page
index 67cb2bc1..ab485233 100644
--- a/demos/quickstart/protected/pages/Controls/Standard.page
+++ b/demos/quickstart/protected/pages/Controls/Standard.page
@@ -1,7 +1,7 @@
<com:TContent ID="body" >
<h1>Standard Controls</h1>
-
+<p>* the tutorial for this control is not completed yet.</p>
<ul>
<li>
<a href="?page=Controls.Button">TButton</a> represents a click button on a Web page. It is mainly used to trigger page postback.
@@ -11,31 +11,31 @@
<a href="?page=Controls.CheckBox">TCheckBox</a> represents a checkbox on a Web page. It can be used to collect two-state user input.
</li>
- <li>
+ <li>*
<a href="?page=Controls.ColorPicker">TColorPicker</a> represents an input field taking color values via a color dialog.
</li>
- <li>
+ <li>*
<a href="?page=Controls.DatePicker">TDatePicker</a> represents an input field taking date values via a calendar dialog.
</li>
- <li>
+ <li>*
<a href="?page=Controls.Expression">TExpression</a> accepts a PHP expression and displays the evaluation result on a Web page.
</li>
- <li>
+ <li>*
<a href="?page=Controls.FileUpload">TFileUpload</a> represents a file upload field. It allows users to upload a file to server.
</li>
- <li>
+ <li>*
<a href="?page=Controls.Head">THead</a> represents the &lt;head&gt; element on an HTML Web page. It is required by a PRADO page should it use themes.
</li>
- <li>
+ <li>*
<a href="?page=Controls.HiddenField">THiddenField</a> represents a hidden input field on a Web page.
</li>
- <li>
+ <li>*
<a href="?page=Controls.HtmlArea">THtmlArea</a> represents a WYSIWYG text input field taking user input that are in HTML format.
</li>
@@ -51,16 +51,15 @@
<a href="?page=Controls.ImageButton">TImageButton</a> represents a click button that has an image as the background. It is mainly used to trigger page postback.
</li>
- <li>
+ <li>*
<a href="?page=Controls.ImageMap">TImageMap</a> represents an image on a Web page with clickable hotspot regions.
</li>
- <li>
- <a href="?page=Controls.InlineFrame">TInlineFrame</a> represents an &lt;iframe;&gt; HTML element on a Web page.
- xxx
+ <li>*
+ <a href="?page=Controls.InlineFrame">TInlineFrame</a> represents an &lt;iframe&gt; HTML element on a Web page.
</li>
- <li>
+ <li>*
<a href="?page=Controls.JavascriptLogger">TJavascriptLogger</a> represents a logger on a Web page that can log various JavaScript information.
</li>
@@ -72,7 +71,7 @@
<a href="?page=Controls.LinkButton">TLinkButton</a> represents a hyperlink that can perform page postbacks.
</li>
- <li>
+ <li>*
<a href="?page=Controls.Literal">TLiteral</a> represents a static text without any HTML tag surrounding it on a Web page.
</li>
@@ -84,7 +83,7 @@
<a href="?page=Controls.Panel">TPanel</a> represents a container for other controls on a Web page. In HTML, it is displayed as a &lt;div&gt; element.
</li>
- <li>
+ <li>*
<a href="?page=Controls.PlaceHolder">TPlaceHolder</a> reserves a place on a control template. It inserts its body content at that place.
</li>
@@ -92,11 +91,11 @@
<a href="?page=Controls.RadioButton">TRadioButton</a> represents a radiobutton on a Web page. It is mainly used in a group from which users make a choice.
</li>
- <li>
+ <li>*
<a href="?page=Controls.SafeHtml">TSafeHtml</a> displays its body content with assurance that the content contain no harmful code (such as <a href="?page=Security.XSS">XSS</a>).
</li>
- <li>
+ <li>*
<a href="?page=Controls.Statements">TStatements</a> accepts a few PHP statements and displays their standard output on the Web page.
</li>
@@ -108,7 +107,7 @@
<a href="?page=Controls.TextBox">TTextBox</a> represents a text input field on a Web page. It can collect single-line, multi-line or password text input from users.
</li>
- <li>
+ <li>*
<a href="?page=Controls.TextHighlighter">TTextHighlighter</a> highlights its body content according to the specified syntax highlighter, such as PHP, XML, PRADO, etc.
</li>
diff --git a/framework/Exceptions/messages.txt b/framework/Exceptions/messages.txt
index 798fb50a..a60230bd 100644
--- a/framework/Exceptions/messages.txt
+++ b/framework/Exceptions/messages.txt
@@ -30,6 +30,7 @@ application_service_invalid = Service '{0}' must implement IService interface
application_service_unknown = Requested service '{0}' is not defined.
application_service_unavailable = Service Unavailable.
application_moduleid_duplicated = Application module ID '{0}' is not unique.
+application_runtimepath_failed = Unable to create runtime path '{0}'. Make sure the parent directory exists and is writable by the Web process.
appconfig_aliaspath_invalid = Application configuration <alias id="{0}"> uses an invalid file path "{1}".
appconfig_alias_invalid = Application configuration <alias> element must have an "id" attribute and a "path" attribute.
diff --git a/framework/TApplication.php b/framework/TApplication.php
index 12ac7195..681e8f3e 100644
--- a/framework/TApplication.php
+++ b/framework/TApplication.php
@@ -314,7 +314,8 @@ class TApplication extends TComponent
$subdir=basename($this->_configFile);
$this->_runtimePath.='/'.$subdir;
if(!is_dir($this->_runtimePath))
- mkdir($this->_runtimePath);
+ if(@mkdir($this->_runtimePath)===false)
+ throw new TConfigurationException('application_runtimepath_failed',$this->_runtimePath);
}
}
else