logo       

CVS: phpwiki/lib editpage.php,1.89,1.90: msg#00117

web.wiki.phpwiki.checkins

Subject: CVS: phpwiki/lib editpage.php,1.89,1.90

Update of /cvsroot/phpwiki/phpwiki/lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13074/lib

Modified Files:
editpage.php
Log Message:
fix oldmakrup button label
update pref[edit*] settings



Index: editpage.php
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/lib/editpage.php,v
retrieving revision 1.89
retrieving revision 1.90
diff -u -2 -b -p -d -r1.89 -r1.90
--- editpage.php 21 Jan 2005 14:07:49 -0000 1.89
+++ editpage.php 22 Jan 2005 12:46:15 -0000 1.90
@@ -72,4 +72,12 @@ class PageEditor
$saveFailed = false;
$tokens = &$this->tokens;
+ if (isset($this->request->args['pref']['editWidth'])
+ and ($this->request->getPref('editWidth') !=
$this->request->args['pref']['editWidth'])) {
+ $this->request->_prefs->set('editWidth',
$this->request->args['pref']['editWidth']);
+ }
+ if (isset($this->request->args['pref']['editHeight'])
+ and ($this->request->getPref('editHeight') !=
$this->request->args['pref']['editHeight'])) {
+ $this->request->_prefs->set('editHeight',
$this->request->args['pref']['editHeight']);
+ }

if (! $this->canEdit()) {
@@ -464,5 +472,7 @@ function undo_save() {
$this->_content = $this->getContent();
$newrevision = $page->save($this->_content,
- $this->version == -1 ? -1 :
$this->_currentVersion + 1,
+ $this->version == -1
+ ? -1
+ : $this->_currentVersion + 1,
// force new?
$meta);
@@ -535,11 +545,11 @@ function undo_save() {
/**
* Handle AntiSpam here. How? http://wikiblacklist.blogspot.com/
- * Need to check dynamically some blacklist wikipage settings (plugin
WikiAccessRestrictions)
- * and some static blacklist.
+ * Need to check dynamically some blacklist wikipage settings
+ * (plugin WikiAccessRestrictions) and some static blacklist.
* DONE:
* More then 20 new external links
* content patterns by babycart (only php >= 4.3 for now)
* TODO:
- * IP BlackList
+ * IP blacklist
* domain blacklist
* url patterns
@@ -564,10 +574,12 @@ function undo_save() {
$user = $request->getUser();
include_once("lib/spam_babycart.php");
- if ($babycart = check_babycart($newtext,
$request->get("REMOTE_ADDR"), $user->getId())) {
+ if ($babycart = check_babycart($newtext,
$request->get("REMOTE_ADDR"),
+ $user->getId())) {
// mail the admin?
if (is_array($babycart))
$this->tokens['PAGE_LOCKED_MESSAGE'] =
HTML($this->getSpamMessage(),
- HTML::p(HTML::em(_("SpamAssassin reports: ",
join("\n", $babycart)))));
+ HTML::p(HTML::em(_("SpamAssassin reports: ",
+ join("\n", $babycart)))));
return true;
}
@@ -688,8 +700,6 @@ function undo_save() {
}

- /**
- * TODO: maybe support an uploadfile button.
- */
function getFormElements () {
+ global $WikiTheme;
$request = &$this->request;
$page = &$this->page;
@@ -706,4 +716,5 @@ function undo_save() {
= HTML::input(array('type' => 'text',
'class' => 'wikitext',
+ 'id' => 'edit[summary]',
'name' => 'edit[summary]',
'size' => 50,
@@ -713,4 +724,5 @@ function undo_save() {
= HTML::input(array('type' => 'checkbox',
'name' => 'edit[minor_edit]',
+ 'id' => 'edit[minor_edit]',
'checked' => (bool)
$this->meta['is_minor_edit']));
$el['OLD_MARKUP_CB']
@@ -721,8 +733,10 @@ function undo_save() {
'id' => 'useOldMarkup',
'onclick' =>
'showOldMarkupRules(this.checked)'));
- $el['OLD_MARKUP_CONVERT'] = ($this->meta['markup'] < 2.0) ?
Button('submit:edit[edit_convert]', _("Convert"), 'wikiaction') : '';
+ $el['OLD_MARKUP_CONVERT'] = ($this->meta['markup'] < 2.0)
+ ? Button('submit:edit[edit_convert]', _("Convert"), 'wikiaction')
: '';
$el['LOCKED_CB']
= HTML::input(array('type' => 'checkbox',
'name' => 'edit[locked]',
+ 'id' => 'edit[locked]',
'disabled' => (bool) !$this->user->isadmin(),
'checked' => (bool) $this->locked));
@@ -736,4 +750,21 @@ function undo_save() {
$el['IS_CURRENT'] = $this->version == $this->current->getVersion();

+ $el['WIDTH_PREF'] = HTML::input(array('type' => 'text',
+ 'size' => 3,
+ 'maxlength' => 4,
+ 'class' => "numeric",
+ 'name' => 'pref[editWidth]',
+ 'id' => 'pref[editWidth]',
+ 'value' => $request->getPref('editWidth'),
+ 'onchange' => 'this.form.submit();'));
+ $el['HEIGHT_PREF'] = HTML::input(array('type' => 'text',
+ 'size' => 3,
+ 'maxlength' => 4,
+ 'class' => "numeric",
+ 'name' => 'pref[editHeight]',
+ 'id' => 'pref[editHeight]',
+ 'value' =>
$request->getPref('editHeight'),
+ 'onchange' => 'this.form.submit();'));
+ $el['SEP'] = $WikiTheme->getButtonSeparator();
return $el;
}
@@ -909,4 +940,8 @@ extends PageEditor
/**
$Log$
+ Revision 1.90 2005/01/22 12:46:15 rurban
+ fix oldmakrup button label
+ update pref[edit*] settings
+
Revision 1.89 2005/01/21 14:07:49 rurban
reformatting



-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise