forked from mirrors/easyappointments
Minor refactoring to helper files
This commit is contained in:
parent
e084ee913f
commit
df8417a8cc
4 changed files with 11 additions and 13 deletions
|
@ -24,8 +24,6 @@
|
|||
*/
|
||||
function asset_url($uri = '', $protocol = NULL)
|
||||
{
|
||||
$CI =& get_instance();
|
||||
|
||||
$debug = config('debug');
|
||||
|
||||
$cache_busting_token = ! $debug ? '?' . config('cache_busting_token') : '';
|
||||
|
|
|
@ -14,13 +14,13 @@
|
|||
/**
|
||||
* Print an exception to an HTML text.
|
||||
*
|
||||
* This method is used to display exceptions in a way that is useful and easy
|
||||
* for the user to see. It uses the Bootstrap CSS accordion markup to display
|
||||
* the message and when the user clicks on it the exception trace will be revealed.
|
||||
* We display only one exceptions at a time because the user needs to be able
|
||||
* to display the details of each exception seperately. (In contrast with js).
|
||||
* This method is used to display exceptions in a way that is useful and easy for the user to see. It uses the
|
||||
* Bootstrap CSS accordion markup to display the message and when the user clicks on it the exception trace will be
|
||||
* revealed. We display only one exceptions at a time because the user needs to be able to display the details of each
|
||||
* exception separately.
|
||||
*
|
||||
* @param Exception $exception The exception to be displayed.
|
||||
*
|
||||
* @return string Returns the html markup of the exception.
|
||||
*/
|
||||
function exceptionToHtml($exception)
|
||||
|
@ -30,8 +30,7 @@ function exceptionToHtml($exception)
|
|||
<div class="accordion-group">
|
||||
<div class="accordion-heading">
|
||||
<a class="accordion-toggle" data-toggle="collapse"
|
||||
data-parent="#error-accordion" href="#error-technical">' .
|
||||
$exception->getMessage() . '
|
||||
data-parent="#error-accordion" href="#error-technical">' . $exception->getMessage() . '
|
||||
</a>
|
||||
</div>
|
||||
<div id="error-technical" class="accordion-body collapse">
|
||||
|
|
|
@ -12,10 +12,10 @@
|
|||
* ---------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* Check if a string date is valid for insertion or update
|
||||
* to the database.
|
||||
* Check if a string date is valid for insertion or update to the database.
|
||||
*
|
||||
* @param string $datetime The given date.
|
||||
*
|
||||
* @return bool Returns the validation result.
|
||||
*
|
||||
* @link http://stackoverflow.com/a/8105844/1718162 [SOURCE]
|
||||
|
@ -23,6 +23,6 @@
|
|||
function validate_mysql_datetime($datetime)
|
||||
{
|
||||
$dt = DateTime::createFromFormat('Y-m-d H:i:s', $datetime);
|
||||
|
||||
|
||||
return $dt ? TRUE : FALSE;
|
||||
}
|
||||
|
|
|
@ -15,7 +15,8 @@
|
|||
* Render the HTML output of a timezone dropdown element.
|
||||
*
|
||||
* @param string $attributes HTML element attributes of the dropdown.
|
||||
* @return false|string
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function render_timezone_dropdown($attributes = '')
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue