~ubuntu-branches/ubuntu/hoary/moodle/hoary

« back to all changes in this revision

Viewing changes to mod/wiki/ewiki/plugins/aview/backlinks.php

  • Committer: Bazaar Package Importer
  • Author(s): Isaac Clerencia
  • Date: 2004-12-29 00:49:52 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20041229004952-gliyqzpj2w3e7clx
Tags: 1.4.3-1
* Urgency high as upstream release fixes several security bugs
* New upstream release
* Write database creation errors and warn the user about it, 
closes: #285842, #285842

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
 
 
3
#
 
4
#  this plugin prints the "pages linking to" below a page (the same
 
5
#  information the "links/" action does)
 
6
#
 
7
# altered to use ewiki_get_backlinks() by AndyFundinger.
 
8
 
 
9
$ewiki_plugins["view_append"][] = "ewiki_view_append_backlinks";
 
10
 
 
11
function ewiki_view_append_backlinks($id, $data, $action) {
 
12
    $pages = ewiki_get_backlinks($id);
 
13
    
 
14
    $o="";
 
15
    foreach ($pages as $id) {
 
16
        $o .= ' <a href="'.ewiki_script("",$id).'">'.$id.'</a>';
 
17
    }
 
18
    ($o) && ($o = "<div class=\"wiki_backlinks\"><small>".get_string('backlinks', 'wiki').":</small><br>$o</div>\n");
 
19
    
 
20
    return($o);
 
21
}
 
22
?>
 
 
b'\\ No newline at end of file'