%%anonymous%%

%%prequery%%
$this->policyId= '$Id: anonymous,v 1.8 2003/02/06 20:41:41 csnyder Exp $';

global $session;
// create SQL safety nets
if ($session->statuswhere=="") {
	$session->statuswhere= " AND obj.status='posted' ";
	$session->publicwhere= " AND obj.public='1' ";
	$session->statusfolder= " AND folder.status='posted' ";
	$session->publicfolder= " AND folder.public='1' ";
	berror("applyPolicy: session:$session->id had no statuswhere ($session->statuswhere).",1);
	}
$this->sqlSafe= $session->statuswhere.$session->publicwhere;
$this->sqlSafeFolder= $session->statusfolder.$session->publicfolder;
berror("applyPolicy: created sqlSafe ($this->sqlSafe) and sqlSafeFolder ($this->sqlSafeFolder) from session:$session->id.",1);

// publishing settings controls
$this->rankAllowed= 50;
$this->publicAllowed= 1;
$this->statusAllowed= "new,posted,deleted";

// why is this here???
if ($this->orderby!= "") {
	// do nothing
	}
elseif ($getvars[orderby]!="") {
if ($getvars[direction]!="") $direction= strtoupper(addslashes($getvars[direction]));
	$orderby= strtoupper(addslashes($getvars[orderby]));
	$this->orderby= "ORDER BY obj.$orderby $direction";
	}
else $this->orderby= "ORDER BY obj.id ASC";
if ($getvars[limit]!="") {
	$offset= strtoupper(addslashes($getvars[offset]));
	$limit= strtoupper(addslashes($getvars[limit]));
	if ($offset!="") $this->limit= "LIMIT $offset, $limit ";
	else $this->limit= "LIMIT $limit ";
	}
else $this->limit= "LIMIT 30 ";


%%addons%%
$this->canAddChild=1;
$this->canCreate=1;
$this->canSave[session]=1;
$this->canSave[document]=0;
$this->canSave[image]=0;
$this->canSave[audio]=0;
$this->canSave[video]=0;
$this->canSave[comment]=1;
$this->canSave[sitemember]=1;
$this->canSave[member]=1;
$this->canSave[event]=1;

%%end of policy%%
