-
Notifications
You must be signed in to change notification settings - Fork 1
/
category.php
41 lines (35 loc) · 1.02 KB
/
category.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/php
<?
// $Id: category.php 228 2011-01-02 00:03:49Z MartinS $
foreach ($argv as $arg) {
if (substr($arg, 0, 2) == "--") {
$argument[substr($arg, 2)] = 1;
} elseif (substr($arg, 0, 1) == "-") {
$oArg = substr($arg, 1);
} else {
switch ($oArg) {
case "P": case "A": case "T":
$argument["pages"][] = $arg;
break;
default:
$argument[$oArg][] = $arg;
}
}
}
$slowMode = false;
$fastMode = false;
$accountSuffix='_1'; // Keep this before including expandFns
include("expandFns.php");
$htmlOutput = false;
$editInitiator = '[Cat' . revisionID() . ']';
$category = $argument["cat"] ? $argument["cat"][0] : $_GET["cat"];
if ($category) {
$pages_in_category = categoryMembers($category);
print_r($pages_in_category);
foreach ($pages_in_category as $page) {
expand($page, $ON);
}
exit ("\n Done all " . count($pages_in_category) . " pages in Category:$category. \n");
} else {
exit ("You must specify a category. Try appending ?cat=Blah+blah to the URL.");
}