equal
deleted
inserted
replaced
1 <?php |
1 <?php |
2 |
2 |
3 /* |
3 /* |
4 * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between |
4 * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between |
5 * Version 1.1.6 (Caoineag beta 1) |
5 * Copyright (C) 2006-2009 Dan Fuhry |
6 * Copyright (C) 2006-2008 Dan Fuhry |
|
7 * |
6 * |
8 * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License |
7 * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License |
9 * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. |
8 * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. |
10 * |
9 * |
11 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied |
10 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied |
94 if ( $have_draft ) |
93 if ( $have_draft ) |
95 { |
94 { |
96 $row =& $draft_row; |
95 $row =& $draft_row; |
97 $return['have_draft'] = true; |
96 $return['have_draft'] = true; |
98 $return['draft_author'] = $row['author']; |
97 $return['draft_author'] = $row['author']; |
99 $return['draft_time'] = enano_date('d M Y h:i a', intval($row['time_id'])); |
98 $return['draft_time'] = enano_date(ED_DATE | ED_TIME, intval($row['time_id'])); |
100 if ( isset($_GET['get_draft']) && @$_GET['get_draft'] === '1' ) |
99 if ( isset($_GET['get_draft']) && @$_GET['get_draft'] === '1' ) |
101 { |
100 { |
102 $return['src'] = $row['page_text']; |
101 $return['src'] = $row['page_text']; |
103 $return['edit_summary'] = $row['edit_summary']; |
102 $return['edit_summary'] = $row['edit_summary']; |
104 $return['page_format'] = $row['page_format']; |
103 $return['page_format'] = $row['page_format']; |
284 if ( $row['time_id'] > $time ) |
283 if ( $row['time_id'] > $time ) |
285 { |
284 { |
286 $return = array( |
285 $return = array( |
287 'mode' => 'obsolete', |
286 'mode' => 'obsolete', |
288 'author' => $row['author'], |
287 'author' => $row['author'], |
289 'date_string' => enano_date('d M Y h:i a', $row['time_id']), |
288 'date_string' => enano_date(ED_DATE | ED_TIME, $row['time_id']), |
290 'time' => $row['time_id'] // time() ??? |
289 'time' => $row['time_id'] // time() ??? |
291 ); |
290 ); |
292 echo enano_json_encode($return); |
291 echo enano_json_encode($return); |
293 break; |
292 break; |
294 } |
293 } |