mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
(merged from branches/roa. use "svn log -c <changeset> -g <module-svn-path>" for detailed commit message)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@60259 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
a1f37b93eb
commit
7b26120582
@ -170,6 +170,29 @@ class Debug {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Log to a standard text file output.
|
||||
*
|
||||
* @param $message string to output
|
||||
*/
|
||||
static function log($message) {
|
||||
$file = dirname(__FILE__).'/../../debug.log';
|
||||
$now = date('r');
|
||||
$oldcontent = file_get_contents($file);
|
||||
$content = $oldcontent . "\n\n== $now ==\n$message\n";
|
||||
file_put_contents($file, $content);
|
||||
}
|
||||
|
||||
private static $warning_pos = 220;
|
||||
|
||||
static function warning($notice) {
|
||||
echo '<div style="background-color:#ccc;border:3px solid #999;position:absolute;right:0;bottom:'.self::$warning_pos.'px;">';
|
||||
echo '<h6>Warning:</h6>';
|
||||
echo '<p>'.$notice.'</p>';
|
||||
echo '</div>';
|
||||
self::$warning_pos = self::$warning_pos-50;
|
||||
}
|
||||
|
||||
/**
|
||||
* Load error handlers into environment
|
||||
*/
|
||||
|
@ -1,4 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package sapphire
|
||||
* @subpackage dev
|
||||
*/
|
||||
|
||||
/**
|
||||
* A basic HTML wrapper for stylish rendering of a developement info view.
|
||||
* Used to output error messages, and test results.
|
||||
|
@ -88,6 +88,7 @@ class ConfirmedPasswordField extends FormField {
|
||||
function Field() {
|
||||
Requirements::javascript('jsparty/prototype.js');
|
||||
Requirements::javascript('jsparty/behaviour.js');
|
||||
Requirements::javascript('jsparty/prototype_improvements.js');
|
||||
Requirements::javascript('sapphire/javascript/ConfirmedPasswordField.js');
|
||||
|
||||
$content = '';
|
||||
|
Loading…
x
Reference in New Issue
Block a user