[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: wiki/action admin.php,1.1.1.1,1.2 conflict.php,
From: |
Ralf Becker <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: wiki/action admin.php,1.1.1.1,1.2 conflict.php,1.1.1.1,1.2 diff.php,1.1.1.1,1.2 edit.php,1.1.1.1,1.2 find.php,1.1.1.1,1.2 history.php,1.1.1.1,1.2 macro.php,1.1.1.1,1.2 prefs.php,1.1.1.1,1.2 preview.php,1.1.1.1,1.2 rss.php,1.1.1.1,1.2 save.php,1.1.1.1,1.2 style.php,1.1.1.1,1.2 view.php,1.1.1.1,1.2 |
Date: |
Mon, 03 Mar 2003 08:37:07 -0500 |
Update of /cvsroot/phpgroupware/wiki/action
In directory subversions:/tmp/cvs-serv23134/action
Modified Files:
admin.php conflict.php diff.php edit.php find.php history.php
macro.php prefs.php preview.php rss.php save.php style.php
view.php
Log Message:
make Axis-0.44 the new head-version
Index: admin.php
===================================================================
RCS file: /cvsroot/phpgroupware/wiki/action/admin.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** admin.php 3 Mar 2003 13:00:38 -0000 1.1.1.1
--- admin.php 3 Mar 2003 13:37:05 -0000 1.2
***************
*** 1,141 ****
! <?php
! // $Id$
!
! // Don't freak out lib/init.php.
! $document = $categories = $comment = $page = '';
!
! require('lib/init.php');
! require('parse/html.php');
! require('parse/transforms.php');
! require('template/admin.php');
!
! if($AdminEnabled != 1)
! { die($ErrorAdminDisabled); }
!
! // Harvest script parameters.
!
! $REMOTE_ADDR = isset($HTTP_SERVER_VARS['REMOTE_ADDR'])
! ? $HTTP_SERVER_VARS['REMOTE_ADDR'] : '';
!
! if(isset($HTTP_GET_VARS['locking']))
! { $locking = $HTTP_GET_VARS['locking']; }
! if(isset($HTTP_GET_VARS['blocking']))
! { $blocking = $HTTP_GET_VARS['blocking']; }
! if(!isset($locking))
! {
! $locking = isset($HTTP_POST_VARS['locking'])
! ? $HTTP_POST_VARS['locking'] : '';
! }
! if(!isset($blocking))
! {
! $blocking = isset($HTTP_POST_VARS['blocking'])
! ? $HTTP_POST_VARS['blocking'] : '';
! }
!
! $Block = isset($HTTP_POST_VARS['Block'])
! ? $HTTP_POST_VARS['Block'] : '';
! $Unblock = isset($HTTP_POST_VARS['Unblock'])
! ? $HTTP_POST_VARS['Unblock'] : '';
! $Save = isset($HTTP_POST_VARS['Save'])
! ? $HTTP_POST_VARS['Save'] : '';
! $address = isset($HTTP_POST_VARS['address'])
! ? $HTTP_POST_VARS['address'] : '';
!
! $count = isset($HTTP_POST_VARS['count']) ? $HTTP_POST_VARS['count'] : 0;
!
! if($locking && $count > 0)
! {
! for($i = 1; $i <= $count; $i++)
! {
! $var = 'name' + $i;
! $$var = isset($HTTP_POST_VARS[$var]) ? $HTTP_POST_VARS[$var] : '';
! $var = 'lock' + $i;
! $$var = isset($HTTP_POST_VARS[$var]) ? $HTTP_POST_VARS[$var] : '';
! }
! }
!
! if($locking) // Locking/unlocking pages.
! {
! if(empty($Save)) // Not saving results; display form.
! {
! $html = html_lock_start();
! $pagelist = $pagestore->allpages();
! foreach($pagelist as $page)
! { $html = $html . html_lock_page($page[1], $page[6]); }
! template_admin(array('html' => $html . html_lock_end(count($pagelist))));
! }
! else // Lock/unlock pages at admin's
request.
! {
! $pagestore->lock(); // Exclusive access to database.
! for($i = 1; $i <= $count; $i++)
! {
! $page = urldecode($HTTP_POST_VARS['name' . $i]);
! if(isset($HTTP_POST_VARS['lock' . $i]))
! { $lock = $HTTP_POST_VARS['lock' . $i]; }
! else
! { $lock = 0; }
! $pg = $pagestore->page($page);
! $pg->read();
! $pg->version++;
! $pg->hostname = gethostbyaddr($REMOTE_ADDR);
! $pg->username = $UserName;
! $pg->comment = '';
! $pg->text = str_replace('\\', '\\\\', $pg->text);
! $pg->text = str_replace('\'', '\\\'', $pg->text);
! if($pg->exists && $pg->mutable && $lock)
! {
! $pg->mutable = 0;
! $pg->write();
! }
! else if($pg->exists && !$pg->mutable && !$lock)
! {
! $pg->mutable = 1;
! $pg->write();
! }
! }
!
! $pagestore->unlock();
! header('Location: ' . $AdminScript);
! }
! }
! else if($blocking) // Blocking/unblocking IP addrs.
! {
! if(empty($Block) && empty($Unblock)) // Not saving results; display form.
! {
! $html = '';
! if($RatePeriod == 0)
! {
! $html = $html . html_bold_start() .
! 'Rate control / IP blocking disabled' .
! html_bold_end() . html_newline();
! }
!
! $html = $html . html_rate_start();
! $blocklist = rateBlockList($pagestore->dbh);
! foreach($blocklist as $block)
! { $html = $html . html_rate_entry($block); }
! $html = $html . html_rate_end();
!
! template_admin(array('html' => $html));
! }
! else // Block/unblock an address group.
! {
! if(!empty($Block))
! { rateBlockAdd($pagestore->dbh, $address); }
! else if(!empty($Unblock))
! { rateBlockRemove($pagestore->dbh, $address); }
!
! header('Location: ' . $AdminScript);
! }
! }
! else // Display main menu for admin.
! {
! template_admin(array('html' => html_url($AdminScript . '?locking=1',
! 'Lock / unlock pages') .
! html_newline() .
! html_url($AdminScript . '?blocking=1',
! 'Block / unblock hosts') .
! html_newline()));
! }
!
! ?>
--- 1,141 ----
! <?php
! // $Id$
!
! // Don't freak out lib/init.php.
! $document = $categories = $comment = $page = '';
!
! require('lib/init.php');
! require('parse/html.php');
! require('parse/transforms.php');
! require('template/admin.php');
!
! if($AdminEnabled != 1)
! { die($ErrorAdminDisabled); }
!
! // Harvest script parameters.
!
! $REMOTE_ADDR = isset($HTTP_SERVER_VARS['REMOTE_ADDR'])
! ? $HTTP_SERVER_VARS['REMOTE_ADDR'] : '';
!
! if(isset($HTTP_GET_VARS['locking']))
! { $locking = $HTTP_GET_VARS['locking']; }
! if(isset($HTTP_GET_VARS['blocking']))
! { $blocking = $HTTP_GET_VARS['blocking']; }
! if(!isset($locking))
! {
! $locking = isset($HTTP_POST_VARS['locking'])
! ? $HTTP_POST_VARS['locking'] : '';
! }
! if(!isset($blocking))
! {
! $blocking = isset($HTTP_POST_VARS['blocking'])
! ? $HTTP_POST_VARS['blocking'] : '';
! }
!
! $Block = isset($HTTP_POST_VARS['Block'])
! ? $HTTP_POST_VARS['Block'] : '';
! $Unblock = isset($HTTP_POST_VARS['Unblock'])
! ? $HTTP_POST_VARS['Unblock'] : '';
! $Save = isset($HTTP_POST_VARS['Save'])
! ? $HTTP_POST_VARS['Save'] : '';
! $address = isset($HTTP_POST_VARS['address'])
! ? $HTTP_POST_VARS['address'] : '';
!
! $count = isset($HTTP_POST_VARS['count']) ? $HTTP_POST_VARS['count'] : 0;
!
! if($locking && $count > 0)
! {
! for($i = 1; $i <= $count; $i++)
! {
! $var = 'name' + $i;
! $$var = isset($HTTP_POST_VARS[$var]) ? $HTTP_POST_VARS[$var] : '';
! $var = 'lock' + $i;
! $$var = isset($HTTP_POST_VARS[$var]) ? $HTTP_POST_VARS[$var] : '';
! }
! }
!
! if($locking) // Locking/unlocking pages.
! {
! if(empty($Save)) // Not saving results; display form.
! {
! $html = html_lock_start();
! $pagelist = $pagestore->allpages();
! foreach($pagelist as $page)
! { $html = $html . html_lock_page($page[1], $page[6]); }
! template_admin(array('html' => $html . html_lock_end(count($pagelist))));
! }
! else // Lock/unlock pages at admin's
request.
! {
! $pagestore->lock(); // Exclusive access to database.
! for($i = 1; $i <= $count; $i++)
! {
! $page = urldecode($HTTP_POST_VARS['name' . $i]);
! if(isset($HTTP_POST_VARS['lock' . $i]))
! { $lock = $HTTP_POST_VARS['lock' . $i]; }
! else
! { $lock = 0; }
! $pg = $pagestore->page($page);
! $pg->read();
! $pg->version++;
! $pg->hostname = gethostbyaddr($REMOTE_ADDR);
! $pg->username = $UserName;
! $pg->comment = '';
! $pg->text = str_replace('\\', '\\\\', $pg->text);
! $pg->text = str_replace('\'', '\\\'', $pg->text);
! if($pg->exists && $pg->mutable && $lock)
! {
! $pg->mutable = 0;
! $pg->write();
! }
! else if($pg->exists && !$pg->mutable && !$lock)
! {
! $pg->mutable = 1;
! $pg->write();
! }
! }
!
! $pagestore->unlock();
! header('Location: ' . $AdminScript);
! }
! }
! else if($blocking) // Blocking/unblocking IP addrs.
! {
! if(empty($Block) && empty($Unblock)) // Not saving results; display form.
! {
! $html = '';
! if($RatePeriod == 0)
! {
! $html = $html . html_bold_start() .
! 'Rate control / IP blocking disabled' .
! html_bold_end() . html_newline();
! }
!
! $html = $html . html_rate_start();
! $blocklist = rateBlockList($pagestore->dbh);
! foreach($blocklist as $block)
! { $html = $html . html_rate_entry($block); }
! $html = $html . html_rate_end();
!
! template_admin(array('html' => $html));
! }
! else // Block/unblock an address group.
! {
! if(!empty($Block))
! { rateBlockAdd($pagestore->dbh, $address); }
! else if(!empty($Unblock))
! { rateBlockRemove($pagestore->dbh, $address); }
!
! header('Location: ' . $AdminScript);
! }
! }
! else // Display main menu for admin.
! {
! template_admin(array('html' => html_url($AdminScript . '?locking=1',
! 'Lock / unlock pages') .
! html_newline() .
! html_url($AdminScript . '?blocking=1',
! 'Block / unblock hosts') .
! html_newline()));
! }
!
! ?>
Index: conflict.php
===================================================================
RCS file: /cvsroot/phpgroupware/wiki/action/conflict.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** conflict.php 3 Mar 2003 13:00:38 -0000 1.1.1.1
--- conflict.php 3 Mar 2003 13:37:05 -0000 1.2
***************
*** 1,23 ****
! <?php
! // $Id$
!
! require(TemplateDir . '/conflict.php');
!
! // Conflict editor. Someone accidentally almost overwrote something someone
! // else just saved.
! function action_conflict()
! {
! global $pagestore, $page, $document, $ParseEngine;
!
! $pg = $pagestore->page($page);
! $pg->read();
!
! template_conflict(array('page' => $page,
! 'text' => $pg->text,
! 'html' => parseText($pg->text,
! $ParseEngine, $page),
! 'usertext' => $document,
! 'timestamp' => $pg->time,
! 'nextver' => $pg->version + 1));
! }
! ?>
--- 1,23 ----
! <?php
! // $Id$
!
! require(TemplateDir . '/conflict.php');
!
! // Conflict editor. Someone accidentally almost overwrote something someone
! // else just saved.
! function action_conflict()
! {
! global $pagestore, $page, $document, $ParseEngine;
!
! $pg = $pagestore->page($page);
! $pg->read();
!
! template_conflict(array('page' => $page,
! 'text' => $pg->text,
! 'html' => parseText($pg->text,
! $ParseEngine, $page),
! 'usertext' => $document,
! 'timestamp' => $pg->time,
! 'nextver' => $pg->version + 1));
! }
! ?>
Index: diff.php
===================================================================
RCS file: /cvsroot/phpgroupware/wiki/action/diff.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** diff.php 3 Mar 2003 13:00:38 -0000 1.1.1.1
--- diff.php 3 Mar 2003 13:37:05 -0000 1.2
***************
*** 1,28 ****
! <?php
! // $Id$
!
! require('parse/main.php');
! require('parse/macros.php');
! require('parse/html.php');
! require(TemplateDir . '/diff.php');
! require('lib/diff.php');
!
! // Compute difference between two versions of a page.
! function action_diff()
! {
! global $pagestore, $page, $ver1, $ver2, $ParseEngine;
!
! $p1 = $pagestore->page($page);
! $p1->version = $ver1;
! $p2 = $pagestore->page($page);
! $p2->version = $ver2;
!
! $diff = diff_compute($p1->read(), $p2->read());
!
! template_diff(array('page' => $page,
! 'diff_html' => diff_parse($diff),
! 'html' => parseText($p2->text, $ParseEngine,
$page),
! 'editable' => $p2->mutable,
! 'timestamp' => $p2->time));
! }
! ?>
--- 1,28 ----
! <?php
! // $Id$
!
! require('parse/main.php');
! require('parse/macros.php');
! require('parse/html.php');
! require(TemplateDir . '/diff.php');
! require('lib/diff.php');
!
! // Compute difference between two versions of a page.
! function action_diff()
! {
! global $pagestore, $page, $ver1, $ver2, $ParseEngine;
!
! $p1 = $pagestore->page($page);
! $p1->version = $ver1;
! $p2 = $pagestore->page($page);
! $p2->version = $ver2;
!
! $diff = diff_compute($p1->read(), $p2->read());
!
! template_diff(array('page' => $page,
! 'diff_html' => diff_parse($diff),
! 'html' => parseText($p2->text, $ParseEngine,
$page),
! 'editable' => $p2->mutable,
! 'timestamp' => $p2->time));
! }
! ?>
Index: edit.php
===================================================================
RCS file: /cvsroot/phpgroupware/wiki/action/edit.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** edit.php 3 Mar 2003 13:00:38 -0000 1.1.1.1
--- edit.php 3 Mar 2003 13:37:05 -0000 1.2
***************
*** 1,32 ****
! <?php
! // $Id$
!
! require('parse/html.php');
! require(TemplateDir . '/edit.php');
!
! // Edit a page (possibly an archive version).
! function action_edit()
! {
! global $page, $pagestore, $ParseEngine, $version, $ErrorPageLocked;
!
! $pg = $pagestore->page($page);
! $pg->read();
!
! if(!$pg->mutable)
! { die($ErrorPageLocked); }
!
! $archive = 0;
! if($version != '')
! {
! $pg->version = $version;
! $pg->read();
! $archive = 1;
! }
!
! template_edit(array('page' => $page,
! 'text' => $pg->text,
! 'timestamp' => $pg->time,
! 'nextver' => $pg->version + 1,
! 'archive' => $archive));
! }
! ?>
--- 1,32 ----
! <?php
! // $Id$
!
! require('parse/html.php');
! require(TemplateDir . '/edit.php');
!
! // Edit a page (possibly an archive version).
! function action_edit()
! {
! global $page, $pagestore, $ParseEngine, $version, $ErrorPageLocked;
!
! $pg = $pagestore->page($page);
! $pg->read();
!
! if(!$pg->mutable)
! { die($ErrorPageLocked); }
!
! $archive = 0;
! if($version != '')
! {
! $pg->version = $version;
! $pg->read();
! $archive = 1;
! }
!
! template_edit(array('page' => $page,
! 'text' => $pg->text,
! 'timestamp' => $pg->time,
! 'nextver' => $pg->version + 1,
! 'archive' => $archive));
! }
! ?>
Index: find.php
===================================================================
RCS file: /cvsroot/phpgroupware/wiki/action/find.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** find.php 3 Mar 2003 13:00:38 -0000 1.1.1.1
--- find.php 3 Mar 2003 13:37:05 -0000 1.2
***************
*** 1,21 ****
! <?php
! // $Id$
!
! require('parse/html.php');
! require(TemplateDir . '/find.php');
!
! // Find a string in the database.
! function action_find()
! {
! global $pagestore, $find;
!
! $list = $pagestore->find($find);
!
! $text = '';
! foreach($list as $page)
! { $text = $text . html_ref($page, $page) . html_newline(); }
!
! template_find(array('find' => $find,
! 'pages' => $text));
! }
! ?>
--- 1,21 ----
! <?php
! // $Id$
!
! require('parse/html.php');
! require(TemplateDir . '/find.php');
!
! // Find a string in the database.
! function action_find()
! {
! global $pagestore, $find;
!
! $list = $pagestore->find($find);
!
! $text = '';
! foreach($list as $page)
! { $text = $text . html_ref($page, $page) . html_newline(); }
!
! template_find(array('find' => $find,
! 'pages' => $text));
! }
! ?>
Index: history.php
===================================================================
RCS file: /cvsroot/phpgroupware/wiki/action/history.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** history.php 3 Mar 2003 13:00:38 -0000 1.1.1.1
--- history.php 3 Mar 2003 13:37:05 -0000 1.2
***************
*** 1,64 ****
! <?php
! // $Id$
!
! require('parse/main.php');
! require('parse/macros.php');
! require('parse/html.php');
! require('lib/diff.php');
! require(TemplateDir . '/history.php');
! require('lib/headers.php');
!
! // Display the known history of a page's edits.
! function action_history()
! {
! global $pagestore, $page, $full, $HistMax;
!
! $history = $pagestore->history($page);
!
! gen_headers($history[0][0]);
!
! $text = '';
! $latest_auth = '';
! $previous_ver = 0;
! $is_latest = 1;
!
! for($i = 0; $i < count($history); $i++)
! {
! if($latest_auth == '')
! {
! $latest_auth = ($history[$i][3] == '' ? $history[$i][1]
! : $history[$i][3]);
! $latest_ver = $history[$i][2];
! }
!
! if($previous_ver == 0
! && $latest_auth != ($history[$i][3] == '' ? $history[$i][1]
! : $history[$i][3]))
! { $previous_ver = $history[$i][2]; }
!
! if($i < $HistMax || $full)
! {
! $text = $text . html_history_entry($page, $history[$i][2],
! $history[$i][0], $history[$i][1],
! $history[$i][3],
! $previous_ver == $history[$i][2],
! $is_latest, $history[$i][4]);
! }
!
! $is_latest = 0;
! }
!
! if($i >= $HistMax && !$full)
! { $text = $text . html_fullhistory($page, count($history)); }
!
! $p1 = $pagestore->page($page);
! $p1->version = $previous_ver;
! $p2 = $pagestore->page($page);
! $p2->version = $latest_ver;
!
! $diff = diff_compute($p1->read(), $p2->read());
! template_history(array('page' => $page,
! 'history' => $text,
! 'diff' => diff_parse($diff)));
! }
! ?>
--- 1,64 ----
! <?php
! // $Id$
!
! require('parse/main.php');
! require('parse/macros.php');
! require('parse/html.php');
! require('lib/diff.php');
! require(TemplateDir . '/history.php');
! require('lib/headers.php');
!
! // Display the known history of a page's edits.
! function action_history()
! {
! global $pagestore, $page, $full, $HistMax;
!
! $history = $pagestore->history($page);
!
! gen_headers($history[0][0]);
!
! $text = '';
! $latest_auth = '';
! $previous_ver = 0;
! $is_latest = 1;
!
! for($i = 0; $i < count($history); $i++)
! {
! if($latest_auth == '')
! {
! $latest_auth = ($history[$i][3] == '' ? $history[$i][1]
! : $history[$i][3]);
! $latest_ver = $history[$i][2];
! }
!
! if($previous_ver == 0
! && $latest_auth != ($history[$i][3] == '' ? $history[$i][1]
! : $history[$i][3]))
! { $previous_ver = $history[$i][2]; }
!
! if($i < $HistMax || $full)
! {
! $text = $text . html_history_entry($page, $history[$i][2],
! $history[$i][0], $history[$i][1],
! $history[$i][3],
! $previous_ver == $history[$i][2],
! $is_latest, $history[$i][4]);
! }
!
! $is_latest = 0;
! }
!
! if($i >= $HistMax && !$full)
! { $text = $text . html_fullhistory($page, count($history)); }
!
! $p1 = $pagestore->page($page);
! $p1->version = $previous_ver;
! $p2 = $pagestore->page($page);
! $p2->version = $latest_ver;
!
! $diff = diff_compute($p1->read(), $p2->read());
! template_history(array('page' => $page,
! 'history' => $text,
! 'diff' => diff_parse($diff)));
! }
! ?>
Index: macro.php
===================================================================
RCS file: /cvsroot/phpgroupware/wiki/action/macro.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** macro.php 3 Mar 2003 13:00:38 -0000 1.1.1.1
--- macro.php 3 Mar 2003 13:37:05 -0000 1.2
***************
*** 1,17 ****
! <?php
! // $Id$
!
! require('parse/macros.php');
! require('parse/html.php');
!
! // Execute a macro directly from the URL.
! function action_macro()
! {
! global $ViewMacroEngine, $macro, $parms;
!
! if(!empty($ViewMacroEngine[$macro]))
! {
! print $ViewMacroEngine[$macro]($parms);
! }
! }
! ?>
--- 1,17 ----
! <?php
! // $Id$
!
! require('parse/macros.php');
! require('parse/html.php');
!
! // Execute a macro directly from the URL.
! function action_macro()
! {
! global $ViewMacroEngine, $macro, $parms;
!
! if(!empty($ViewMacroEngine[$macro]))
! {
! print $ViewMacroEngine[$macro]($parms);
! }
! }
! ?>
Index: prefs.php
===================================================================
RCS file: /cvsroot/phpgroupware/wiki/action/prefs.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
Index: preview.php
===================================================================
RCS file: /cvsroot/phpgroupware/wiki/action/preview.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
Index: rss.php
===================================================================
RCS file: /cvsroot/phpgroupware/wiki/action/rss.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** rss.php 3 Mar 2003 13:00:38 -0000 1.1.1.1
--- rss.php 3 Mar 2003 13:37:05 -0000 1.2
***************
*** 1,60 ****
! <?php
! // $Id$
!
! require(TemplateDir . '/rss.php');
! require('parse/html.php');
! require('parse/macros.php');
!
! function action_rss()
! {
! global $pagestore, $min, $days;
!
! $itemseq = '';
! $itemdesc = '';
!
! if($min == 0) { $min = 10; }
! if($days == 0) { $days = 2; }
!
! $pages = $pagestore->allpages();
!
! usort($pages, 'catSort');
! $now = time();
!
! for($i = 0; $i < count($pages); $i++)
! {
! $editTime = mktime(substr($pages[$i][0], 8, 2),
! substr($pages[$i][0], 10, 2),
! substr($pages[$i][0], 12, 2),
! substr($pages[$i][0], 4, 2),
! substr($pages[$i][0], 6, 2),
! substr($pages[$i][0], 0, 4));
! if($days >= 0 && ($now - $editTime) > $days * 24 * 60 * 60 && $i >= $min)
! { break; }
!
! $itemseq = $itemseq .
! ' <rdf:li rdf:resource="' .
! viewURL($pages[$i][1], $pages[$i][7]) . '" />' . "\n";
! $itemdesc = $itemdesc .
! ' <item rdf:about="' . viewURL($pages[$i][1],
$pages[$i][7]) . '">' . "\n" .
! ' <title>' . $pages[$i][1] . '</title>' . "\n" .
! ' <link>' . viewURL($pages[$i][1]) . '</link>' . "\n" .
! ' <description>' . $pages[$i][5] . '</description>' .
"\n" .
! ' <dc:date>' . html_gmtime($pages[$i][0]) .
'</dc:date>' . "\n" .
! ' <dc:contributor>' . "\n" .
! ' <rdf:Description wiki:host="' . $pages[$i][2] .
'"'. ($pages[$i][3] == '' ? '' : (' link="' . viewURL($pages[$i][3]) . '"')) .
'>' . "\n" .
! ($pages[$i][3] == '' ? '' : (' <rdf:value>' .
$pages[$i][3] . '</rdf:value>' . "\n")) .
! ' </rdf:Description>' . "\n" .
! ' </dc:contributor>' . "\n" .
! ' <wiki:status>updated</wiki:status>' . "\n" .
! ' <wiki:importance>major</wiki:importance>' . "\n" .
! ' <wiki:diff>' . historyURL($pages[$i][1]) .
'</wiki:diff>' . "\n" .
! ' <wiki:version>' . $pages[$i][7] . '</wiki:version>'
. "\n" .
! ' <wiki:history>' . historyURL($pages[$i][1]) .
'</wiki:history>' . "\n" .
! ' </item>' . "\n";
! }
!
! template_rss(array('itemseq' => $itemseq,
! 'itemdesc' => $itemdesc));
! }
!
! ?>
--- 1,60 ----
! <?php
! // $Id$
!
! require(TemplateDir . '/rss.php');
! require('parse/html.php');
! require('parse/macros.php');
!
! function action_rss()
! {
! global $pagestore, $min, $days;
!
! $itemseq = '';
! $itemdesc = '';
!
! if($min == 0) { $min = 10; }
! if($days == 0) { $days = 2; }
!
! $pages = $pagestore->allpages();
!
! usort($pages, 'catSort');
! $now = time();
!
! for($i = 0; $i < count($pages); $i++)
! {
! $editTime = mktime(substr($pages[$i][0], 8, 2),
! substr($pages[$i][0], 10, 2),
! substr($pages[$i][0], 12, 2),
! substr($pages[$i][0], 4, 2),
! substr($pages[$i][0], 6, 2),
! substr($pages[$i][0], 0, 4));
! if($days >= 0 && ($now - $editTime) > $days * 24 * 60 * 60 && $i >= $min)
! { break; }
!
! $itemseq = $itemseq .
! ' <rdf:li rdf:resource="' .
! viewURL($pages[$i][1], $pages[$i][7]) . '" />' . "\n";
! $itemdesc = $itemdesc .
! ' <item rdf:about="' . viewURL($pages[$i][1],
$pages[$i][7]) . '">' . "\n" .
! ' <title>' . $pages[$i][1] . '</title>' . "\n" .
! ' <link>' . viewURL($pages[$i][1]) . '</link>' . "\n" .
! ' <description>' . $pages[$i][5] . '</description>' .
"\n" .
! ' <dc:date>' . html_gmtime($pages[$i][0]) .
'</dc:date>' . "\n" .
! ' <dc:contributor>' . "\n" .
! ' <rdf:Description wiki:host="' . $pages[$i][2] .
'"'. ($pages[$i][3] == '' ? '' : (' link="' . viewURL($pages[$i][3]) . '"')) .
'>' . "\n" .
! ($pages[$i][3] == '' ? '' : (' <rdf:value>' .
$pages[$i][3] . '</rdf:value>' . "\n")) .
! ' </rdf:Description>' . "\n" .
! ' </dc:contributor>' . "\n" .
! ' <wiki:status>updated</wiki:status>' . "\n" .
! ' <wiki:importance>major</wiki:importance>' . "\n" .
! ' <wiki:diff>' . historyURL($pages[$i][1]) .
'</wiki:diff>' . "\n" .
! ' <wiki:version>' . $pages[$i][7] . '</wiki:version>'
. "\n" .
! ' <wiki:history>' . historyURL($pages[$i][1]) .
'</wiki:history>' . "\n" .
! ' </item>' . "\n";
! }
!
! template_rss(array('itemseq' => $itemseq,
! 'itemdesc' => $itemdesc));
! }
!
! ?>
Index: save.php
===================================================================
RCS file: /cvsroot/phpgroupware/wiki/action/save.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** save.php 3 Mar 2003 13:00:38 -0000 1.1.1.1
--- save.php 3 Mar 2003 13:37:05 -0000 1.2
***************
*** 10,21 ****
{
global $pagestore, $comment, $categories, $archive;
! global $Save, $page, $document, $nextver, $REMOTE_ADDR;
global $MaxPostLen, $UserName, $SaveMacroEngine, $ErrorPageLocked;
if(empty($Save)) // Didn't click the save button.
{
! include('action/preview.php');
! action_preview();
! return;
}
--- 10,23 ----
{
global $pagestore, $comment, $categories, $archive;
! global $Save, $Preview, $SaveAndContinue, $page, $document, $nextver,
$REMOTE_ADDR;
global $MaxPostLen, $UserName, $SaveMacroEngine, $ErrorPageLocked;
if(empty($Save)) // Didn't click the save button.
{
! if(!empty($Preview)) {
! include('action/preview.php');
! action_preview();
! return;
! }
}
***************
*** 66,71 ****
}
! template_save(array('page' => $page,
'text' => $document));
// Process save macros (e.g., to define interwiki entries).
--- 68,77 ----
}
! if ((empty($Save)) and (!empty($SaveAndContinue))) {
! header('Location: ' . editURL($page));
! } else {
! template_save(array('page' => $page,
'text' => $document));
+ }
// Process save macros (e.g., to define interwiki entries).
Index: style.php
===================================================================
RCS file: /cvsroot/phpgroupware/wiki/action/style.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** style.php 3 Mar 2003 13:00:38 -0000 1.1.1.1
--- style.php 3 Mar 2003 13:37:05 -0000 1.2
***************
*** 1,18 ****
! <?php
! // $Id$
!
! // This function emits the current template's stylesheet.
!
! function action_style()
! {
! header("Content-type: text/css");
!
! ob_start();
!
! require(TemplateDir . '/wiki.css');
!
! $size = ob_get_length();
! header("Content-Length: $size");
! ob_end_flush();
! }
!
--- 1,18 ----
! <?php
! // $Id$
!
! // This function emits the current template's stylesheet.
!
! function action_style()
! {
! header("Content-type: text/css");
!
! ob_start();
!
! require(TemplateDir . '/wiki.css');
!
! $size = ob_get_length();
! header("Content-Length: $size");
! ob_end_flush();
! }
!
Index: view.php
===================================================================
RCS file: /cvsroot/phpgroupware/wiki/action/view.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** view.php 3 Mar 2003 13:00:38 -0000 1.1.1.1
--- view.php 3 Mar 2003 13:37:05 -0000 1.2
***************
*** 1,29 ****
! <?php
! // $Id$
!
! require('parse/main.php');
! require('parse/macros.php');
! require('parse/html.php');
! require(TemplateDir . '/view.php');
! require('lib/headers.php');
!
! // Parse and display a page.
! function action_view()
! {
! global $page, $pagestore, $ParseEngine, $version;
!
! $pg = $pagestore->page($page);
! if($version != '')
! { $pg->version = $version; }
! $pg->read();
!
! gen_headers($pg->time);
!
! template_view(array('page' => $page,
! 'html' => parseText($pg->text, $ParseEngine,
$page),
! 'editable' => $pg->mutable,
! 'timestamp' => $pg->time,
! 'archive' => $version != '',
! 'version' => $pg->version));
! }
! ?>
--- 1,29 ----
! <?php
! // $Id$
!
! require('parse/main.php');
! require('parse/macros.php');
! require('parse/html.php');
! require(TemplateDir . '/view.php');
! require('lib/headers.php');
!
! // Parse and display a page.
! function action_view()
! {
! global $page, $pagestore, $ParseEngine, $version;
!
! $pg = $pagestore->page($page);
! if($version != '')
! { $pg->version = $version; }
! $pg->read();
!
! gen_headers($pg->time);
!
! template_view(array('page' => $page,
! 'html' => parseText($pg->text, $ParseEngine,
$page),
! 'editable' => $pg->mutable,
! 'timestamp' => $pg->time,
! 'archive' => $version != '',
! 'version' => $pg->version));
! }
! ?>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: wiki/action admin.php,1.1.1.1,1.2 conflict.php,1.1.1.1,1.2 diff.php,1.1.1.1,1.2 edit.php,1.1.1.1,1.2 find.php,1.1.1.1,1.2 history.php,1.1.1.1,1.2 macro.php,1.1.1.1,1.2 prefs.php,1.1.1.1,1.2 preview.php,1.1.1.1,1.2 rss.php,1.1.1.1,1.2 save.php,1.1.1.1,1.2 style.php,1.1.1.1,1.2 view.php,1.1.1.1,1.2,
Ralf Becker <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: wiki/install configure.pl,1.1.1.1,1.2 create-db.pl,1.1.1.1,1.2 maint.pl,1.1.1.1,1.2 settings.cnf,1.1.1.1,1.2
- Next by Date:
[Phpgroupware-cvs] CVS: wiki/admin index.php,1.1.1.1,1.2
- Previous by thread:
[Phpgroupware-cvs] CVS: wiki/install configure.pl,1.1.1.1,1.2 create-db.pl,1.1.1.1,1.2 maint.pl,1.1.1.1,1.2 settings.cnf,1.1.1.1,1.2
- Next by thread:
[Phpgroupware-cvs] CVS: wiki/admin index.php,1.1.1.1,1.2
- Index(es):