From d9a4d7f386f2357d5a415cfddbd33c0ae006e447 Mon Sep 17 00:00:00 2001 From: rurban Date: Thu, 20 Jan 2005 10:18:17 +0000 Subject: [PATCH] reformatting git-svn-id: svn://svn.code.sf.net/p/phpwiki/code/trunk@4394 96ab9672-09ca-45d6-a79d-3d69d39ca109 --- lib/WikiDB.php | 31 ++++++++++++++++++++++--------- lib/main.php | 24 +++++++++++++++--------- 2 files changed, 37 insertions(+), 18 deletions(-) diff --git a/lib/WikiDB.php b/lib/WikiDB.php index eed128d1b..932973244 100644 --- a/lib/WikiDB.php +++ b/lib/WikiDB.php @@ -1,5 +1,5 @@ getBackLinks(); while ($linked_page = $links->next()) { - WikiPlugin_WikiAdminSearchReplace::replaceHelper($this,$linked_page->getName(),$from,$to); + WikiPlugin_WikiAdminSearchReplace::replaceHelper($this, + $linked_page->getName(), + $from, $to); } $links = $newpage->getBackLinks(); while ($linked_page = $links->next()) { - WikiPlugin_WikiAdminSearchReplace::replaceHelper($this,$linked_page->getName(),$from,$to); + WikiPlugin_WikiAdminSearchReplace::replaceHelper($this, + $linked_page->getName(), + $from, $to); } } if ($oldpage->exists() and ! $newpage->exists()) { @@ -1026,13 +1030,16 @@ class WikiDB_Page //$context_lines = max(4, count($other_content) + 1, // count($this_content) + 1); $fmt = new UnifiedDiffFormatter(/*$context_lines*/); - $content = $this->_pagename . " " . $previous . " " . Iso8601DateTime($prevdata['mtime']) . "\n"; - $content .= $this->_pagename . " " . $version . " " . Iso8601DateTime($meta['mtime']) . "\n"; + $content = $this->_pagename . " " . $previous . " " . + Iso8601DateTime($prevdata['mtime']) . "\n"; + $content .= $this->_pagename . " " . $version . " " . + Iso8601DateTime($meta['mtime']) . "\n"; $content .= $fmt->format($diff2); } else { $difflink = WikiURL($this->_pagename,array(),true); - $content = $this->_pagename . " " . $version . " " . Iso8601DateTime($meta['mtime']) . "\n"; + $content = $this->_pagename . " " . $version . " " . + Iso8601DateTime($meta['mtime']) . "\n"; $content .= _("New page"); } $editedby = sprintf(_("Edited by: %s"), $meta['author']); @@ -1054,7 +1061,8 @@ class WikiDB_Page function sendPageRenameNotification($to, &$meta, $emails, $userids) { global $request; if (@is_array($request->_deferredPageRenameNotification)) { - $request->_deferredPageRenameNotification[] = array($this->_pagename, $to, $meta, $emails, $userids); + $request->_deferredPageRenameNotification[] = array($this->_pagename, + $to, $meta, $emails, $userids); } else { $from = $this->_pagename; $editedby = sprintf(_("Edited by: %s"), $meta['author']) . ' ' . $meta['author_id']; @@ -1186,9 +1194,11 @@ class WikiDB_Page * @return WikiDB_PageIterator A WikiDB_PageIterator containing * all matching pages. */ - function getLinks($reversed = true, $include_empty=false, $sortby=false, $limit=false, $exclude=false) { + function getLinks($reversed = true, $include_empty=false, $sortby=false, + $limit=false, $exclude=false) { $backend = &$this->_wikidb->_backend; - $result = $backend->get_links($this->_pagename, $reversed, $include_empty, $sortby, $limit, $exclude); + $result = $backend->get_links($this->_pagename, $reversed, + $include_empty, $sortby, $limit, $exclude); return new WikiDB_PageIterator($this->_wikidb, $result, array('include_empty' => $include_empty, 'sortby' => $sortby, @@ -2125,6 +2135,9 @@ function _sql_debuglog_shutdown_function() { } // $Log: not supported by cvs2svn $ +// Revision 1.121 2005/01/04 20:25:01 rurban +// remove old [%pagedata][_cached_html] code +// // Revision 1.120 2004/12/23 14:12:31 rurban // dont email on unittest // diff --git a/lib/main.php b/lib/main.php index c2ee00f38..4de6e4df5 100644 --- a/lib/main.php +++ b/lib/main.php @@ -1,5 +1,5 @@ version = phpwiki_version(); $this->_user = WikiUser($userid, $this->_user->_prefs); } // revive other db handle - if (isset($this->_user->_prefs->_method) and - ($this->_user->_prefs->_method == 'SQL' or - $this->_user->_prefs->_method == 'ADODB')) + if (isset($this->_user->_prefs->_method) + and ($this->_user->_prefs->_method == 'SQL' + or $this->_user->_prefs->_method == 'ADODB' + or $this->_user->_prefs->_method == 'HomePage')) { $this->_user->_HomePagehandle = $this->getPage($userid); + } // need to update the lockfile filehandle - if ( isa($this->_user,'_FilePassUser') and - $this->_user->_file->lockfile and - !$this->_user->_file->fplock ) + if ( isa($this->_user,'_FilePassUser') + and $this->_user->_file->lockfile + and !$this->_user->_file->fplock ) { //$level = $this->_user->_level; $this->_user = UpgradeUser($this->_user, @@ -179,8 +181,9 @@ $this->version = phpwiki_version(); $this->setArg('auth', false); $this->_handleAuthRequest($auth_args); // possible NORETURN } - elseif ( ! $this->_user or - (isa($this->_user, WikiUserClassname()) and ! $this->_user->isSignedIn())) { + elseif ( ! $this->_user + or (isa($this->_user, WikiUserClassname()) + and ! $this->_user->isSignedIn())) { // If not auth request, try to sign in as saved user. if (($saved_user = $this->getPref('userid')) != false) { $this->_signIn($saved_user); @@ -1191,6 +1194,9 @@ if (!defined('PHPWIKI_NOMAIN') or !PHPWIKI_NOMAIN) // $Log: not supported by cvs2svn $ +// Revision 1.200 2004/12/26 17:08:36 rurban +// php5 fixes: case-sensitivity, no & new +// // Revision 1.199 2004/12/19 00:58:01 rurban // Enforce PASSWORD_LENGTH_MINIMUM in almost all PassUser checks, // Provide an errormessage if so. Just PersonalPage and BogoLogin not. -- 2.45.0