CREATE TEMPORARY TABLE _article AS SELECT * FROM article LIMIT 0;
BEGIN TRANSACTION;
DELETE FROM _article;
-COPY _article FROM PROGRAM '. /etc/profile && psql data -Atc "select rss from website" \
+COPY _article FROM PROGRAM '. /etc/profile && psql data -Atc "select rss from website where rss_on" \
| xargs -n 1 rss-feedparser | sed "s/\$/\tf/"
' WITH (format 'text', NULL '');
INSERT INTO article SELECT * FROM _article ON CONFLICT (url) DO NOTHING;
name varchar(200),
description varchar(500),
--url varchar(200),
- rss varchar(300)
+ rss varchar(300),
+ rss_on boolean DEFAULT 't'
);
BEGIN TRANSACTION;
DELETE FROM website;
COPY website FROM STDIN WITH (format 'text', NULL '');
-https://www.corbettreport.com eng The Corbett Report Open Source Intelligence News https://feeds.feedburner.com/CorbettReportRSS
-https://wearechange.or/ eng We Are Change Be the Change You Wish to See in the World https://feeds.feedburner.com/wrc
-https://www.egaliteetreconciliation.fr fra Egalite et Réconciliation Gauche du travail, Droite des valeurs : pour une réconciliation nationale ! https://www.egaliteetreconciliation.fr/spip.php?page=backend
-https://www.infowars.com eng INFOWARS Alex Jones' Infowars: There's a war on for your mind! https://www.infowars.com/feed/custom_feed_rss
-https://www.tvlibertes.com fra TVL TVLibertés - 1ère chaîne de réinformation. Nous, c'est vous https://www.tvlibertes.com/feed
-https://www.rt.com eng RT International RT is the first Russian 24/7 English-language news channel which brings the Russian view on global news. https://www.rt.com/rss
-https://pressfortruth.ca eng Press For Truth Press For Truth is a team of videographers, investigative journalists and political activists. We do our best to expose the global elite and their plans for a new world order. https://pressfortruth.ca/index.php/tools/blocks/problog_list/rss?cID=147
-https://www.youtube.com/channel/UC2aQGaCZjQC1lM3DOwbCIFw eng The Truth Factory The Truth Factory https://www.youtube.com/feeds/videos.xml?channel_id=UC2aQGaCZjQC1lM3DOwbCIFw
+https://www.corbettreport.com eng The Corbett Report Open Source Intelligence News https://feeds.feedburner.com/CorbettReportRSS t
+https://wearechange.or/ eng We Are Change Be the Change You Wish to See in the World https://feeds.feedburner.com/wrc t
+https://www.egaliteetreconciliation.fr fra Egalite et Réconciliation Gauche du travail, Droite des valeurs : pour une réconciliation nationale ! https://www.egaliteetreconciliation.fr/spip.php?page=backend t
+https://www.infowars.com eng INFOWARS Alex Jones' Infowars: There's a war on for your mind! https://www.infowars.com/feed/custom_feed_rss t
+https://www.tvlibertes.com fra TVL TVLibertés - 1ère chaîne de réinformation. Nous, c'est vous https://www.tvlibertes.com/feed t
+https://www.rt.com eng RT International RT is the first Russian 24/7 English-language news channel which brings the Russian view on global news. https://www.rt.com/rss t
+https://pressfortruth.ca eng Press For Truth Press For Truth is a team of videographers, investigative journalists and political activists. We do our best to expose the global elite and their plans for a new world order. https://pressfortruth.ca/index.php/tools/blocks/problog_list/rss?cID=147 t
+https://www.youtube.com/channel/UC2aQGaCZjQC1lM3DOwbCIFw eng The Truth Factory The Truth Factory https://www.youtube.com/feeds/videos.xml?channel_id=UC2aQGaCZjQC1lM3DOwbCIFw t
\.
--- 5|eng|Youtube INFO WARS NEWS||https://www.youtube.com/channel/UCUIjs9R044OjAxKzk0xhGoQ|https://www.youtube.com/feeds/videos.xml?channel_id=UCUIjs9R044OjAxKzk0xhGoQ
+-- 5|eng|Youtube INFO WARS NEWS||https://www.youtube.com/channel/UCUIjs9R044OjAxKzk0xhGoQ|https://www.youtube.com/feeds/videos.xml?channel_id=UCUIjs9R044OjAxKzk0xhGoQ t
COMMIT;
$keys = array_keys($keys);
$values = ($_SERVER['REQUEST_METHOD'] == 'POST') ? $_POST : explode($this->param_args_sep,$this->params['args']);
+ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
+ $values = $_POST;
+ } elseif($this->params['args']) {
+ $values = explode($this->param_args_sep,$this->params['args']);
+ } else {
+ $values = $_GET;
+ }
+
foreach ($values as $k=>$v) {
if (!in_array($k,$keys)) unset($values[$k]);
}
} elseif ($action == 'rm') {
$this->deniedUnless($this->perm >= self::DELETE);
- if (!$this->table->delete($_POST,$info)) $this->error('rm: '.print_r($info,true));
+ if (!$this->table->delete(empty($_POST) ? $_GET : $_POST,$info)) $this->error('rm: '.print_r($info,true));
$this->redirect_if_no_referer($this->table->base.'/');
$this->page($info);
}
public function redirect_if_no_referer($url) {
+ if (!empty($_SERVER['HTTP_REFERER'])) $url = $_SERVER['HTTP_REFERER'];
if ($this->p('referer')) $url = urldecode($this->p('referer'));
header('Location: '.$url);
}