Site metadata tags in status_network: single 'tags' field, pipe-separated.

$sn->tags() returns tag list as array; $sn->hasTag('blah') to check for a particular tag only

Could be used to control things in config file:

  $sn = Status_network::setupSite($_server, $_path, $_wildcard);
  if (!$sn) { die("No such site"); }
  if ($sn->hasTag('individual')) { /* blah */ }

Note memcached keys are unchanged; if tags are changed from an external tool clear:
  statusnet:<dbname>:status_network:<key>:<val>
  for <key>s 'nickname', 'hostname', and 'pathname'
This commit is contained in:
Brion Vibber
2010-01-26 09:25:39 -08:00
parent e05c325722
commit ad6f0501ff
2 changed files with 22 additions and 0 deletions

View File

@@ -14,6 +14,8 @@ create table status_network (
sitename varchar(255) comment 'display name',
theme varchar(255) comment 'theme name',
logo varchar(255) comment 'site logo',
tags text comment 'site meta-info tags (pipe-separated)',
created datetime not null comment 'date this record was created',
modified timestamp comment 'date this record was modified'