' . ewiki_t("ATTACHMENTS") . '

'; $scan = 's:7:"section";' . serialize($id); $result = ewiki_database("SEARCH", array("meta" => $scan)); #### BEGIN MOODLE CHANGES - show attachments link only if there are attachments. #### - don't show the attachments on the content page. if (count($result->entries) <= 0) { $o = ''; } // $ord = array(); // while ($row = $result->get()) { // $ord[$row["id"]] = $row["created"]; // } // arsort($ord); // // foreach ($ord as $id => $uu) { // $row = ewiki_database("GET", array("id"=>$id)); // if (EWIKI_PROTECTED_MODE && EWIKI_PROTECTED_MODE_HIDING && !ewiki_auth($row["id"], $row, "view")) { // continue; // } // $o .= ewiki_entry_downloads($row, "*"); // } #### END MOODLE CHANGES return($o); } function ewiki_attachments() { global $ewiki_title, $ewiki_id; return(ewiki_view_append_attachments($ewiki_title, array("id"=>$ewiki_id), "view")); } ?>