- return 0;
-}
-
-sub add_channel_category {
- my ($name) = @_;
- my $dbh = C4::Context->dbh;
- my $sth = $dbh->prepare("INSERT INTO news_channels_categories (category_name) VALUES (?)");
- $sth->execute($name);
- $sth->finish;
- return 1;
-}
-
-sub update_channel_category {
- my ($id, $name) = @_;
- my $dbh = C4::Context->dbh;
- my $sth = $dbh->prepare("UPDATE news_channels_categories SET category_name = ? WHERE id_category = ?");
- $sth->execute($name, $id);
- $sth->finish;
- return 1;
-}
-
-sub add_opac_new {
- my ($title, $new, $lang, $expirationdate, $timestamp, $number) = @_;
- my $dbh = C4::Context->dbh;
- my $sth = $dbh->prepare("INSERT INTO opac_news (title, new, lang, expirationdate, timestamp, number) VALUES (?,?,?,?,?,?)");
- $sth->execute($title, $new, $lang, $expirationdate, $timestamp, $number);
- $sth->finish;
- return 1;
-}
-
-sub upd_opac_new {
- my ($idnew, $title, $new, $lang, $expirationdate, $timestamp,$number) = @_;
- my $dbh = C4::Context->dbh;
- my $sth = $dbh->prepare("
- UPDATE opac_news SET
- title = ?,
- new = ?,
- lang = ?,
- expirationdate = ?,
- timestamp = ?,
- number = ?
- WHERE idnew = ?
- ");
- $sth->execute($title, $new, $lang, $expirationdate, $timestamp,$number,$idnew);
- $sth->finish;
- return 1;