From: Carsten K. <car...@us...> - 2002-01-09 16:57:23
|
Update of /cvsroot/phpwiki/phpwiki/lib In directory usw-pr-cvs1:/tmp/cvs-serv23704 Modified Files: main.php Request.php Log Message: Minor reindenting and rewrapping in emacs. Index: main.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/lib/main.php,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -r1.22 -r1.23 *** main.php 2001/12/28 09:53:15 1.22 --- main.php 2002/01/09 16:57:20 1.23 *************** *** 30,37 **** if (! ZIPDUMP_AUTH and ($action == 'zip' || $action == 'xmldump')) return true; ! return in_array ( $action, array('browse', ! 'info', 'diff', 'search', ! 'edit', 'save', ! 'login', 'logout', 'setprefs') ); } --- 30,37 ---- if (! ZIPDUMP_AUTH and ($action == 'zip' || $action == 'xmldump')) return true; ! return in_array ( $action, array('browse', 'info', ! 'diff', 'search', ! 'edit', 'save', ! 'login', 'logout', 'setprefs') ); } *************** *** 52,56 **** function main ($request) { ! if (USE_PATH_INFO && ! $request->get('PATH_INFO') --- 52,56 ---- function main ($request) { ! if (USE_PATH_INFO && ! $request->get('PATH_INFO') *************** *** 78,82 **** //if ($user->is_authenticated()) // $LogEntry->user = $user->id(); ! // All requests require the database global $dbi; // FIXME: can we keep this non-global? --- 78,82 ---- //if ($user->is_authenticated()) // $LogEntry->user = $user->id(); ! // All requests require the database global $dbi; // FIXME: can we keep this non-global? *************** *** 95,99 **** if (!is_safe_action($action)) $user->must_be_admin($action); ! if (isset($DisabledActions) && in_array($action, $DisabledActions)) ExitWiki(sprintf(_("Action %s is disabled in this wiki."), $action)); --- 95,99 ---- if (!is_safe_action($action)) $user->must_be_admin($action); ! if (isset($DisabledActions) && in_array($action, $DisabledActions)) ExitWiki(sprintf(_("Action %s is disabled in this wiki."), $action)); *************** *** 105,110 **** $ErrorManager->setPostponedErrorMask(E_NOTICE|E_USER_NOTICE); } - switch ($action) { case 'edit': --- 105,110 ---- $ErrorManager->setPostponedErrorMask(E_NOTICE|E_USER_NOTICE); } + switch ($action) { case 'edit': *************** *** 127,131 **** 'absolute_url')); break; ! case 'save': $request->compress_output(); --- 127,131 ---- 'absolute_url')); break; ! case 'save': $request->compress_output(); *************** *** 156,160 **** $xmlwriter = new WikiXmlWriter; $xmlwriter->begin(); ! $xmlwriter->writeComment("PhpWiki " . PHPWIKI_VERSION . " source:\n$RCS_IDS\n"); $xmlwriter->writeDatabase($dbi, $limit); $xmlwriter->end(); --- 156,161 ---- $xmlwriter = new WikiXmlWriter; $xmlwriter->begin(); ! $xmlwriter->writeComment("PhpWiki " . PHPWIKI_VERSION ! . " source:\n$RCS_IDS\n"); $xmlwriter->writeDatabase($dbi, $limit); $xmlwriter->end(); Index: Request.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/lib/Request.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** Request.php 2001/12/11 22:45:38 1.6 --- Request.php 2002/01/09 16:57:20 1.7 *************** *** 8,12 **** $this->_fix_magic_quotes_gpc(); $this->_fix_multipart_form_data(); ! switch($this->get('REQUEST_METHOD')) { case 'GET': --- 8,12 ---- $this->_fix_magic_quotes_gpc(); $this->_fix_multipart_form_data(); ! switch($this->get('REQUEST_METHOD')) { case 'GET': *************** *** 24,30 **** $this->session = new Request_SessionVars; $this->cookies = new Request_CookieVars; ! if (ACCESS_LOG) ! $this->_log_entry = & new Request_AccessLogEntry($this, ACCESS_LOG); $TheRequest = $this; --- 24,31 ---- $this->session = new Request_SessionVars; $this->cookies = new Request_CookieVars; ! if (ACCESS_LOG) ! $this->_log_entry = & new Request_AccessLogEntry($this, ! ACCESS_LOG); $TheRequest = $this; *************** *** 159,163 **** $var = stripslashes($var); } ! function _fix_multipart_form_data () { if (preg_match('|^multipart/form-data|', $this->get('CONTENT_TYPE'))) --- 160,164 ---- $var = stripslashes($var); } ! function _fix_multipart_form_data () { if (preg_match('|^multipart/form-data|', $this->get('CONTENT_TYPE'))) *************** *** 179,183 **** session_start(); } ! function get($key) { $vars = &$GLOBALS['HTTP_SESSION_VARS']; --- 180,184 ---- session_start(); } ! function get($key) { $vars = &$GLOBALS['HTTP_SESSION_VARS']; *************** *** 186,190 **** return false; } ! function set($key, $val) { $vars = &$GLOBALS['HTTP_SESSION_VARS']; --- 187,191 ---- return false; } ! function set($key, $val) { $vars = &$GLOBALS['HTTP_SESSION_VARS']; *************** *** 207,211 **** class Request_CookieVars { ! function get($key) { $vars = &$GLOBALS['HTTP_COOKIE_VARS']; --- 208,212 ---- class Request_CookieVars { ! function get($key) { $vars = &$GLOBALS['HTTP_COOKIE_VARS']; *************** *** 220,224 **** function set($key, $val, $persist_days = false) { $vars = &$GLOBALS['HTTP_COOKIE_VARS']; ! if (is_numeric($persist_days)) { $expires = time() + (24 * 3600) * $persist_days; --- 221,225 ---- function set($key, $val, $persist_days = false) { $vars = &$GLOBALS['HTTP_COOKIE_VARS']; ! if (is_numeric($persist_days)) { $expires = time() + (24 * 3600) * $persist_days; *************** *** 232,236 **** setcookie($key, $packedval, $expires, '/'); } ! function delete($key) { $vars = &$GLOBALS['HTTP_COOKIE_VARS']; --- 233,237 ---- setcookie($key, $packedval, $expires, '/'); } ! function delete($key) { $vars = &$GLOBALS['HTTP_COOKIE_VARS']; *************** *** 243,247 **** function getUploadedFile($postname) { global $HTTP_POST_FILES; ! if (!isset($HTTP_POST_FILES[$postname])) return false; --- 244,248 ---- function getUploadedFile($postname) { global $HTTP_POST_FILES; ! if (!isset($HTTP_POST_FILES[$postname])) return false; *************** *** 332,336 **** $this->logfile = $logfile; ! $this->host = $request->get('REMOTE_HOST'); $this->ident = $request->get('REMOTE_IDENT'); if (!$this->ident) --- 333,337 ---- $this->logfile = $logfile; ! $this->host = $request->get('REMOTE_HOST'); $this->ident = $request->get('REMOTE_IDENT'); if (!$this->ident) *************** *** 339,344 **** $this->time = time(); $this->request = join(' ', array($request->get('REQUEST_METHOD'), ! $request->get('REQUEST_URI'), ! $request->get('SERVER_PROTOCOL'))); $this->status = 200; $this->size = 0; --- 340,345 ---- $this->time = time(); $this->request = join(' ', array($request->get('REQUEST_METHOD'), ! $request->get('REQUEST_URI'), ! $request->get('SERVER_PROTOCOL'))); $this->status = 200; $this->size = 0; *************** *** 388,392 **** } $offhours = floor($offset / 3600); ! $offmins = $offset / 60 - $offhours * 60; return sprintf("%s%02d%02d", $negoffset, $offhours, $offmins); } --- 389,393 ---- } $offhours = floor($offset / 3600); ! $offmins = $offset / 60 - $offhours * 60; return sprintf("%s%02d%02d", $negoffset, $offhours, $offmins); } |