[ewiki] add: Merge Notes aview_subpages.php
- From: Andy Fundinger <andy@xxxxxxxxxxx>
- To: "'ewiki@xxxxxxxxxxxxx'" <ewiki@xxxxxxxxxxxxx>
- Date: Wed, 10 Dec 2003 20:20:06 -0500
I disagree with your fix in aview_subpages.php, $result->get($_hiding)
appears not to get enough information for the auth plugin to work on.
Specifically, as I read the code, meta data is not retrieved. If you want
to avoid the full get call we could just pass $uu as data. We do so
elsewhere and I expect that _auth plugins that need this data would have
code to retrieve it and when it is not provided. My auth plugin (release
tomorrow I hope) does not need or use $data nor do I use this plugin so I
have little stake here. If you don't want to use the $uu option, I suggest
the merge below:
function ewiki_subpage_list($id,$postfix=""){
$_hiding = EWIKI_PROTECTED_MODE && EWIKI_PROTECTED_MODE_HIDING;
$result = ewiki_database("SEARCH", array("id" => $id.$postfix));
while ($row = $result->get()) {
//retrieve and check rights if running in protected mode
if ($_hiding){
$data = ewiki_database("GET", array("id" => $row["id"]));
if(!ewiki_auth($row["id"], $data,'view', $ring=false,
$force=0)) {
continue;
}
}
$pages[$row["id"]] = "";
}
return($pages);
}
Andy
Other related posts:
- » [ewiki] add: Merge Notes aview_subpages.php