summaryrefslogtreecommitdiffstats
path: root/system/plugins
diff options
context:
space:
mode:
authorDerek Jones <derek.jones@ellislab.com>2008-05-13 06:22:33 +0200
committerDerek Jones <derek.jones@ellislab.com>2008-05-13 06:22:33 +0200
commit0b59f270a432f8c7b6128981f0a39b4a2e2fbd34 (patch)
tree1e7655eabd76bb981692f5d4f21cb1fc7be3e9cd /system/plugins
parent5cf664748ee295867f593d7eb7991bd35fe8eca6 (diff)
Some sweeping syntax changes for consistency:
(! foo) changed to ( ! foo) || changed to OR changed newline standardization code in various places from preg_replace to str_replace
Diffstat (limited to 'system/plugins')
-rw-r--r--system/plugins/captcha_pi.php18
-rw-r--r--system/plugins/js_calendar_pi.php18
2 files changed, 18 insertions, 18 deletions
diff --git a/system/plugins/captcha_pi.php b/system/plugins/captcha_pi.php
index ec45309e5..df95788ee 100644
--- a/system/plugins/captcha_pi.php
+++ b/system/plugins/captcha_pi.php
@@ -1,4 +1,4 @@
-<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
*
@@ -157,16 +157,16 @@ function create_captcha($data = '', $img_path = '', $img_url = '', $font_path =
foreach ($defaults as $key => $val)
{
- if (! is_array($data))
+ if ( ! is_array($data))
{
- if (! isset($$key) OR $$key == '')
+ if ( ! isset($$key) OR $$key == '')
{
$$key = $val;
}
}
else
{
- $$key = (! isset($data[$key])) ? $val : $data[$key];
+ $$key = ( ! isset($data[$key])) ? $val : $data[$key];
}
}
@@ -175,17 +175,17 @@ function create_captcha($data = '', $img_path = '', $img_url = '', $font_path =
return FALSE;
}
- if (! @is_dir($img_path))
+ if ( ! @is_dir($img_path))
{
return FALSE;
}
- if (! is_really_writable($img_path))
+ if ( ! is_really_writable($img_path))
{
return FALSE;
}
- if (! extension_loaded('gd'))
+ if ( ! extension_loaded('gd'))
{
return FALSE;
}
@@ -351,6 +351,6 @@ function create_captcha($data = '', $img_path = '', $img_url = '', $font_path =
return array('word' => $word, 'time' => $now, 'image' => $img);
}
-
-/* End of file captcha_pi.php */
+
+/* End of file captcha_pi.php */
/* Location: ./system/plugins/captcha_pi.php */ \ No newline at end of file
diff --git a/system/plugins/js_calendar_pi.php b/system/plugins/js_calendar_pi.php
index 6bb3b3629..964d50315 100644
--- a/system/plugins/js_calendar_pi.php
+++ b/system/plugins/js_calendar_pi.php
@@ -1,4 +1,4 @@
-<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
*
@@ -274,7 +274,7 @@ function total_days()
case 1: // Check for leap year
if (( this.date_obj.getFullYear() % 4 == 0
&& this.date_obj.getFullYear() % 100 != 0)
- || this.date_obj.getFullYear() % 400 == 0)
+ OR this.date_obj.getFullYear() % 400 == 0)
return 29;
else
return 28;
@@ -385,9 +385,9 @@ function update_calendar(id, dateValue)
var newMonth = dateParts[1];
var newDay = dateParts[2];
- if (isNaN(newDay) || newDay < 1 || (newDay.length != 1 && newDay.length != 2)) return;
- if (isNaN(newYear) || newYear < 1 || newYear.length != 4) return;
- if (isNaN(newMonth) || newMonth < 1 || (newMonth.length != 1 && newMonth.length != 2)) return;
+ if (isNaN(newDay) OR newDay < 1 OR (newDay.length != 1 && newDay.length != 2)) return;
+ if (isNaN(newYear) OR newYear < 1 OR newYear.length != 4) return;
+ if (isNaN(newMonth) OR newMonth < 1 OR (newMonth.length != 1 && newMonth.length != 2)) return;
if (newMonth > 12) newMonth = 12;
@@ -396,7 +396,7 @@ function update_calendar(id, dateValue)
switch(newMonth - 1)
{
case 1: // Check for leap year
- if ((newYear % 4 == 0 && newYear % 100 != 0) || newYear % 400 == 0)
+ if ((newYear % 4 == 0 && newYear % 100 != 0) OR newYear % 400 == 0)
{
if (newDay > 29) newDay = 29;
}
@@ -541,7 +541,7 @@ function change_month(mo, cal)
switch(newMonth)
{
case 1: // Check for leap year
- if ((newYear % 4 == 0 && newYear % 100 != 0) || newYear % 400 == 0)
+ if ((newYear % 4 == 0 && newYear % 100 != 0) OR newYear % 400 == 0)
{
if (newDate > 29) newDate = 29;
}
@@ -624,6 +624,6 @@ function js_calendar_write($field_id, $time = '', $highlight = TRUE)
</script>';
}
-
-/* End of file js_calendar_pi.php */
+
+/* End of file js_calendar_pi.php */
/* Location: ./system/plugins/js_calendar_pi.php */ \ No newline at end of file