| [ Index ] |
|
Code source de eGroupWare 1.2.106-2 |
1 <?php 2 // $Id: history.php 20295 2006-02-15 12:31:25Z $ 3 4 require('parse/main.php'); 5 require('parse/macros.php'); 6 require('parse/html.php'); 7 require('lib/diff.php'); 8 require(TemplateDir . '/history.php'); 9 require('lib/headers.php'); 10 11 // Display the known history of a page's edits. 12 function action_history() 13 { 14 global $pagestore, $page, $full, $HistMax; 15 16 $history = $pagestore->history($page); 17 18 gen_headers($history[0][0]); 19 20 21 $text = ''; 22 $latest_auth = ''; 23 $previous_ver = 0; 24 $is_latest = 1; 25 26 for($i = 0; $i < count($history); $i++) 27 { 28 if($latest_auth == '') 29 { 30 $latest_auth = ($history[$i][3] == '' ? $history[$i][1] 31 : $history[$i][3]); 32 $latest_ver = $history[$i][2]; 33 } 34 35 if($previous_ver == 0 36 && $latest_auth != ($history[$i][3] == '' ? $history[$i][1] 37 : $history[$i][3])) 38 { $previous_ver = $history[$i][2]; } 39 40 if($i < $HistMax || $full) 41 { 42 $text = $text . html_history_entry($page, $history[$i][2], 43 $history[$i][0], $history[$i][1], 44 $history[$i][3], 45 $previous_ver == $history[$i][2] || !$full && $i == count($history)-1, 46 $is_latest, $history[$i][4]); 47 } 48 49 $is_latest = 0; 50 } 51 52 if($i >= $HistMax && !$full) 53 { $text = $text . html_fullhistory($page, count($history)); } 54 55 $p1 = $pagestore->page($page); 56 $p1->version = $previous_ver; 57 $p2 = $pagestore->page($page); 58 $p2->version = $latest_ver; 59 60 $diff = diff_compute($p1->read(), $p2->read()); 61 template_history(array('page' => $p2->as_array(), 62 'history' => $text, 63 'diff' => diff_parse($diff))); 64 } 65 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
| Généré le : Sun Feb 25 17:20:01 2007 | par Balluche grâce à PHPXref 0.7 |