Skip to content

Commit

Permalink
[ci skip] Cleaned some spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
narfbg committed Dec 3, 2012
1 parent 6a38949 commit 838a9d6
Show file tree
Hide file tree
Showing 46 changed files with 85 additions and 93 deletions.
4 changes: 2 additions & 2 deletions system/.htaccess
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<IfModule authz_core_module>
Require all denied
Require all denied
</IfModule>
<IfModule !authz_core_module>
Deny from all
Deny from all
</IfModule>
3 changes: 1 addition & 2 deletions system/core/Log.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class CI_Log {
*
* @var array
*/
protected $_levels = array('ERROR' => 1, 'DEBUG' => 2, 'INFO' => 3, 'ALL' => 4);
protected $_levels = array('ERROR' => 1, 'DEBUG' => 2, 'INFO' => 3, 'ALL' => 4);

/**
* Initialize Logging class
Expand Down Expand Up @@ -145,7 +145,6 @@ public function write_log($level = 'error', $msg, $php_error = FALSE)
return FALSE;
}


$filepath = $this->_log_path.'log-'.date('Y-m-d').'.php';
$message = '';

Expand Down
3 changes: 1 addition & 2 deletions system/core/Security.php
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ public function xss_clean($str, $is_image = FALSE)
}
else
{
$str = str_replace(array('<?', '?'.'>'), array('&lt;?', '?&gt;'), $str);
$str = str_replace(array('<?', '?'.'>'), array('&lt;?', '?&gt;'), $str);
}

/*
Expand All @@ -382,7 +382,6 @@ public function xss_clean($str, $is_image = FALSE)
'applet', 'alert', 'document', 'write', 'cookie', 'window'
);


foreach ($words as $word)
{
$word = implode('\s*', str_split($word)).'\s*';
Expand Down
2 changes: 1 addition & 1 deletion system/database/DB_query_builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -1508,7 +1508,7 @@ public function set_insert_batch($key, $value = '', $escape = NULL)
$row = $clean;
}

$this->qb_set[] = '('.implode(',', $row).')';
$this->qb_set[] = '('.implode(',', $row).')';
}

foreach ($keys as $k)
Expand Down
10 changes: 5 additions & 5 deletions system/database/drivers/mysql/mysql_driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -323,12 +323,12 @@ public function escape_str($str, $like = FALSE)
if (is_array($str))
{
foreach ($str as $key => $val)
{
{
$str[$key] = $this->escape_str($val, $like);
}
}

return $str;
}
return $str;
}

$str = is_resource($this->conn_id) ? mysql_real_escape_string($str, $this->conn_id) : addslashes($str);

Expand Down Expand Up @@ -481,7 +481,7 @@ protected function _update_batch($table, $values, $index)
{
if ($field !== $index)
{
$final[$field][] = 'WHEN '.$index.' = '.$val[$index].' THEN '.$val[$field];
$final[$field][] = 'WHEN '.$index.' = '.$val[$index].' THEN '.$val[$field];
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion system/database/drivers/mysqli/mysqli_driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ protected function _update_batch($table, $values, $index)
{
if ($field !== $index)
{
$final[$field][] = 'WHEN '.$index.' = '.$val[$index].' THEN '.$val[$field];
$final[$field][] = 'WHEN '.$index.' = '.$val[$index].' THEN '.$val[$field];
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion system/database/drivers/odbc/odbc_driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ public function error()
* @param string $table
* @param array $values
* @return string
*/
*/
protected function _update($table, $values)
{
$this->qb_limit = FALSE;
Expand Down
2 changes: 1 addition & 1 deletion system/database/drivers/pdo/pdo_driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ protected function _update_batch($table, $values, $index)
{
if ($field !== $index)
{
$final[$field][] = 'WHEN '.$index.' = '.$val[$index].' THEN '.$val[$field];
$final[$field][] = 'WHEN '.$index.' = '.$val[$index].' THEN '.$val[$field];
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ protected function _update_batch($table, $values, $index)
{
if ($field !== $index)
{
$final[$field][] = 'WHEN '.$index.' = '.$val[$index].' THEN '.$val[$field];
$final[$field][] = 'WHEN '.$index.' = '.$val[$index].' THEN '.$val[$field];
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion system/database/drivers/pdo/subdrivers/pdo_ibm_driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ public function field_data($table = '')
* @param string $table
* @param array $values
* @return string
*/
*/
protected function _update($table, $values)
{
$this->qb_limit = FALSE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ public function field_data($table = '')
* @param string $table
* @param array $values
* @return string
*/
*/
protected function _update($table, $values)
{
$this->qb_limit = FALSE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ protected function _update_batch($table, $values, $index)
{
if ($field !== $index)
{
$final[$field][] = 'WHEN '.$index.' = '.$val[$index].' THEN '.$val[$field];
$final[$field][] = 'WHEN '.$index.' = '.$val[$index].' THEN '.$val[$field];
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ protected function _list_tables($prefix_limit = FALSE)
.sprintf($this->_like_escape_str, $this->_like_escape_chr);
}

return $sql;
return $sql;
}

// --------------------------------------------------------------------
Expand Down Expand Up @@ -195,7 +195,7 @@ protected function _list_columns($table = '')
* @param string $table
* @param array $values
* @return string
*/
*/
protected function _update($table, $values)
{
$this->qb_limit = FALSE;
Expand Down
4 changes: 2 additions & 2 deletions system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ public function field_data($table = '')
* @param string $table
* @param array $values
* @return string
*/
*/
protected function _update($table, $values)
{
$this->qb_limit = FALSE;
Expand Down Expand Up @@ -282,7 +282,7 @@ protected function _update_batch($table, $values, $index)
{
if ($field !== $index)
{
$final[$field][] = 'WHEN '.$val[$index].' THEN '.$val[$field];
$final[$field][] = 'WHEN '.$val[$index].' THEN '.$val[$field];
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ protected function _replace($table, $keys, $values)
*
* @param string $table
* @return string
*/
*/
protected function _truncate($table)
{
return 'DELETE FROM '.$table;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ public function field_data($table = '')
* @param string $table
* @param array $values
* @return string
*/
*/
protected function _update($table, $values)
{
$this->qb_limit = FALSE;
Expand Down
2 changes: 1 addition & 1 deletion system/database/drivers/postgre/postgre_driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ protected function _update_batch($table, $values, $index)
{
if ($field !== $index)
{
$final[$field][] = 'WHEN '.$val[$index].' THEN '.$val[$field];
$final[$field][] = 'WHEN '.$val[$index].' THEN '.$val[$field];
}
}
}
Expand Down
1 change: 0 additions & 1 deletion system/helpers/form_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -814,7 +814,6 @@ function set_radio($field = '', $value = '', $default = FALSE)

// ------------------------------------------------------------------------


if ( ! function_exists('form_error'))
{
/**
Expand Down
52 changes: 26 additions & 26 deletions system/helpers/inflector_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,33 +58,33 @@ function singular($str)
}

$singular_rules = array(
'/(matr)ices$/' => '\1ix',
'/(vert|ind)ices$/' => '\1ex',
'/^(ox)en/' => '\1',
'/(alias)es$/' => '\1',
'/([octop|vir])i$/' => '\1us',
'/(cris|ax|test)es$/' => '\1is',
'/(shoe)s$/' => '\1',
'/(o)es$/' => '\1',
'/(bus|campus)es$/' => '\1',
'/([m|l])ice$/' => '\1ouse',
'/(x|ch|ss|sh)es$/' => '\1',
'/(m)ovies$/' => '\1\2ovie',
'/(s)eries$/' => '\1\2eries',
'/([^aeiouy]|qu)ies$/' => '\1y',
'/([lr])ves$/' => '\1f',
'/(tive)s$/' => '\1',
'/(hive)s$/' => '\1',
'/([^f])ves$/' => '\1fe',
'/(^analy)ses$/' => '\1sis',
'/(matr)ices$/' => '\1ix',
'/(vert|ind)ices$/' => '\1ex',
'/^(ox)en/' => '\1',
'/(alias)es$/' => '\1',
'/([octop|vir])i$/' => '\1us',
'/(cris|ax|test)es$/' => '\1is',
'/(shoe)s$/' => '\1',
'/(o)es$/' => '\1',
'/(bus|campus)es$/' => '\1',
'/([m|l])ice$/' => '\1ouse',
'/(x|ch|ss|sh)es$/' => '\1',
'/(m)ovies$/' => '\1\2ovie',
'/(s)eries$/' => '\1\2eries',
'/([^aeiouy]|qu)ies$/' => '\1y',
'/([lr])ves$/' => '\1f',
'/(tive)s$/' => '\1',
'/(hive)s$/' => '\1',
'/([^f])ves$/' => '\1fe',
'/(^analy)ses$/' => '\1sis',
'/((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$/' => '\1\2sis',
'/([ti])a$/' => '\1um',
'/(p)eople$/' => '\1\2erson',
'/(m)en$/' => '\1an',
'/(s)tatuses$/' => '\1\2tatus',
'/(c)hildren$/' => '\1\2hild',
'/(n)ews$/' => '\1\2ews',
'/([^us])s$/' => '\1',
'/([ti])a$/' => '\1um',
'/(p)eople$/' => '\1\2erson',
'/(m)en$/' => '\1an',
'/(s)tatuses$/' => '\1\2tatus',
'/(c)hildren$/' => '\1\2hild',
'/(n)ews$/' => '\1\2ews',
'/([^us])s$/' => '\1'
);

foreach ($singular_rules as $rule => $replacement)
Expand Down
1 change: 0 additions & 1 deletion system/helpers/smiley_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ function insert_smiley(smiley, field_id) {

// ------------------------------------------------------------------------


if ( ! function_exists('get_clickable_smileys'))
{
/**
Expand Down
2 changes: 1 addition & 1 deletion system/helpers/text_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ function ascii_to_entities($str)
*/
if (count($temp) === 1)
{
$out .= '&#'.array_shift($temp).';';
$out .= '&#'.array_shift($temp).';';
$count = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion system/helpers/url_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ function safe_mailto($email, $title = '', $attributes = '')
{
foreach ($attributes as $key => $val)
{
$x[] = ' '.$key.'="';
$x[] = ' '.$key.'="';
for ($i = 0, $l = strlen($val); $i < $l; $i++)
{
$x[] = '|'.ord($val[$i]);
Expand Down
2 changes: 1 addition & 1 deletion system/language/english/form_validation_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
$lang['integer'] = 'The %s field must contain an integer.';
$lang['regex_match'] = 'The %s field is not in the correct format.';
$lang['matches'] = 'The %s field does not match the %s field.';
$lang['differs'] = 'The %s field must differ from the %s field.';
$lang['differs'] = 'The %s field must differ from the %s field.';
$lang['is_unique'] = 'The %s field must contain a unique value.';
$lang['is_natural'] = 'The %s field must only contain digits.';
$lang['is_natural_no_zero'] = 'The %s field must only contain digits and must be greater than zero.';
Expand Down
10 changes: 5 additions & 5 deletions system/language/english/migration_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@
*/
defined('BASEPATH') OR exit('No direct script access allowed');

$lang['migration_none_found'] = 'No migrations were found.';
$lang['migration_not_found'] = 'No migration could be found with the version number: %d.';
$lang['migration_sequence_gap'] = 'There is a gap in the migration sequence near version number: %d.';
$lang['migration_multiple_version'] = 'There are multiple migrations with the same version number: %d.';
$lang['migration_none_found'] = 'No migrations were found.';
$lang['migration_not_found'] = 'No migration could be found with the version number: %d.';
$lang['migration_sequence_gap'] = 'There is a gap in the migration sequence near version number: %d.';
$lang['migration_multiple_version'] = 'There are multiple migrations with the same version number: %d.';
$lang['migration_class_doesnt_exist'] = 'The migration class "%s" could not be found.';
$lang['migration_missing_up_method'] = 'The migration class "%s" is missing an "up" method.';
$lang['migration_missing_down_method'] = 'The migration class "%s" is missing a "down" method.';
$lang['migration_invalid_filename'] = 'Migration "%s" has an invalid filename.';
$lang['migration_invalid_filename'] = 'Migration "%s" has an invalid filename.';

/* End of file migration_lang.php */
/* Location: ./system/language/english/migration_lang.php */
2 changes: 1 addition & 1 deletion system/libraries/Cache/drivers/Cache_file.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public function get($id)

$data = unserialize(file_get_contents($this->_cache_path.$id));

if ($data['ttl'] > 0 && time() > $data['time'] + $data['ttl'])
if ($data['ttl'] > 0 && time() > $data['time'] + $data['ttl'])
{
unlink($this->_cache_path.$id);
return FALSE;
Expand Down
8 changes: 4 additions & 4 deletions system/libraries/Cache/drivers/Cache_wincache.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,10 @@ public function get_metadata($id)
$hitcount = $stored['ucache_entries'][1]['hitcount'];

return array(
'expire' => $ttl - $age,
'hitcount' => $hitcount,
'age' => $age,
'ttl' => $ttl
'expire' => $ttl - $age,
'hitcount' => $hitcount,
'age' => $age,
'ttl' => $ttl
);
}

Expand Down
10 changes: 5 additions & 5 deletions system/libraries/Calendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public function generate($year = '', $month = '', $data = array())
// Set and validate the supplied month/year
if (empty($year))
{
$year = date('Y', $this->local_time);
$year = date('Y', $this->local_time);
}
elseif (strlen($year) === 1)
{
Expand Down Expand Up @@ -219,8 +219,8 @@ public function generate($year = '', $month = '', $data = array())
// "previous" month link
if ($this->show_next_prev === TRUE)
{
// Add a trailing slash to the URL if needed
$this->next_prev_url = preg_replace('/(.+?)\/*$/', '\\1/', $this->next_prev_url);
// Add a trailing slash to the URL if needed
$this->next_prev_url = preg_replace('/(.+?)\/*$/', '\\1/', $this->next_prev_url);

$adjusted_date = $this->adjust_date($month - 1, $year);
$out .= str_replace('{previous_url}', $this->next_prev_url.$adjusted_date['year'].'/'.$adjusted_date['month'], $this->temp['heading_previous_cell'])."\n";
Expand Down Expand Up @@ -444,7 +444,7 @@ public function get_total_days($month, $year)
*/
public function default_template()
{
return array(
return array(
'table_open' => '<table border="0" cellpadding="4" cellspacing="0">',
'heading_row_start' => '<tr>',
'heading_previous_cell' => '<th><a href="{previous_url}">&lt;&lt;</a></th>',
Expand Down Expand Up @@ -490,7 +490,7 @@ public function parse_template()

$today = array('cal_cell_start_today', 'cal_cell_content_today', 'cal_cell_no_content_today', 'cal_cell_end_today');

foreach (array('table_open', 'table_close', 'heading_row_start', 'heading_previous_cell', 'heading_title_cell', 'heading_next_cell', 'heading_row_end', 'week_row_start', 'week_day_cell', 'week_row_end', 'cal_row_start', 'cal_cell_start', 'cal_cell_content', 'cal_cell_no_content', 'cal_cell_blank', 'cal_cell_end', 'cal_row_end', 'cal_cell_start_today', 'cal_cell_content_today', 'cal_cell_no_content_today', 'cal_cell_end_today') as $val)
foreach (array('table_open', 'table_close', 'heading_row_start', 'heading_previous_cell', 'heading_title_cell', 'heading_next_cell', 'heading_row_end', 'week_row_start', 'week_day_cell', 'week_row_end', 'cal_row_start', 'cal_cell_start', 'cal_cell_content', 'cal_cell_no_content', 'cal_cell_blank', 'cal_cell_end', 'cal_row_end', 'cal_cell_start_today', 'cal_cell_content_today', 'cal_cell_no_content_today', 'cal_cell_end_today') as $val)
{
if (preg_match('/\{'.$val.'\}(.*?)\{\/'.$val.'\}/si', $this->template, $match))
{
Expand Down
2 changes: 1 addition & 1 deletion system/libraries/Form_validation.php
Original file line number Diff line number Diff line change
Expand Up @@ -1443,7 +1443,7 @@ public function xss_clean($str)
*/
public function encode_php_tags($str)
{
return str_replace(array('<?', '?>'), array('&lt;?', '?&gt;'), $str);
return str_replace(array('<?', '?>'), array('&lt;?', '?&gt;'), $str);
}

// --------------------------------------------------------------------
Expand Down
Loading

0 comments on commit 838a9d6

Please sign in to comment.