Skip to content

Instantly share code, notes, and snippets.

@franz-isx
franz-isx / ldap_v3.patch
Created June 11, 2012 11:22
TeamCal LDAP v3 login bugfix
Index: includes/tclogin.class.php
===================================================================
--- includes/tclogin.class.php (Revision 129)
+++ includes/tclogin.class.php (Arbeitskopie)
@@ -258,9 +258,8 @@
if (!$uidpass) { return 91; } // Force Fail on NULL password
$ds=ldap_connect($host,$port); // Is always a ressource even if no connection possible (patch by Franz Gregor)
- if (!@ldap_bind($ds)) return 93; // Test anonymous bind => Unable to connect to LDAP server (patch by Franz Gregor)
-
@franz-isx
franz-isx / holiday_import_updated.patch
Created May 15, 2012 14:54
iCal Holiday import for TeamCal for non whole day events
Index: holidays.php
===================================================================
--- holidays.php (Revision 117)
+++ holidays.php (Arbeitskopie)
@@ -193,16 +193,26 @@
# get all events of the ical file
preg_match_all("#(?sU)BEGIN:VEVENT.*END:VEVENT#", file_get_contents($_FILES['ical_file']['tmp_name']), $events);
foreach($events[0] as $event){
- preg_match("#(?sU)DTSTART;.*DATE:([0-9]{8})#", $event, $start);
- preg_match("#(?sU)DTEND;.*DATE:([0-9]{8})#", $event, $end);
@franz-isx
franz-isx / custom_popup_escape.patch
Created May 15, 2012 13:00
TeamCal custom popup escape
Index: includes/showmonth.function.php
===================================================================
--- includes/showmonth.function.php (Revision 112)
+++ includes/showmonth.function.php (Arbeitskopie)
@@ -669,13 +669,13 @@
if (!strlen($U->customPopup))
$monthBody .= "<td class=\"name-button\">\n\r";
else
- $monthBody .= "<td class=\"name-button-note\" onmouseover=\"return overlib('".addslashes($U->customPopup)."', ".$CONF['ovl_tt_settings'].");\" onmouseout=\"return nd();\">\n\r";
+ $monthBody .= "<td class=\"name-button-note\" onmouseover=\"return overlib('".htmlentities($U->customPopup, ENT_QUOTES)."', ".$CONF['ovl_tt_settings'].");\" onmouseout=\"return nd();\">\n\r";
Index: includes/db.class.php
===================================================================
--- includes/db.class.php (Revision 109)
+++ includes/db.class.php (Revision 112)
@@ -29,8 +29,9 @@
var $db_user = '';
var $db_pass = '';
var $db_persistent = '';
- var $db_handle = '';
+ static $db_handle = '';
Index: error.php
===================================================================
--- error.php (Revision 108)
+++ error.php (Revision 109)
@@ -20,7 +20,7 @@
/**
* Includes
*/
-require ("config.tcpro.php");
+require_once ("config.tcpro.php");
@franz-isx
franz-isx / range_absence.patch
Created May 7, 2012 13:26
Teamcal absence range input
Nur in tcpro_33009_patched: config.tcpro.php.
Gemeinsame Unterverzeichnisse: tcpro_33009/doc und tcpro_33009_patched/doc.
diff -u tcpro_33009/editcalendar.php tcpro_33009_patched/editcalendar.php
--- tcpro_33009/editcalendar.php 2012-05-07 14:18:10.594378017 +0200
+++ tcpro_33009_patched/editcalendar.php 2012-05-07 14:33:52.641503630 +0200
@@ -193,7 +193,7 @@
$LOG->log("logUser",$L->checkLogin(),"User default template created: ".$T->year.$T->month);
}
- if (isset($_POST['btn_apply'])) {
@franz-isx
franz-isx / daynote.patch
Created April 30, 2012 12:08
Teamcal daynote patch
Index: /trunk/includes/tcdaynote.class.php
===================================================================
--- /trunk/includes/tcdaynote.class.php (revision 32)
+++ /trunk/includes/tcdaynote.class.php (revision 107)
Index: /trunk/includes/showmonth.function.php
===================================================================
--- /trunk/includes/showmonth.function.php (revision 78)
+++ /trunk/includes/showmonth.function.php (revision 107)
@@ -371,9 +371,9 @@
for ($i=1; $i<=$nofdays; $i=$i+1) {
@franz-isx
franz-isx / encoding_marz.patch
Created April 16, 2012 14:56
Encoding of language file & Marz to März
Index: includes/lang/english.tcpro.php
===================================================================
--- includes/lang/english.tcpro.php (Revision 100)
+++ includes/lang/english.tcpro.php (Arbeitskopie)
@@ -726,7 +726,7 @@
$LANG['err_input_daynote_username'] = 'Username: ';
$LANG['err_input_daynote_save'] = 'You can\'t save an empty note.\\nPlease submit some text in the daynote field\\nor use the [Delete] button if you want to delete this daynote.';
$LANG['err_input_daynote_create'] = 'You can\'t create an empty daynote.\\nPlease submit some text in the daynote field.\\n';
-$LANG['err_input_declbefore'] = 'You need to select a date in the ᅵDeclination Managementᅵ dialog.';
+$LANG['err_input_declbefore'] = 'You need to select a date in the "Declination Management" dialog.';
@franz-isx
franz-isx / ical.patch
Created April 16, 2012 12:46
iCal Holiday import for TeamCal
Index: holidays.php
===================================================================
--- holidays.php (Revision 88)
+++ holidays.php (Arbeitskopie)
@@ -180,6 +180,71 @@
*/
$LOG->log("logHoliday",$L->checkLogin(),"Holiday deleted: ".$delname);
sendNotification("holidaydelete",$delname,"");
+} else if ( isset($_POST['btn_hol_ical_import']) ) {
+/**