add site_dead flag to prevent delivery to dead sites. Allow sys channel webpages to be viewed even if site is configured "block public".

This commit is contained in:
redmatrix
2015-06-08 16:55:17 -07:00
parent 5b482c1daf
commit 39f0e6fe62
8 changed files with 52 additions and 18 deletions

View File

@@ -1266,6 +1266,7 @@ CREATE TABLE IF NOT EXISTS `site` (
`site_location` char(255) NOT NULL DEFAULT '',
`site_realm` char(255) NOT NULL DEFAULT '',
`site_valid` smallint NOT NULL DEFAULT '0',
`site_dead` smallint NOT NULL DEFAULT '0',
PRIMARY KEY (`site_url`),
KEY `site_flags` (`site_flags`),
KEY `site_update` (`site_update`),
@@ -1275,7 +1276,8 @@ CREATE TABLE IF NOT EXISTS `site` (
KEY `site_sellpage` (`site_sellpage`),
KEY `site_pull` (`site_pull`),
KEY `site_realm` (`site_realm`),
KEY `site_valid` (`site_valid`)
KEY `site_valid` (`site_valid`),
KEY `site_dead` (`site_dead`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------

View File

@@ -969,6 +969,7 @@ CREATE TABLE "site" (
"site_location" text NOT NULL DEFAULT '',
"site_realm" text NOT NULL DEFAULT '',
"site_valid" smallint NOT NULL DEFAULT '0',
"site_dead" smallint NOT NULL DEFAULT '0',
PRIMARY KEY ("site_url")
);
create index "site_flags" on site ("site_flags");
@@ -979,6 +980,7 @@ create index "site_access" on site ("site_access");
create index "site_sellpage" on site ("site_sellpage");
create index "site_realm" on site ("site_realm");
create index "site_valid" on site ("site_valid");
create index "site_dead" on site ("site_dead");
CREATE TABLE "source" (
"src_id" serial NOT NULL,

View File

@@ -1,6 +1,6 @@
<?php
define( 'UPDATE_VERSION' , 1142 );
define( 'UPDATE_VERSION' , 1143 );
/**
*
@@ -1645,4 +1645,15 @@ function update_r1141() {
return UPDATE_SUCCESS;
return UPDATE_FAILED;
}
function update_r1142() {
$r1 = q("alter table site add site_dead smallint not null default '0' ");
$r2 = q("create index site_dead on site ( site_dead ) ");
if($r1 && $r2)
return UPDATE_SUCCESS;
return UPDATE_FAILED;
}