2
0
forked from Wavyzz/dolibarr

replace deprecated (#31803)

* replace deprecated

* replace deprecated
This commit is contained in:
Frédéric FRANCE
2024-11-14 00:16:43 +01:00
committed by GitHub
parent 44371d67b3
commit 9067c6deec
100 changed files with 195 additions and 101 deletions

View File

@@ -1,6 +1,7 @@
#!/usr/bin/env php
<?php
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -104,7 +105,7 @@ if (! $ret > 0) {
print 'A user with login "admin" and all permissions must be created to use this script.'."\n";
exit;
}
$user->getrights();
$user->loadRights();
$socids = array();

View File

@@ -2,6 +2,7 @@
<?php
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -110,7 +111,7 @@ if ($ret <= 0) {
print 'A user with login "admin" and all permissions must be created to use this script.'."\n";
exit;
}
$user->getrights();
$user->loadRights();
$societesid = array();
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe where client in (1, 3)";

View File

@@ -2,6 +2,7 @@
<?php
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -58,7 +59,7 @@ if (! $ret > 0) {
print 'A user with login "admin" and all permissions must be created to use this script.'."\n";
exit;
}
$user->getrights();
$user->loadRights();
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product"; $productsid = array();

View File

@@ -2,6 +2,7 @@
<?php
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2007 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -106,7 +107,7 @@ if (! $ret > 0) {
print 'A user with login "admin" and all permissions must be created to use this script.'."\n";
exit;
}
$user->getrights();
$user->loadRights();
$socids = array();

View File

@@ -2,6 +2,7 @@
<?php
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2006-2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -61,7 +62,7 @@ if (! $ret > 0) {
print 'A user with login "admin" and all permissions must be created to use this script.'."\n";
exit;
}
$user->getrights();
$user->loadRights();
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product"; $productsid = array();

View File

@@ -2,6 +2,7 @@
<?php
/* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2016 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -83,7 +84,7 @@ if (! $ret > 0) {
print 'A user with login "admin" and all permissions must be created to use this script.'."\n";
exit;
}
$user->getrights();
$user->loadRights();
// Ask confirmation
if (! $confirmed) {

View File

@@ -2,6 +2,7 @@
<?php
/* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2016 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -83,7 +84,7 @@ if (! $ret > 0) {
print 'A user with login "admin" and all permissions must be created to use this script.'."\n";
exit;
}
$user->getrights();
$user->loadRights();
// Ask confirmation
if (! $confirmed) {

View File

@@ -84,7 +84,7 @@ if (! $ret > 0) {
print 'A user with login "admin" and all permissions must be created to use this script.'."\n";
exit;
}
$user->getrights();
$user->loadRights();
// Ask confirmation
if (! $confirmed) {

View File

@@ -231,7 +231,7 @@ if (! $ret > 0) {
print 'An admin user with login "admin" must exists to use this script.'."\n";
exit;
}
//$user->getrights();
//$user->loadRights();
print "Purge all data for this database:\n";