Removed whitespace.
This commit is contained in:
parent
520d841500
commit
9b4763dd23
9 changed files with 23 additions and 23 deletions
|
@ -159,7 +159,7 @@ class Controller extends Object
|
|||
{
|
||||
$redirect_url .= $this->config->pickles['404'];
|
||||
}
|
||||
|
||||
|
||||
header('Location: ' . $redirect_url, 404);
|
||||
exit;
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
* database object that is a part of every model ($this->db). Because the
|
||||
* database object can execute raw SQL, there should be no limitations. Within
|
||||
* the PICKLES system, the database instance is shared, but the Database
|
||||
* constructor is not private, just in case someone wants to create new
|
||||
* constructor is not private, just in case someone wants to create new
|
||||
* Database objects all willy nilly like.
|
||||
*/
|
||||
class Database extends Object
|
||||
|
|
|
@ -74,7 +74,7 @@ abstract class Display_Common extends Object
|
|||
/**
|
||||
* Constructor
|
||||
*
|
||||
* Gets those headers working
|
||||
* Gets those headers working
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
|
@ -97,7 +97,7 @@ abstract class Display_Common extends Object
|
|||
header('Content-type: text/html; charset=UTF-8');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set Template
|
||||
*
|
||||
|
@ -131,8 +131,8 @@ abstract class Display_Common extends Object
|
|||
$this->setTemplate($parent_template, 'parent');
|
||||
$this->setTemplate($child_template, 'child');
|
||||
|
||||
$this->css_class = $css_class;
|
||||
$this->js_basename = $js_basename;
|
||||
$this->css_class = $css_class;
|
||||
$this->js_basename = $js_basename;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -144,9 +144,9 @@ abstract class Display_Common extends Object
|
|||
*/
|
||||
public function setModuleReturn($module_return)
|
||||
{
|
||||
$this->module_return = $module_return;
|
||||
$this->module_return = $module_return;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Template Exists
|
||||
*
|
||||
|
|
|
@ -114,11 +114,11 @@ class Display_PHP extends Display_Common
|
|||
$buffer = preg_replace($pattern, $hash, $buffer);
|
||||
}
|
||||
|
||||
// Strips the whitespace
|
||||
$buffer = trim(preg_replace('/((?<!\?>)\n)[\s]+/m', '\1', $buffer));
|
||||
// Strips the whitespace
|
||||
$buffer = trim(preg_replace('/((?<!\?>)\n)[\s]+/m', '\1', $buffer));
|
||||
|
||||
// Kills any HTML comments
|
||||
$buffer = preg_replace('/<!--.*-->/U', '', $buffer);
|
||||
$buffer = preg_replace('/<!--.*-->/U', '', $buffer);
|
||||
|
||||
// Injects the stuff we stripped earlier
|
||||
foreach ($search_replace as $search => $replacements)
|
||||
|
@ -129,9 +129,9 @@ class Display_PHP extends Display_Common
|
|||
}
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
// Kills any whitespace and HTML comments
|
||||
$buffer = preg_replace(array('/^[\s]+/m', '/<!--.*-->/U'), '', $buffer);
|
||||
$buffer = preg_replace(array('/^[\s]+/m', '/<!--.*-->/U'), '', $buffer);
|
||||
|
||||
// Note, this doesn't exit in case you want to run code after the display of the page
|
||||
echo $buffer;
|
||||
|
|
|
@ -69,7 +69,7 @@ class Form extends Singleton
|
|||
{
|
||||
return $this->input($name, $value, $classes, $additional, 'hidden');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Text Area
|
||||
*
|
||||
|
@ -112,7 +112,7 @@ class Form extends Singleton
|
|||
* @param array $options key/values for the options
|
||||
* @param string $selected optional default option
|
||||
* @return string HTML for the options
|
||||
* @todo Add support for optgroup
|
||||
* @todo Add support for optgroup
|
||||
*/
|
||||
public function options($options, $selected = null)
|
||||
{
|
||||
|
|
|
@ -117,7 +117,7 @@ class Log
|
|||
private static function write($log_type, $message, $format = true, $time = false)
|
||||
{
|
||||
$log_path = LOG_PATH . date('Y/m/d/', ($time == false ? time() : $time));
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
if (!file_exists($log_path))
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Profiler
|
||||
* Profiler
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
|
@ -91,7 +91,7 @@ class Profiler
|
|||
case 'array':
|
||||
$log = '<pre>' . print_r($data, true) . '</pre>';
|
||||
break;
|
||||
|
||||
|
||||
case 'object':
|
||||
$log = '<span style="color:#666">[</span><span style="color:#777">' . get_parent_class($data) . '</span><span style="color:#666">]</span> '
|
||||
. '<span style="color:#69c">' . get_class($data) . '</span>'
|
||||
|
@ -148,7 +148,7 @@ class Profiler
|
|||
$query = str_replace($key, '<span style="color:#a82222">' . $key . '</span>', $query);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$log = '<span style="color:#009600">' . $query . '</span>' . $log;
|
||||
|
||||
if (is_array($explain))
|
||||
|
@ -164,7 +164,7 @@ class Profiler
|
|||
. ($table['Extra'] != '' ? '<br /><span style="color:RoyalBlue">Extra</span> <span style="color:#666">=></span> <span style="color:DarkGoldenRod">' . $table['Extra'] . '</span>' : '');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$log .= '<br /><br /><span style="color:DarkKhaki">Speed:</span> ' . number_format($duration * 100, 3) . ' ms';
|
||||
|
||||
self::log($log, false, '<span style="color:DarkCyan">database</span>');
|
||||
|
@ -190,7 +190,7 @@ class Profiler
|
|||
$files = count(get_included_files());
|
||||
$files .= ' File' . ($files == 1 ? '' : 's');
|
||||
|
||||
$queries = self::$queries . ' Quer'. (self::$queries == 1 ? 'y' : 'ies');
|
||||
$queries = self::$queries . ' Quer'. (self::$queries == 1 ? 'y' : 'ies');
|
||||
?>
|
||||
<style>
|
||||
#pickles-profiler
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
class Singleton
|
||||
{
|
||||
/**
|
||||
* Object Instances
|
||||
* Object Instances
|
||||
*
|
||||
* @static
|
||||
* @access private
|
||||
|
|
|
@ -67,7 +67,7 @@ define('JSON_AVAILABLE', function_exists('json_encode'));
|
|||
/**
|
||||
* Magic function to automatically load classes
|
||||
*
|
||||
* Attempts to load a core PICKLES class or a site level data model or
|
||||
* Attempts to load a core PICKLES class or a site level data model or
|
||||
* module class. If Smarty is being requested, will load the proper class
|
||||
* from the vendors directory
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue