fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [17468] prepare for php 7.2


From: sigurdne
Subject: [Fmsystem-commits] [17468] prepare for php 7.2
Date: Mon, 25 Dec 2017 15:32:22 -0500 (EST)

Revision: 17468
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=17468
Author:   sigurdne
Date:     2017-12-25 15:32:22 -0500 (Mon, 25 Dec 2017)
Log Message:
-----------
prepare for php 7.2

Modified Paths:
--------------
    trunk/activitycalendarfrontend/index.php
    trunk/booking/frontend.php
    trunk/bookingfrontend/index.php
    trunk/eventplannerfrontend/session.php
    trunk/phpgwapi/inc/class.sessions.inc.php
    trunk/phpgwapi/inc/sso/include_login.inc.php
    trunk/registration/main.php

Modified: trunk/activitycalendarfrontend/index.php
===================================================================
--- trunk/activitycalendarfrontend/index.php    2017-12-25 18:41:14 UTC (rev 
17467)
+++ trunk/activitycalendarfrontend/index.php    2017-12-25 20:32:22 UTC (rev 
17468)
@@ -76,17 +76,20 @@
        $GLOBALS['phpgw']->preferences->verify_basic_settings();
 
        /*       * ******* Optional classes, which can be disabled for 
performance increases ******** */
-       while ($phpgw_class_name = each($GLOBALS['phpgw_info']['flags']))
+       if(is_array($GLOBALS['phpgw_info']['flags']))
        {
-               if (preg_match('/enable_/', $phpgw_class_name[0]))
+               foreach ($GLOBALS['phpgw_info']['flags'] as $phpgw_class_name 
=> $dummy)
                {
-                       $enable_class = str_replace('enable_', '', 
$phpgw_class_name[0]);
-                       $enable_class = str_replace('_class', '', 
$enable_class);
-                       $GLOBALS['phpgw']->$enable_class = 
createObject("phpgwapi.{$enable_class}");
+                       if (preg_match('/enable_/', $phpgw_class_name))
+                       {
+                               $enable_class = str_replace('enable_', '', 
$phpgw_class_name);
+                               $enable_class = str_replace('_class', '', 
$enable_class);
+                               $GLOBALS['phpgw']->$enable_class = 
createObject("phpgwapi.{$enable_class}");
+                       }
                }
+               unset($enable_class);
+               reset($GLOBALS['phpgw_info']['flags']);
        }
-       unset($enable_class);
-       reset($GLOBALS['phpgw_info']['flags']);
 
        /*       * 
***********************************************************************\
         * These lines load up the templates class                              
   *

Modified: trunk/booking/frontend.php
===================================================================
--- trunk/booking/frontend.php  2017-12-25 18:41:14 UTC (rev 17467)
+++ trunk/booking/frontend.php  2017-12-25 20:32:22 UTC (rev 17468)
@@ -168,7 +168,8 @@
        if ($GLOBALS['phpgw_info']['server']['show_domain_selectbox'] && 
$last_loginid !== '')
        {
                reset($GLOBALS['phpgw_domain']);
-               list($default_domain) = each($GLOBALS['phpgw_domain']);
+               $_phpgw_domains = array_keys($GLOBALS['phpgw_domain']);
+               $default_domain = $_phpgw_domains[0];
 
                if ($_COOKIE['last_domain'] != $default_domain && 
!empty($_COOKIE['last_domain']))
                {

Modified: trunk/bookingfrontend/index.php
===================================================================
--- trunk/bookingfrontend/index.php     2017-12-25 18:41:14 UTC (rev 17467)
+++ trunk/bookingfrontend/index.php     2017-12-25 20:32:22 UTC (rev 17468)
@@ -106,17 +106,20 @@
        $GLOBALS['phpgw']->preferences->verify_basic_settings();
 
        /*       * ******* Optional classes, which can be disabled for 
performance increases ******** */
-       while ($phpgw_class_name = each($GLOBALS['phpgw_info']['flags']))
+       if(is_array($GLOBALS['phpgw_info']['flags']))
        {
-               if ( preg_match('/enable_/', $phpgw_class_name[0]))
+               foreach ($GLOBALS['phpgw_info']['flags'] as $phpgw_class_name 
=> $dummy)
                {
-                       $enable_class = str_replace('enable_', '', 
$phpgw_class_name[0]);
-                       $enable_class = str_replace('_class', '', 
$enable_class);
-                       $GLOBALS['phpgw']->$enable_class = 
createObject("phpgwapi.{$enable_class}");
+                       if (preg_match('/enable_/', $phpgw_class_name))
+                       {
+                               $enable_class = str_replace('enable_', '', 
$phpgw_class_name);
+                               $enable_class = str_replace('_class', '', 
$enable_class);
+                               $GLOBALS['phpgw']->$enable_class = 
createObject("phpgwapi.{$enable_class}");
+                       }
                }
+               unset($enable_class);
+               reset($GLOBALS['phpgw_info']['flags']);
        }
-       unset($enable_class);
-       reset($GLOBALS['phpgw_info']['flags']);
 
        /*       * 
***********************************************************************\
         * These lines load up the templates class                              
   *

Modified: trunk/eventplannerfrontend/session.php
===================================================================
--- trunk/eventplannerfrontend/session.php      2017-12-25 18:41:14 UTC (rev 
17467)
+++ trunk/eventplannerfrontend/session.php      2017-12-25 20:32:22 UTC (rev 
17468)
@@ -108,17 +108,20 @@
        $GLOBALS['phpgw']->preferences->verify_basic_settings();
 
        /*       * ******* Optional classes, which can be disabled for 
performance increases ******** */
-       while ($phpgw_class_name = each($GLOBALS['phpgw_info']['flags']))
+       if(is_array($GLOBALS['phpgw_info']['flags']))
        {
-               if ( preg_match('/enable_/', $phpgw_class_name[0]))
+               foreach ($GLOBALS['phpgw_info']['flags'] as $phpgw_class_name 
=> $dummy)
                {
-                       $enable_class = str_replace('enable_', '', 
$phpgw_class_name[0]);
-                       $enable_class = str_replace('_class', '', 
$enable_class);
-                       $GLOBALS['phpgw']->$enable_class = 
createObject("phpgwapi.{$enable_class}");
+                       if (preg_match('/enable_/', $phpgw_class_name))
+                       {
+                               $enable_class = str_replace('enable_', '', 
$phpgw_class_name);
+                               $enable_class = str_replace('_class', '', 
$enable_class);
+                               $GLOBALS['phpgw']->$enable_class = 
createObject("phpgwapi.{$enable_class}");
+                       }
                }
+               unset($enable_class);
+               reset($GLOBALS['phpgw_info']['flags']);
        }
-       unset($enable_class);
-       reset($GLOBALS['phpgw_info']['flags']);
 
        /*       * 
***********************************************************************\
         * These lines load up the templates class                              
   *

Modified: trunk/phpgwapi/inc/class.sessions.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.sessions.inc.php   2017-12-25 18:41:14 UTC (rev 
17467)
+++ trunk/phpgwapi/inc/class.sessions.inc.php   2017-12-25 20:32:22 UTC (rev 
17468)
@@ -1087,7 +1087,7 @@
                        if (is_array($this->variableNames))
                        {
                                reset($this->variableNames);
-                               while(list($key, $value) = 
each($this->variableNames))
+                               foreach($this->variableNames as $key => $value)
                                {
                                        if ($value == 'registered')
                                        {

Modified: trunk/phpgwapi/inc/sso/include_login.inc.php
===================================================================
--- trunk/phpgwapi/inc/sso/include_login.inc.php        2017-12-25 18:41:14 UTC 
(rev 17467)
+++ trunk/phpgwapi/inc/sso/include_login.inc.php        2017-12-25 20:32:22 UTC 
(rev 17468)
@@ -362,7 +362,8 @@
                        
if($GLOBALS['phpgw_info']['server']['show_domain_selectbox'] && $last_loginid 
!== '')
                        {
                                reset($GLOBALS['phpgw_domain']);
-                               list($default_domain) = 
each($GLOBALS['phpgw_domain']);
+                               $_phpgw_domains = 
array_keys($GLOBALS['phpgw_domain']);
+                               $default_domain = $_phpgw_domains[0];
 
                                if ($_COOKIE['last_domain'] != $default_domain 
&& !empty($_COOKIE['last_domain']) && 
!$GLOBALS['phpgw_info']['server']['show_domain_selectbox'])
                                {

Modified: trunk/registration/main.php
===================================================================
--- trunk/registration/main.php 2017-12-25 18:41:14 UTC (rev 17467)
+++ trunk/registration/main.php 2017-12-25 20:32:22 UTC (rev 17468)
@@ -151,17 +151,20 @@
        $GLOBALS['phpgw']->preferences->verify_basic_settings();
 
        /*       * ******* Optional classes, which can be disabled for 
performance increases ******** */
-       while ($phpgw_class_name = each($GLOBALS['phpgw_info']['flags']))
+       if(is_array($GLOBALS['phpgw_info']['flags']))
        {
-               if (preg_match('/enable_/', $phpgw_class_name[0]))
+               foreach ($GLOBALS['phpgw_info']['flags'] as $phpgw_class_name 
=> $dummy)
                {
-                       $enable_class = str_replace('enable_', '', 
$phpgw_class_name[0]);
-                       $enable_class = str_replace('_class', '', 
$enable_class);
-                       $GLOBALS['phpgw']->$enable_class = 
createObject("phpgwapi.{$enable_class}");
+                       if (preg_match('/enable_/', $phpgw_class_name))
+                       {
+                               $enable_class = str_replace('enable_', '', 
$phpgw_class_name);
+                               $enable_class = str_replace('_class', '', 
$enable_class);
+                               $GLOBALS['phpgw']->$enable_class = 
createObject("phpgwapi.{$enable_class}");
+                       }
                }
+               unset($enable_class);
+               reset($GLOBALS['phpgw_info']['flags']);
        }
-       unset($enable_class);
-       reset($GLOBALS['phpgw_info']['flags']);
 
        /*       * 
***********************************************************************\
         * These lines load up the templates class                              
   *




reply via email to

[Prev in Thread] Current Thread [Next in Thread]