projects
/
fa-stable.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rewrite to use db_pager.
[fa-stable.git]
/
includes
/
db
/
comments_db.inc
diff --git
a/includes/db/comments_db.inc
b/includes/db/comments_db.inc
index 6f9ba120a7a754606ab9cae492c6fc30b0483adc..9a484da257b2600d91003ace891072e403396228 100644
(file)
--- a/
includes/db/comments_db.inc
+++ b/
includes/db/comments_db.inc
@@
-17,7
+17,7
@@
function add_comments($type, $type_no, $date_, $memo_)
{
$date = date2sql($date_);
$sql = "INSERT INTO ".TB_PREF."comments (type, id, date_, memo_)
{
$date = date2sql($date_);
$sql = "INSERT INTO ".TB_PREF."comments (type, id, date_, memo_)
- VALUES ($type, $type_no, '$date', ".db_
quot
e($memo_).")";
+ VALUES ($type, $type_no, '$date', ".db_
escap
e($memo_).")";
db_query($sql, "could not add comments transaction entry");
}
db_query($sql, "could not add comments transaction entry");
}
@@
-30,12
+30,12
@@
function update_comments($type, $id, $date_, $memo_)
if ($date_ == null)
{
delete_comments($type, $id);
if ($date_ == null)
{
delete_comments($type, $id);
- add_comments($type, $id,
''
, $memo_);
+ add_comments($type, $id,
Today()
, $memo_);
}
else
{
$date = date2sql($date_);
}
else
{
$date = date2sql($date_);
- $sql = "UPDATE ".TB_PREF."comments SET memo_=".db_
quot
e($memo_)." WHERE type=$type AND id=$id AND date_='$date'";
+ $sql = "UPDATE ".TB_PREF."comments SET memo_=".db_
escap
e($memo_)." WHERE type=$type AND id=$id AND date_='$date'";
db_query($sql, "could not update comments");
}
}
db_query($sql, "could not update comments");
}
}