Author: Gunnar Wolf <gwolf@debian.org>
Last-update: 2012-03-13
Forwarded: http://collabtive.o-dyn.de/forum/viewtopic.php?f=10&t=7133
Description: Changes needed for Smarty 3.x compatibility
 The Debian package providing Smarty 2.x has just been dropped, in
 favor of the updated 3.x series. This version is much stricter. This
 patch implements the needed changes for it to be used. Note that
 Collabtive's sources still ship with Smarty 2.x included - Our binary
 package disables it.

Index: collabtive/include/initfunctions.php
===================================================================
--- collabtive.orig/include/initfunctions.php	2012-03-13 11:24:38.000000000 -0600
+++ collabtive/include/initfunctions.php	2012-03-13 11:24:39.000000000 -0600
@@ -14,6 +14,8 @@
     }
 }
 
+spl_autoload_register('__autoload');
+
 function chkproject($user, $project)
 {
 	$user = (int) $user;
Index: collabtive/templates/standard/header.tpl
===================================================================
--- collabtive.orig/templates/standard/header.tpl	2012-03-13 11:23:45.000000000 -0600
+++ collabtive/templates/standard/header.tpl	2012-03-13 11:24:39.000000000 -0600
@@ -1,4 +1,4 @@
-{config_load file=lng.conf section = "strings" scope="global" }
+{config_load file='lng.conf' section = "strings" scope="global" }
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
Index: collabtive/templates/winter/header.tpl
===================================================================
--- collabtive.orig/templates/winter/header.tpl	2012-03-13 11:23:45.000000000 -0600
+++ collabtive/templates/winter/header.tpl	2012-03-13 11:24:39.000000000 -0600
@@ -1,4 +1,4 @@
-{config_load file=lng.conf section = "strings" scope="global" }
+{config_load file='lng.conf' section = "strings" scope="global" }
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
Index: collabtive/language/en/lng.conf
===================================================================
--- collabtive.orig/language/en/lng.conf	2012-03-13 11:23:45.000000000 -0600
+++ collabtive/language/en/lng.conf	2012-03-13 11:24:39.000000000 -0600
@@ -59,7 +59,7 @@
 welcomeback = Welcome back
 zip = Postcode
 
-{* Project *}
+# Project
 
 access = Access
 addproject = Add project
@@ -86,7 +86,7 @@
 report = Report
 start = Start
 
-{* Task / Tasklist *}
+# Task / Tasklist
 
 addtask = Add task
 addtasklist = Add tasklist
@@ -123,7 +123,7 @@
 text = Text
 todaytasks = Tasks for today
 
-{* Milestone *}
+# Milestone
 
 addmilestone = Add milestone
 donemilestones = Done milestones
@@ -141,7 +141,7 @@
 newmilestones = New milestones
 todaystones = Today's milestones
 
-{* Messages *}
+# Messages
 
 addmessage = Add message
 answer = Answer
@@ -161,7 +161,7 @@
 replywasedited = Reply was edited
 title = Title
 
-{* eMails *}
+# eMails
 
 hello = Hello
 mailfrommail = Sender e-mail
@@ -181,7 +181,7 @@
 taskassignedsubject = Collabtive notification – Task assigned
 taskassignedtext = a new task has been assigned to you:
 
-{* Files *}
+# Files
 
 addfile = Add file
 addfiles = Add files
@@ -210,7 +210,7 @@
 rootdir = Root directory
 visibility = Visible for
 
-{* Search *}
+# Search
 
 advancedsearch = Advanced search
 didyoumean = Did you mean
@@ -225,7 +225,7 @@
 searching = Searching...
 searchitem = Search item
 
-{* Languages *}
+# Languages
 
 al = Albanian
 ar = Arabic
@@ -262,7 +262,7 @@
 uk = Ukranian
 zh = Chinese
 
-{* Calendar *}
+# Calendar
 
 calendar = Calendar
 dateformat = Date format
@@ -289,7 +289,7 @@
 november = November
 december = December
 
-{* Errors *}
+# Errors
 
 accessdenied = Access denied
 confirmdel = Really delete this item?\nDeleting cannot be undone.
@@ -301,7 +301,7 @@
 wrongfields = Please enter valid values for:\n\n
 wrongselect = Please select a valid value in \"%FIELDNAME%\".
 
-{* Installation *}
+# Installation
 
 createadmin = Create the first user. This user will be the administrator and cannot be deleted.
 clickcontinue = Click "continue" to pursue the installation.
@@ -327,7 +327,7 @@
 phpversion = You need at least PHP version 5.1 to run Collabtive.
 proceedtologin = Proceed to the login page.
 
-{* Timetracker *}
+# Timetracker
 
 comment = Comment
 edittimetracker = Edit timetracker entry
@@ -346,7 +346,7 @@
 timetracker = Timetracker
 timetrackeradded = Time was added
 
-{* Roles / Permissions *}
+# Roles / Permissions
 
 add = Add
 addrole = Add role
@@ -362,7 +362,7 @@
 roleedited = Role was edited
 roles = Roles
 
-{* Miscellaneous *}
+# Miscellaneous
 
 active = Active
 activity = Activity
@@ -424,4 +424,4 @@
 was = was
 were = were
 yes = Yes
-zipexport = ZIP
\ No newline at end of file
+zipexport = ZIP
Index: collabtive/language/lt/lng.conf
===================================================================
--- collabtive.orig/language/lt/lng.conf	2012-03-13 11:23:45.000000000 -0600
+++ collabtive/language/lt/lng.conf	2012-03-13 11:24:39.000000000 -0600
@@ -1,4 +1,4 @@
-{* Credits: Arūnas Simonaitis - arunas@simonaitis.lt *}
+# Credits: Arūnas Simonaitis - arunas@simonaitis.lt
 
 address = Adresas
 adduser = Pridėti vartotoją
@@ -55,7 +55,7 @@
 welcomeback = Sveiki sugrįžę
 zip = Pašto kodas
 
-{* Project *}
+# Project
 
 access = Prieiga
 addproject = Pridėto projektą
@@ -82,7 +82,7 @@
 report = Ataskaita
 start = Pradėta
 
-{* Task / Tasklist *}
+# Task / Tasklist
 
 addtask = Pridėti užduotį
 addtasklist = Pridėti užduočių sąrašą
@@ -119,7 +119,7 @@
 text = Tekstas
 todaytasks = Šiandienos užduotys
 
-{* Milestone *}
+# Milestone
 
 addmilestone = Pridėti etapą
 donemilestones = Įvykdyti etapai
@@ -137,7 +137,7 @@
 newmilestones = Nauji etapai
 todaystones = Šiandienos etapai
 
-{* Messages *}
+# Messages
 
 addmessage = Pridėti žinutę
 answer = Atsakyti
@@ -157,7 +157,7 @@
 replywasedited = Atsakymas buvo paredaguotas
 title = Pavadinimas
 
-{* eMails *}
+# eMails
 
 mailfrommail = Siuntėjo el. paštas
 mailfromname = Siuntėjas
@@ -175,7 +175,7 @@
 taskassignedsubject = Pranešimas – Užduoties priskyrimas
 taskassignedtext = Jums buvo priskirta nauja užduotis:
 
-{* Files *}
+# Files
 
 addfile = Pridėti bylą
 addfiles = Pridėti bylas
@@ -204,7 +204,7 @@
 rootdir = Pagrindinė direktorija
 visibility = Gali matyti
 
-{* Search *}
+# Search
 
 advancedsearch = Išplėstinė paieška
 didyoumean = Gal ieškojote
@@ -219,7 +219,7 @@
 searching = Ieškoma...
 searchitem = Paieškos punktai
 
-{* Languages *}
+# Languages
 
 al = Albanų
 ar = Arabų
@@ -254,7 +254,7 @@
 uk = Ukrainų
 zh = Kinų
 
-{* Calendar *}
+# Calendar
 
 calendar = Kalendorius
 dateformat = Datos formatas
@@ -281,7 +281,7 @@
 november = Lapkritis
 december = Gruodis
 
-{* Errors *}
+# Errors
 
 accessdenied = Prieiga uždrausta
 confirmdel = Tikrai norite ištrinti?\nVeiksmas negalės būti atšauktas.
@@ -293,7 +293,7 @@
 wrongfields = Prašome įvesti teisingas reikšmes:\n\n
 wrongselect = Pasirinkite teisingą reikšmę: \"%FIELDNAME%\".
 
-{* Installation *}
+# Installation
 
 createadmin = Sukurkite pirmą vartotoją. Šis vartotojas bus administratorius ir negalės būti pašalintas.
 clickcontinue = Paspauskite "Tęsti" norėdami įdiegti programą.
@@ -319,7 +319,7 @@
 mb_string_enabled = mb_string plėtinys įjungtas
 enable_mb_string = Įjunkite mb_string plėtinį
 
-{* Timetracker *}
+# Timetracker
 
 comment = Komentaras
 edittimetracker = Redaguoti laikos stebėjimo įrašą
@@ -338,7 +338,7 @@
 timetracker = Laiko stebėjimas
 timetrackeradded = Laikas pridėtas
 
-{* Roles / Permissions *}
+# Roles / Permissions
 
 add = Pridėti
 addrole = Pridėti rolę
@@ -354,7 +354,7 @@
 roleedited = Rolė buvo paredaguota
 roles = Rolės
 
-{* Miscellaneous *}
+# Miscellaneous
 
 active = Aktyvus
 activity = Aktyvumas
@@ -415,4 +415,4 @@
 was = buvo
 were = buvo
 yes = Taip
-zipexport = ZIP
\ No newline at end of file
+zipexport = ZIP
Index: collabtive/init.php
===================================================================
--- collabtive.orig/init.php	2012-03-13 11:24:34.000000000 -0600
+++ collabtive/init.php	2012-03-13 11:24:46.000000000 -0600
@@ -1,4 +1,10 @@
 <?php
+// Add some paths and requires needed for an installation with a
+// systemwide Smarty3 setup (i.e. as distributed in Debian)
+set_include_path(get_include_path() . PATH_SEPARATOR . '/usr/share/collabtive/www/include');
+set_include_path(get_include_path() . PATH_SEPARATOR . "/usr/share/php/smarty3");
+require "Smarty.class.php";
+
 ini_set("arg_separator.output", "&amp;");
 ini_set('default_charset', 'utf-8');
 // Start output buffering with gzip compression and start the session
