Completed
Branch master (c3ca5f)
by Seth
04:51
created
phpicalendar/print.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
 	'getdate'			=> $getdate,
65 65
 	'calendar_name'		=> $cal_displayname,
66 66
 	'current_view'		=> $current_view,
67
-    'printview'         => $printview,
67
+	'printview'         => $printview,
68 68
 	'display_date'		=> $display_date,
69 69
 	'sidebar_date'		=> @$sidebar_date,
70 70
 	'rss_powered'	 	=> $rss_powered,
Please login to merge, or discard this patch.
phpicalendar/functions/init/sanitize.php 1 patch
Indentation   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -14,22 +14,22 @@  discard block
 block discarded – undo
14 14
  * @return mixed
15 15
  */
16 16
 function recursiveSanitize($value) {
17
-    if (is_array($value)) {
18
-        $valmod = array();
19
-        foreach ($value as $key => $subval) {
20
-            if (is_array($subval)) {
21
-                $subval = recursiveSanitize($subval);
22
-            } else {
23
-                $subval = strip_tags($subval);
24
-            }
25
-            $valmod[$key] = $subval;
26
-        }
27
-        $value = $valmod;
28
-    } else {
29
-        $value = strip_tags($value);
30
-    }
17
+	if (is_array($value)) {
18
+		$valmod = array();
19
+		foreach ($value as $key => $subval) {
20
+			if (is_array($subval)) {
21
+				$subval = recursiveSanitize($subval);
22
+			} else {
23
+				$subval = strip_tags($subval);
24
+			}
25
+			$valmod[$key] = $subval;
26
+		}
27
+		$value = $valmod;
28
+	} else {
29
+		$value = strip_tags($value);
30
+	}
31 31
     
32
-    return $value;
32
+	return $value;
33 33
 }
34 34
 
35 35
 
@@ -37,34 +37,34 @@  discard block
 block discarded – undo
37 37
  * Truncate a string to a specific number of words
38 38
  */
39 39
 function chopToWordCount($string, $count) {
40
-    $wc = str_word_count($string);
41
-    if ($wc > $count) {
40
+	$wc = str_word_count($string);
41
+	if ($wc > $count) {
42 42
 	$words = str_word_count($string, 2);
43 43
 	$last_word = array_slice($words, $count, 1, true);
44 44
 	$pos = key($last_word);
45 45
 	$string = substr($string, 0, $pos) . '...';
46
-    }
47
-    return $string;
46
+	}
47
+	return $string;
48 48
 }
49 49
 
50 50
 /**
51 51
  * Strip "dangerous" HTML to make it safe to print to web browsers
52 52
  */
53 53
 function sanitizeForWeb($string) {
54
-    $string = preg_replace('/<br\s*\/?>/', "\n", $string);
54
+	$string = preg_replace('/<br\s*\/?>/', "\n", $string);
55 55
 
56
-    $string = str_replace('&#36;', '$', $string);
57
-    $string = str_replace('&', '&amp;', $string);
58
-    $string = str_replace('<', '&lt;', $string);
59
-    $string = str_replace('>', '&gt;', $string);
60
-    $string = str_replace('\'', '&#39;', $string);
61
-    $string = str_replace('"', '&#34;', $string);
62
-    $string = str_replace('$', '&#36;', $string);
56
+	$string = str_replace('&#36;', '$', $string);
57
+	$string = str_replace('&', '&amp;', $string);
58
+	$string = str_replace('<', '&lt;', $string);
59
+	$string = str_replace('>', '&gt;', $string);
60
+	$string = str_replace('\'', '&#39;', $string);
61
+	$string = str_replace('"', '&#34;', $string);
62
+	$string = str_replace('$', '&#36;', $string);
63 63
 
64
-    $string = str_replace("\n", '<br />', $string);
65
-    $string = str_replace("\t", ' &nbsp; &nbsp; ', $string);
64
+	$string = str_replace("\n", '<br />', $string);
65
+	$string = str_replace("\t", ' &nbsp; &nbsp; ', $string);
66 66
 
67
-    return $string;
67
+	return $string;
68 68
 }
69 69
 
70 70
 
Please login to merge, or discard this patch.
phpicalendar/functions/init/date_range.php 1 patch
Switch Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -27,27 +27,27 @@
 block discarded – undo
27 27
 	$end_year++;
28 28
 }
29 29
 switch ($current_view){
30
-	case 'month':
31
-	case 'week':
32
-	case 'day':
33
-	case 'print':
34
-		$mArray_begin = mktime (0,0,0,$start_month,1,($start_year));
35
-		$mArray_end = mktime (0,0,0,$end_month,31,($end_year));
36
-		break;
37
-	case 'admin':
38
-	case 'error':
39
-	case 'preferences':
40
-	case 'rss_index':
41
-		$mArray_begin = time();
42
-		$mArray_end = time();
43
-		break;		
44
-	case 'search':
45
-		$mArray_begin = mktime (0,0,0,1,1,1970);
46
-		$mArray_end = mktime (0,0,0,1,31,2030);
47
-		break;		
48
-	default:
49
-		$mArray_begin = mktime (0,0,0,12,21,($this_year - 1));
50
-		$mArray_end = mktime (0,0,0,1,31,($this_year + 1));
30
+		case 'month':
31
+		case 'week':
32
+		case 'day':
33
+		case 'print':
34
+			$mArray_begin = mktime (0,0,0,$start_month,1,($start_year));
35
+			$mArray_end = mktime (0,0,0,$end_month,31,($end_year));
36
+			break;
37
+		case 'admin':
38
+		case 'error':
39
+		case 'preferences':
40
+		case 'rss_index':
41
+			$mArray_begin = time();
42
+			$mArray_end = time();
43
+			break;		
44
+		case 'search':
45
+			$mArray_begin = mktime (0,0,0,1,1,1970);
46
+			$mArray_end = mktime (0,0,0,1,31,2030);
47
+			break;		
48
+		default:
49
+			$mArray_begin = mktime (0,0,0,12,21,($this_year - 1));
50
+			$mArray_end = mktime (0,0,0,1,31,($this_year + 1));
51 51
 }
52 52
 if ($phpiCal_config->save_parsed_cals == 'yes') {	
53 53
 	$mArray_begin = mktime (0,0,0,12,21,($this_year - 1));
Please login to merge, or discard this patch.
phpicalendar/functions/ical_parser.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -458,9 +458,9 @@
 block discarded – undo
458 458
 
459 459
 							$attendee[] = array ('name'     => stripslashes($name),
460 460
 												 'email'    => stripslashes($email),
461
-									        	 'RSVP'     => stripslashes($rsvp),
462
-									        	 'PARTSTAT' => stripslashes($partstat),
463
-								         		 'ROLE'     => stripslashes($role)
461
+												 'RSVP'     => stripslashes($rsvp),
462
+												 'PARTSTAT' => stripslashes($partstat),
463
+										 		 'ROLE'     => stripslashes($role)
464 464
 												);
465 465
 							break;
466 466
 						case 'ORGANIZER':
Please login to merge, or discard this patch.
phpicalendar/functions/admin_functions.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -222,15 +222,15 @@
 block discarded – undo
222 222
 // arg0: string filename
223 223
 // returns boolean is the uploaded a file
224 224
 function is_uploaded_file_v4 ($filename) {
225
-    if (!$tmp_file = get_cfg_var('upload_tmp_dir')) {
226
-        $tmp_file = dirname(tempnam('', ''));
227
-    }
228
-    $tmp_file .= '/' . basename($filename);
229
-    // For Windows compat
230
-    $filename = str_replace ("\\", "/", $filename);
231
-    $tmp_file = str_replace ("\\", "/", $tmp_file);
232
-    // User might have trailing slash in php.ini... 
233
-    return (ereg_replace('/+', '/', $tmp_file) == $filename);
225
+	if (!$tmp_file = get_cfg_var('upload_tmp_dir')) {
226
+		$tmp_file = dirname(tempnam('', ''));
227
+	}
228
+	$tmp_file .= '/' . basename($filename);
229
+	// For Windows compat
230
+	$filename = str_replace ("\\", "/", $filename);
231
+	$tmp_file = str_replace ("\\", "/", $tmp_file);
232
+	// User might have trailing slash in php.ini... 
233
+	return (ereg_replace('/+', '/', $tmp_file) == $filename);
234 234
 }
235 235
 
236 236
 // return the appropriate error message if the file upload had an error
Please login to merge, or discard this patch.
phpicalendar/search.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -49,9 +49,9 @@  discard block
 block discarded – undo
49 49
 						foreach ($time_tmp as $uid_tmp => $event_tmp) {
50 50
 							if (is_array($event_tmp)) {
51 51
 								if (!isset($the_arr[$uid_tmp]) || isset($event_tmp['exception'])) {
52
-                                                                        #print_r($format_search_arr);
53
-                                                                        #print_r($event_tmp);
54
-                                                                        #echo "<br>this event:".$event_tmp['event_text']."<br>";
52
+																		#print_r($format_search_arr);
53
+																		#print_r($event_tmp);
54
+																		#echo "<br>this event:".$event_tmp['event_text']."<br>";
55 55
 									$results1 = false;
56 56
 									$results2 = false;
57 57
 									if (isset($event_tmp['event_text'])) {
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
 		if ($is_false) return false;
217 217
 	}
218 218
 	// if we haven't returned false, then we return true
219
-       # echo "return true<br>";
219
+	   # echo "return true<br>";
220 220
 	return true;
221 221
 }
222 222
 
Please login to merge, or discard this patch.
phpicalendar/day.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,8 +57,8 @@
 block discarded – undo
57 57
 	'header'			=> BASE.'templates/'.$phpiCal_config->template.'/header.tpl',
58 58
 	'event_js'			=> BASE.'functions/event.js',
59 59
 	'footer'			=> BASE.'templates/'.$phpiCal_config->template.'/footer.tpl',
60
-    'sidebar'           => BASE.'templates/'.$phpiCal_config->template.'/sidebar.tpl',
61
-    'search_box'        => BASE.'templates/'.$phpiCal_config->template.'/search_box.tpl'
60
+	'sidebar'           => BASE.'templates/'.$phpiCal_config->template.'/sidebar.tpl',
61
+	'search_box'        => BASE.'templates/'.$phpiCal_config->template.'/search_box.tpl'
62 62
 	));
63 63
 
64 64
 $page->replace_tags(array(
Please login to merge, or discard this patch.
phpicalendar/config.inc.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -25,19 +25,19 @@  discard block
 block discarded – undo
25 25
 
26 26
 The salt parameter is used to obfuscate things like webcal links that may have usernames and passwords.  This should be changed.
27 27
 */
28
-     'calendar_path'        => '/var/www-data/canvas/ics-sync',
28
+	 'calendar_path'        => '/var/www-data/canvas/ics-sync',
29 29
 #     'default_path'         => '', 	
30 30
 #     'save_parsed_cals'     => 'yes', 
31 31
 #     'cookie_uri'           => '', 
32 32
 #     'download_uri'         => '', 	
33
-     'allow_webcals'          => 'yes',
33
+	 'allow_webcals'          => 'yes',
34 34
 #     'recursive_path'          => 'yes',
35
-     'salt'                => 'AjeoRZ9rC5pDzV6xk9nD',
35
+	 'salt'                => 'AjeoRZ9rC5pDzV6xk9nD',
36 36
 
37 37
 /*     ** Timezones **
38 38
 If timezone is not set, all events show in the local time of the source calendar.  This isn't a problem if all your calendars are in the same timezone.  If you set a timezone for the server, events in other timezones are shown when they occur at the server's time.
39 39
 */
40
-     'timezone'             => 'US/Eastern',
40
+	 'timezone'             => 'US/Eastern',
41 41
 #     'second_offset'        => $secs,
42 42
 
43 43
 /*     ** Appearance **      
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 #     'language'             => 'English',
52 52
 #     'default_cal'          => 'US Holidays',	   // Exact filename of calendar without .ics.
53 53
 #     'template'             => 'green',           // Template support: change this to have a different "skin" for your installation.     
54
-    'default_view'         => 'year',           // Default view for calendars'     => 'day', 'week', 'month', 'year'
54
+	'default_view'         => 'year',           // Default view for calendars'     => 'day', 'week', 'month', 'year'
55 55
 #      'printview_default'    => 'yes',	           // Set print view as the default view. Uses'default_view (listed above).
56 56
 #     'gridLength'           => 10,                // Grid size in day and week views. Allowed values are 1,2,3,4,10,12,15,20,30,60. Default is 15
57 57
 #     'minical_view'         => 'current',	       // Where do the mini-calendars go when clicked?'     => 'day', 'week', 'month', 'current'
Please login to merge, or discard this patch.
phpicalendar/preferences.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,8 +58,8 @@
 block discarded – undo
58 58
 			include(BASE.'languages/'.strtolower($_POST['cookie_language']).'.inc.php');
59 59
 	}
60 60
 	$_COOKIE[$cookie_name] = $the_cookie;
61
-    $cpath = $cookie_cpath;
62
-    $cal = $cookie_calendar;
61
+	$cpath = $cookie_cpath;
62
+	$cal = $cookie_calendar;
63 63
 }
64 64
 
65 65
 if (isset($_COOKIE[$cookie_name])) {
Please login to merge, or discard this patch.