Author: benj
Date: Tue May 24 12:07:05 2016
New Revision: 1684
URL: http://svn.gna.org/viewcvs/gdtc?rev=1684&view=rev
Log:
Changes needed to work in a Debian stable environement
Modified:
trunk/gdtc/include/auth.php
trunk/gdtc/include/coherence.php
trunk/gdtc/include/countries.php
trunk/gdtc/include/errors.php
trunk/gdtc/include/prenoms.php
trunk/gdtc/include/utils.php
trunk/gdtc/templates/smarty/admin/header.tpl
Modified: trunk/gdtc/include/auth.php
URL:
http://svn.gna.org/viewcvs/gdtc/trunk/gdtc/include/auth.php?rev=1684&r1=1683&r2=1684&view=diff
==============================================================================
--- trunk/gdtc/include/auth.php (original)
+++ trunk/gdtc/include/auth.php Tue May 24 12:07:05 2016
@@ -79,7 +79,6 @@
$additional [ 'message' ] [ 'warning' ] = "La page n'est pas
accessible aux utilisateurs non enregistrés.";
$additional [ 'do_redirect' ] = $_SERVER [ 'REDIRECT_URL' ];
$smarty -> assign ( 'additional', $additional );
-
$smarty -> display ( 'login.tpl' );
return;
}
Modified: trunk/gdtc/include/coherence.php
URL:
http://svn.gna.org/viewcvs/gdtc/trunk/gdtc/include/coherence.php?rev=1684&r1=1683&r2=1684&view=diff
==============================================================================
--- trunk/gdtc/include/coherence.php (original)
+++ trunk/gdtc/include/coherence.php Tue May 24 12:07:05 2016
@@ -1,4 +1,5 @@
-<?
+<?php
+
/* **************************************************************************
*/
/*
*/
/* Copyright (C) 2010 Benjamin Drieu ([email protected]) */
Modified: trunk/gdtc/include/countries.php
URL:
http://svn.gna.org/viewcvs/gdtc/trunk/gdtc/include/countries.php?rev=1684&r1=1683&r2=1684&view=diff
==============================================================================
--- trunk/gdtc/include/countries.php (original)
+++ trunk/gdtc/include/countries.php Tue May 24 12:07:05 2016
@@ -1,4 +1,5 @@
-<?
+<?php
+
$country_codes = Array
(
'FRA' => 'France',
Modified: trunk/gdtc/include/errors.php
URL:
http://svn.gna.org/viewcvs/gdtc/trunk/gdtc/include/errors.php?rev=1684&r1=1683&r2=1684&view=diff
==============================================================================
--- trunk/gdtc/include/errors.php (original)
+++ trunk/gdtc/include/errors.php Tue May 24 12:07:05 2016
@@ -1,4 +1,4 @@
-<?
+<?php
// error handler function
function myErrorHandler($errno, $errstr, $errfile, $errline, $backtrace = TRUE)
@@ -82,8 +82,9 @@
case E_USER_NOTICE:
case E_NOTICE:
- if ( $_SESSION [ 'is_admin' ] &&
- ! preg_match ( '/adherents/', DTC_MY_BASE_URL ) )
+ if ( array_key_exists ('is_admin', $_SESSION ) &&
+ ! preg_match ( '/adherents/', DTC_MY_BASE_URL ) &&
+ preg_match ( '/-dev/', DTC_BASE_URL ) )
{
echo "<p class=\"dev-error\"><b>NOTICE</b> [$errno] $errstr line
<b>$errline</b> in file <b>$errfile</b></p>\n";
}
@@ -161,4 +162,4 @@
set_error_handler("myErrorHandler");
//register_shutdown_function( "fatal_handler" );
-?>
+?>
Modified: trunk/gdtc/include/prenoms.php
URL:
http://svn.gna.org/viewcvs/gdtc/trunk/gdtc/include/prenoms.php?rev=1684&r1=1683&r2=1684&view=diff
==============================================================================
--- trunk/gdtc/include/prenoms.php (original)
+++ trunk/gdtc/include/prenoms.php Tue May 24 12:07:05 2016
@@ -1,4 +1,5 @@
-<?
+<?php
+
$firstnames = Array (
"aaron",
"abel",
Modified: trunk/gdtc/include/utils.php
URL:
http://svn.gna.org/viewcvs/gdtc/trunk/gdtc/include/utils.php?rev=1684&r1=1683&r2=1684&view=diff
==============================================================================
--- trunk/gdtc/include/utils.php (original)
+++ trunk/gdtc/include/utils.php Tue May 24 12:07:05 2016
@@ -84,12 +84,7 @@
function init_smarty ( $app = '' )
{
- if ( ! class_exists ( 'Smarty' ) )
- {
- return FALSE;
- }
-
- $smarty = new Smarty;
+ $smarty = new Smarty();
$smarty -> template_dir = TEMPLATE_DIR;
$smarty -> compile_dir = COMPILE_DIR;
@@ -149,8 +144,8 @@
$smarty -> assign ( 'today', strftime ( '%Y-%m-%d' ) );
- $smarty -> register_modifier ( 'ucfirst', 'smarty_modifier_ucfirst' );
- $smarty -> register_modifier ( 'my_capitalize',
'smarty_modifier_my_capitalize' );
+ $smarty -> registerPlugin ( 'function', 'ucfirst', 'smarty_modifier_ucfirst'
);
+ $smarty -> registerPlugin ( 'function', 'my_capitalize',
'smarty_modifier_my_capitalize' );
return $smarty;
}
@@ -826,7 +821,7 @@
*/
function my_id ( )
{
- if ( ! $_SESSION [ 'login' ] )
+ if ( ! array_key_exists ( 'login', $_SESSION ) )
return Array();
$me = simple_unique_query ( sprintf ( "select actor_id from actor where
nickname = '%s';",
Modified: trunk/gdtc/templates/smarty/admin/header.tpl
URL:
http://svn.gna.org/viewcvs/gdtc/trunk/gdtc/templates/smarty/admin/header.tpl?rev=1684&r1=1683&r2=1684&view=diff
==============================================================================
--- trunk/gdtc/templates/smarty/admin/header.tpl (original)
+++ trunk/gdtc/templates/smarty/admin/header.tpl Tue May 24 12:07:05 2016
@@ -83,7 +83,7 @@
<h1>{$title}</h1>
-{if $development_version}
+{if isset($development_version)}
<img width="64" height="64" src="{$dtc_admin_host_name}/dtcimages/beta.png"
align="right">
{/if}
_______________________________________________
Gdtc-commits mailing list
[email protected]
https://mail.gna.org/listinfo/gdtc-commits