Changeset 735
- Timestamp:
- 09/27/2007 06:19:45 AM (3 years ago)
- Location:
- trunk
- Files:
-
- 2 modified
-
css/wikka.css (modified) (3 diffs)
-
libs/Wakka.class.php (modified) (16 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/css/wikka.css
r730 r735 7 7 /* global styling */ 8 8 9 p, td, li, input, select, textarea{9 body { 10 10 font-family: Verdana, Tahoma, Arial, Helvetica, sans-serif; 11 line-height: 20px;12 11 font-size: 13px; 13 }14 15 form, h1, h2, h3, h4, h5 {16 margin: 0px;17 padding: 0px;18 }19 20 /* page layout */21 22 body {23 font-family: Verdana, Tahoma, Arial, Helvetica, sans-serif; font-size: 13px;24 12 /* text-align: justify; */ /* comment out this line if you really need justified text */ 25 13 line-height: 20px; … … 28 16 margin: 0; 29 17 } 18 19 p, td, li, input, select, textarea { 20 font-family: Verdana, Tahoma, Arial, Helvetica, sans-serif; 21 line-height: 20px; 22 font-size: 13px; 23 } 24 25 form, h1, h2, h3, h4, h5 { 26 margin: 0px; 27 padding: 0px; 28 } 29 30 /* page layout */ 30 31 31 32 .header { … … 236 237 color: #393; 237 238 background-color: #EFE; 239 } 240 241 .hidden { 242 display: none; 238 243 } 239 244 -
trunk/libs/Wakka.class.php
r727 r735 466 466 467 467 $errors = array(); 468 $ result= getMysqlVersion($errors);468 $mysql_version = getMysqlVersion($errors); 469 469 470 470 // report any error encountered retrieving version (like in Query()) … … 1015 1015 * @return string converted string 1016 1016 */ 1017 function hsc_secure($string, $quote_style=ENT_COMPAT)1018 {1019 // init1020 $aTransSpecchar = array('&' => '&',1021 '"' => '"',1022 '<' => '<',1017 function hsc_secure($string, $quote_style=ENT_COMPAT) 1018 { 1019 // init 1020 $aTransSpecchar = array('&' => '&', 1021 '"' => '"', 1022 '<' => '<', 1023 1023 '>' => '>' 1024 1024 ); // ENT_COMPAT set … … 1035 1035 $result = strtr($string,$aTransSpecchar); 1036 1036 return $result; 1037 }1037 } 1038 1038 1039 1039 /** … … 2272 2272 if ($debug) 2273 2273 { 2274 print ($response);2274 print $response; 2275 2275 } 2276 2276 } … … 2288 2288 * @param string $user mandatory: 2289 2289 * @param string $changelog optional: 2290 * @return mixed either an array with the WikiPing-params or FALSE if there was an error 2290 * @return mixed either an array with the WikiPing-params or FALSE 2291 * if retrieving one of the required parameters failed 2291 2292 * @todo move to a dedicated class (plugin) 2292 2293 */ … … 2939 2940 * or without rewrite mode, and without this hidden field! 2940 2941 */ 2941 /* 2942 /* replaced by http://wikkawiki.org/AdvancedFormOpen 2942 2943 function FormOpen($handler='', $tag='', $formMethod='post') 2943 2944 { … … 2992 2993 function FormOpen($handler='', $tag='', $formMethod='post', $id='', $class='', $file=FALSE) 2993 2994 { 2995 // init 2994 2996 $attrMethod = ''; // no method for HTML default 'get' 2995 2997 $attrClass = ''; 2996 2998 $attrEnctype = ''; // default no enctype -> HTML default application/x-www-form-urlencoded 2997 #$hiddenval = '';2999 $hidden = array(); 2998 3000 // derivations 2999 3001 $handler = trim($handler); … … 3004 3006 #$validHandler = $this->existsHandler($handler); 3005 3007 #$validPage = $this->existsPage($tag); 3008 // validation needed only if parameters are actually specified 3006 3009 #$handler = ($validHandler) ? $handler : ''; 3007 3010 if (!empty($handler) && !$this->existsHandler($handler)) … … 3010 3013 } 3011 3014 #$tag = ($validPage) ? $tag : ''; 3012 // @@@ handle complete URL instead of page name here (or as separate param)3013 3015 if (!empty($tag) && !$this->existspage($tag)) 3014 3016 { … … 3017 3019 3018 3020 // form action (action is a required attribute!) 3019 // @@@ handle complete URL instead of handler/pagename here 3020 $attrAction = ' action="'.$this->Href($handler, $tag).'"'; 3021 // !!! If rewrite mode is off, "tag" has to be passed as a hidden field 3022 // rather than part of the URL (where it gets ignored on submit!) 3023 if ($this->GetConfigValue('rewrite_mode')) 3024 { 3025 // @@@ add passed extra GET params here by passing them as extra 3026 // parameter to Href() 3027 $attrAction = ' action="'.$this->Href($handler, $tag).'"'; 3028 } 3029 else 3030 { 3031 $attrAction = ' action="'.$this->Href($handler).'"'; 3032 $hidden['wakka'] = ('' != $tag) ? $tag : $this->tag; 3033 // @@@ add passed extra GET params here by adding them as extra 3034 // entries to $hidden (probably not by adding them to Href() 3035 // but that needs to be tested when we get to it!) 3036 } 3021 3037 // form method (ignore anything but post) and enctype 3022 3038 if (TRUE === $file) … … 3042 3058 3043 3059 // build HTML fragment 3044 $result = '<form'.$attrAction.$attrMethod.$attrEnctype.$attrId.$attrClass.'>'."\n"; 3045 #if (!$this->config['rewrite_mode']) # is this bit really necessary? 3046 #{ 3047 # $hiddenval = $this->MiniHref($method, $page); 3048 # $result .= '<fieldset class="hidden"><input type="hidden" name="wakka" value="'.$hiddenval.'" /></fieldset>'."\n"; 3049 #} 3050 3051 return $result; 3060 $fragment = '<form'.$attrAction.$attrMethod.$attrEnctype.$attrId.$attrClass.'>'."\n"; 3061 // construct and add hidden fields (necessary if we are NOT using rewrite mode) 3062 if (count($hidden) > 0) 3063 { 3064 $fragment .= '<fieldset class="hidden">'."\n"; 3065 foreach ($hidden as $name => $value) 3066 { 3067 $fragment .= ' <input type="hidden" name="'.$name.'" value="'.$value.'" />'."\n"; 3068 } 3069 $fragment .= '</fieldset>'."\n"; 3070 } 3071 3072 // return resulting HTML fragment 3073 return $fragment; 3052 3074 } 3053 3075 /** … … 3103 3125 * Return the full URL of an interwiki for a given shortcut, if in the list. 3104 3126 * 3105 * @param string $name mandatory: the shortcut for the interWiki3127 * @param string $name mandatory: the shortcut for the interWiki 3106 3128 * @param string $tag mandatory: name of a page in the other wiki 3107 3129 * @return string the full URL for $tag or an empty string … … 3131 3153 if (!$tag = trim($tag)) 3132 3154 { 3133 $tag = $this->GetPageTag(); 3155 #$tag = $this->GetPageTag(); 3156 $tag = $this->tag; 3134 3157 } 3135 3158 if (!$referrer = trim($referrer)) … … 3389 3412 return $out; 3390 3413 } 3414 3391 3415 /** 3392 3416 * Add a custom header(s) to be inserted inside the <head> section. … … 4387 4411 * 4388 4412 * @uses Wakka::GetConfigValue() 4389 * @uses Wakka::GetConfigValue()4390 4413 * @uses Wakka::LoadSingle() 4391 4414 * … … 4590 4613 4591 4614 /** 4592 * Determine if the currentuser has specified access for the specified page.4615 * Determine if the (current) user has specified access for the specified page. 4593 4616 * 4594 4617 * Returns true if $username (defaults to current user) has $privilege