projects
/
fa-stable.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
php 8 error. class.mail.inc. line 149. #5 parameter cannot be null.
[fa-stable.git]
/
admin
/
db
/
printers_db.inc
diff --git
a/admin/db/printers_db.inc
b/admin/db/printers_db.inc
index 572dca5e2b28eba5b8fc0ddc61911777cded1cda..28c98a56b4b5d56c190d7634e76daca481fb2f64 100644
(file)
--- a/
admin/db/printers_db.inc
+++ b/
admin/db/printers_db.inc
@@
-41,6
+41,11
@@
function get_printer($id)
return db_fetch($result);
}
return db_fetch($result);
}
+function delete_printer($id)
+{
+ $sql="DELETE FROM ".TB_PREF."printers WHERE id=".db_escape($id);
+ db_query($sql,"could not delete printer definition");
+}
//============================================================================
// printer profiles functions
//
//============================================================================
// printer profiles functions
//
@@
-52,7
+57,7
@@
function update_printer_profile($name, $dest)
."(profile, report, printer) VALUES ("
.db_escape($name).","
.db_escape($rep).","
."(profile, report, printer) VALUES ("
.db_escape($name).","
.db_escape($rep).","
- .db_escape($printer).")";
+ .db_escape($printer
? $printer: null, true
).")";
} else {
$sql = "DELETE FROM ".TB_PREF."print_profiles WHERE ("
."report=" . db_escape($rep)
} else {
$sql = "DELETE FROM ".TB_PREF."print_profiles WHERE ("
."report=" . db_escape($rep)
@@
-71,7
+76,7
@@
function update_printer_profile($name, $dest)
function get_report_printer($profile, $report)
{
$sql = "SELECT printer FROM ".TB_PREF."print_profiles WHERE "
function get_report_printer($profile, $report)
{
$sql = "SELECT printer FROM ".TB_PREF."print_profiles WHERE "
- ."profile=".db_escape($profile)." AND report="
.db_escape($report)
;
+ ."profile=".db_escape($profile)." AND report=";
$result = db_query($sql.db_escape($report), 'report printer lookup failed');
$result = db_query($sql.db_escape($report), 'report printer lookup failed');
@@
-101,4
+106,3
@@
function get_print_profile($name)
return db_query($sql,"could not get printing profile");
}
return db_query($sql,"could not get printing profile");
}
-?>
\ No newline at end of file