- a few changes which might help overcome Jeroen's redeclartion problem
(or might not)3-00
parent
657c3bb209
commit
53c67ac0a2
|
@ -32,6 +32,7 @@ function throttle($type, $rate) {
|
|||
$conf = conf_init();
|
||||
|
||||
include_once "includes/$conf.conf";
|
||||
include_once "includes/structure.inc";
|
||||
include_once "includes/database.inc";
|
||||
include_once "includes/variable.inc";
|
||||
include_once "includes/function.inc";
|
||||
|
|
|
@ -8,8 +8,6 @@ $module = array("help" => "story_help",
|
|||
"admin" => "story_admin",
|
||||
"block" => "story_block");
|
||||
|
||||
include_once "includes/structure.inc";
|
||||
|
||||
class Story {
|
||||
function Story($story) {
|
||||
global $user;
|
||||
|
@ -191,7 +189,7 @@ function story_block() {
|
|||
|
||||
function story_query($type = "") {
|
||||
global $status;
|
||||
$queries = array(array("recent stories", "WHERE n.type = 'story' ORDER BY n.timestamp DESC"), array("posted stories", "WHERE n.type = 'story' AND n.status = '$status[posted]' ORDER BY n.timestamp DESC"), array("queued stories", "WHERE n.type = 'story' AND n.status = '$status[queued]' ORDER BY n.timestamp DESC"), array("dumped stories", "WHERE n.type = 'story' AND n.status = '$status[dumped]' ORDER BY n.timestamp DESC"), array("stories without category (integrity)", "WHERE n.cid = '0' ORDER BY n.timestamp DESC"), array("stories without topic (integrity)", "WHERE n.tid = '0' ORDER BY n.timestamp DESC"));
|
||||
$queries = array(array("recent stories", "WHERE n.type = 'story' ORDER BY n.timestamp DESC"), array("posted stories", "WHERE n.type = 'story' AND n.status = '$status[posted]' ORDER BY n.timestamp DESC"), array("queued stories", "WHERE n.type = 'story' AND n.status = '$status[queued]' ORDER BY n.timestamp DESC"), array("dumped stories", "WHERE n.type = 'story' AND n.status = '$status[dumped]' ORDER BY n.timestamp DESC"), array("stories without category (integrity)", "WHERE n.type = 'story' AND n.cid = '0' ORDER BY n.timestamp DESC"), array("stories without topic (integrity)", "WHERE n.type = 'story' AND n.tid = '0' ORDER BY n.timestamp DESC"));
|
||||
return ($queries[$type] ? $queries[$type] : $queries);
|
||||
}
|
||||
|
||||
|
|
|
@ -8,8 +8,6 @@ $module = array("help" => "story_help",
|
|||
"admin" => "story_admin",
|
||||
"block" => "story_block");
|
||||
|
||||
include_once "includes/structure.inc";
|
||||
|
||||
class Story {
|
||||
function Story($story) {
|
||||
global $user;
|
||||
|
@ -191,7 +189,7 @@ function story_block() {
|
|||
|
||||
function story_query($type = "") {
|
||||
global $status;
|
||||
$queries = array(array("recent stories", "WHERE n.type = 'story' ORDER BY n.timestamp DESC"), array("posted stories", "WHERE n.type = 'story' AND n.status = '$status[posted]' ORDER BY n.timestamp DESC"), array("queued stories", "WHERE n.type = 'story' AND n.status = '$status[queued]' ORDER BY n.timestamp DESC"), array("dumped stories", "WHERE n.type = 'story' AND n.status = '$status[dumped]' ORDER BY n.timestamp DESC"), array("stories without category (integrity)", "WHERE n.cid = '0' ORDER BY n.timestamp DESC"), array("stories without topic (integrity)", "WHERE n.tid = '0' ORDER BY n.timestamp DESC"));
|
||||
$queries = array(array("recent stories", "WHERE n.type = 'story' ORDER BY n.timestamp DESC"), array("posted stories", "WHERE n.type = 'story' AND n.status = '$status[posted]' ORDER BY n.timestamp DESC"), array("queued stories", "WHERE n.type = 'story' AND n.status = '$status[queued]' ORDER BY n.timestamp DESC"), array("dumped stories", "WHERE n.type = 'story' AND n.status = '$status[dumped]' ORDER BY n.timestamp DESC"), array("stories without category (integrity)", "WHERE n.type = 'story' AND n.cid = '0' ORDER BY n.timestamp DESC"), array("stories without topic (integrity)", "WHERE n.type = 'story' AND n.tid = '0' ORDER BY n.timestamp DESC"));
|
||||
return ($queries[$type] ? $queries[$type] : $queries);
|
||||
}
|
||||
|
||||
|
|
|
@ -5,9 +5,6 @@ $module = array("admin" => "structure_admin");
|
|||
$cstatus = array("disabled", "enabled: incl. anonymous", "enabled: excl. anonymous");
|
||||
$mstatus = array("post new submissions", "moderate new submissions");
|
||||
|
||||
include "includes/structure.inc";
|
||||
|
||||
|
||||
function content_types($name, $module) {
|
||||
global $types;
|
||||
if ($module[type]) $types[$name] = $name;
|
||||
|
|
Loading…
Reference in New Issue