Changeset 336 for trunk/install/includes


Ignore:
Timestamp:
Sep 23, 2020, 11:32:27 AM (4 years ago)
Author:
roby
Message:

Admin: prime modifiche per compatibilità con php 7.4

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/install/includes/database.php

    r2 r336  
    1 <?php
     1 <?php
    22
    33/************************************************************************/
     
    5353        * @param boolean If true and there is an error, go offline
    5454        */
    55         function database( $host='localhost', $user, $pass, $db='', $table_prefix='', $goOffline=true ) {
     55        function __construct( $host='localhost', $user, $pass, $db='', $table_prefix='', $goOffline=true ) {
    5656                // perform a number of fatality checks, then die gracefully
    5757                if (!function_exists( 'mysql_connect' )) {
     
    141141                        return $q . $s . $q;
    142142                } else {
    143                         return $q{0} . $s . $q{1};
     143                #       return $q{0} . $s . $q{1};
     144                        return $q[0] . $s . $q[1];
    144145                }
    145146        }
     
    227228                                }
    228229                                $l = $k - 1;
    229                                 while ($l >= 0 && $sql{$l} == '\\') {
     230                                while ($l >= 0 && $sql[$l] == '\\') { #deprecated
    230231                                        $l--;
    231232                                        $escaped = !$escaped;
     
    680681        *       @param string $key name of the primary key field in the table
    681682        */
    682         function mosDBTable( $table, $key, &$db ) {
     683        function __construct( $table, $key, &$db ) {
    683684                $this->_tbl = $table;
    684685                $this->_tbl_key = $key;
Note: See TracChangeset for help on using the changeset viewer.