Changeset 736
- Timestamp:
- 10/03/2007 05:56:11 AM (3 years ago)
- Location:
- trunk/actions
- Files:
-
- 40 modified
-
backlinks/backlinks.php (modified) (1 diff)
-
calendar/calendar.php (modified) (1 diff)
-
category/category.php (modified) (1 diff)
-
color/color.php (modified) (4 diffs)
-
colour/colour.php (modified) (1 diff)
-
contact/contact.php (modified) (2 diffs)
-
countcomments/countcomments.php (modified) (1 diff)
-
countowned/countowned.php (modified) (1 diff)
-
countpages/countpages.php (modified) (1 diff)
-
countusers/countusers.php (modified) (1 diff)
-
emailpassword/emailpassword.php (modified) (4 diffs)
-
files/files.php (modified) (15 diffs)
-
flash/flash.php (modified) (2 diffs)
-
geshiversion/geshiversion.php (modified) (2 diffs)
-
googleform/googleform.php (modified) (3 diffs)
-
highscores/highscores.php (modified) (2 diffs)
-
image/image.php (modified) (2 diffs)
-
include/include.php (modified) (4 diffs)
-
interwikilist/interwikilist.php (modified) (1 diff)
-
lastedit/lastedit.php (modified) (5 diffs)
-
lastusers/lastusers.php (modified) (2 diffs)
-
license/license.php (modified) (3 diffs)
-
mindmap/mindmap.php (modified) (3 diffs)
-
mychanges/mychanges.php (modified) (3 diffs)
-
mypages/mypages.php (modified) (5 diffs)
-
mysqlversion/mysqlversion.php (modified) (1 diff)
-
newpage/newpage.php (modified) (4 diffs)
-
nocomments/nocomments.php (modified) (1 diff)
-
orphanedpages/orphanedpages.php (modified) (1 diff)
-
ownedpages/ownedpages.php (modified) (1 diff)
-
pageindex/pageindex.php (modified) (6 diffs)
-
phpversion/phpversion.php (modified) (1 diff)
-
recentlycommented/recentlycommented.php (modified) (2 diffs)
-
rss/rss.php (modified) (3 diffs)
-
table/table.php (modified) (3 diffs)
-
textsearch/textsearch.php (modified) (5 diffs)
-
wantedpages/wantedpages.php (modified) (2 diffs)
-
wikkachanges/wikkachanges.php (modified) (1 diff)
-
wikkaname/wikkaname.php (modified) (1 diff)
-
wikkaversion/wikkaversion.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/actions/backlinks/backlinks.php
r369 r736 1 <?php1 <?php 2 2 /** 3 3 * Display the pages linking to the current page. 4 * 5 * If there is at least one other page in the wiki, which links to 6 * the current page, the name(s) are shown as a simple list, 4 * 5 * If there is at least one other page in the wiki, which links to 6 * the current page, the name(s) are shown as a simple list, 7 7 * ordered alphabetically. 8 * 8 * 9 9 * @package Actions 10 10 * @version $Id$ 11 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License11 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 12 12 * @filesource 13 * 13 * 14 14 * @output a list of the pages linking to the page 15 15 * @uses Wakka::Link() -
trunk/actions/calendar/calendar.php
r369 r736 16 16 * This action was inspired mainly by the "Calendar Menu" code written by 17 17 * {@link http://www.blazonry.com/about.php Marcus Kazmierczak} 18 * ( © 1998-2002 Astonish Inc.) which we traced back as being the ultimate origin of this code18 * (© 1998-2002 Astonish Inc.) which we traced back as being the ultimate origin of this code 19 19 * although our starting point was actually a (probably second-hand) variant found on the web which 20 20 * did not contain any attribution. -
trunk/actions/category/category.php
r633 r736 1 <?php1 <?php 2 2 /** 3 3 * Shows the pages and subcategories belonging to a category. -
trunk/actions/color/color.php
r583 r736 1 <?php1 <?php 2 2 /** 3 3 * Render a string as colored text. … … 49 49 if (!defined ('PATTERN_VALID_HEX_COLOR')) define('PATTERN_VALID_HEX_COLOR', '#(?>[\da-f]{3}){1,2}'); 50 50 if (!defined ('PATTERN_VALID_RGB_COLOR')) define('PATTERN_VALID_RGB_COLOR', 'rgb\(\s*\d+((?>\.\d*)?%)?\s*(?>,\s*\d+(?(1)(\.\d*)?%)\s*){2}\)'); 51 $ht lm_color_names = array('aliceblue', 'antiquewhite', 'aqua', 'aquamarine', 'azure', 'beige', 'bisque', 'black', 'blanchedalmond', 'blue',51 $html_color_names = array('aliceblue', 'antiquewhite', 'aqua', 'aquamarine', 'azure', 'beige', 'bisque', 'black', 'blanchedalmond', 'blue', 52 52 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflower', 'cornsilk', 'crimson', 'cyan', 53 53 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', … … 67 67 'threeddarkshadow', 'threedface', 'threedhighlight', 'threedlightshadow', 'threedshadow', 'window', 'windowframe', 'windowtext'); 68 68 $syntax = trim(strtolower($syntax)); 69 if (in_array($syntax, $ht lm_color_names))69 if (in_array($syntax, $html_color_names)) 70 70 { 71 71 return($syntax); … … 87 87 if (is_array($vars)) 88 88 { 89 foreach ($vars as $param => $value) 89 foreach ($vars as $param => $value) 90 90 { 91 91 if ($param == 'text') -
trunk/actions/colour/colour.php
r684 r736 1 <?php 1 <?php 2 2 /** 3 3 * Synonym for color.php. 4 * 4 * 5 5 * @see color.php 6 * 6 * 7 7 * @package Actions 8 8 * @version $Id:colour.php 369 2007-03-01 14:38:59Z DarTar $ 9 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License9 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 10 10 * @filesource 11 11 */ -
trunk/actions/contact/contact.php
r369 r736 1 <?php1 <?php 2 2 /** 3 * Print a spam-safe mailto: link to the administrator's email address. 4 * 3 * Print a spam-safe mailto: link to the administrator's email address. 4 * 5 5 * @package Actions 6 6 * @version $Id$ 7 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License7 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 8 8 * @filesource 9 * 9 * 10 10 * @uses Wakka::GetConfigValue() 11 11 */ … … 15 15 // print spam-safe mailto link 16 16 $patterns = array("'@'", "'\.'"); 17 $replace = array("[at]", "[dot]"); 17 $replace = array("[at]", "[dot]"); 18 18 echo '<a href="mailto:'.preg_replace($patterns, $replace, $email).'" title="'.SEND_FEEDBACK_LINK_TITLE.'">'.SEND_FEEDBACK_LINK_TEXT.'</a>'; 19 19 -
trunk/actions/countcomments/countcomments.php
r531 r736 1 <?php1 <?php 2 2 /** 3 3 * Print total number of comments in this wiki. 4 * 4 * 5 5 * @package Actions 6 6 * @version $Id$ 7 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License7 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 8 8 * @filesource 9 * 9 * 10 10 * @uses Wakka::getCount() 11 11 */ -
trunk/actions/countowned/countowned.php
r616 r736 1 <?php1 <?php 2 2 /** 3 3 * Print number of pages owned by the current user. 4 * 4 * 5 5 * @package Actions 6 6 * @version $Id$ 7 7 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 8 8 * @filesource 9 * 9 * 10 10 * @uses Wakka::GetUserName() 11 11 * @uses Wakka::getCount() -
trunk/actions/countpages/countpages.php
r531 r736 1 <?php2 /** 1 <?php 2 /** 3 3 * Print the total number of pages in this wiki. 4 * 4 * 5 5 * @package Actions 6 6 * @version $Id$ 7 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License7 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 8 8 * @filesource 9 * 9 * 10 10 * @uses Wakka::getCount() 11 11 * @uses Wakka::Link() -
trunk/actions/countusers/countusers.php
r531 r736 1 <?php1 <?php 2 2 /** 3 3 * Print number of registered users. 4 * 4 * 5 5 * @package Actions 6 6 * @version $Id$ 7 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License7 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 8 8 * @filesource 9 * 9 * 10 10 * @uses Wakka::getCount() 11 */ 11 */ 12 12 13 13 echo $this->getCount('users'); -
trunk/actions/emailpassword/emailpassword.php
r700 r736 1 <?php2 /** 1 <?php 2 /** 3 3 * Send the user a reminder with the md5 checksum of his or her password via email. 4 * 4 * 5 5 * @package Actions 6 6 * @version $Id:emailpassword.php 369 2007-03-01 14:38:59Z DarTar $ 7 * @license http://comawiki.martignier.net/LizenzenUndBedingungen8 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License7 * @license http://comawiki.martignier.net/LizenzenUndBedingungen 8 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 9 9 * @filesource 10 * 10 * 11 11 * @author {@link http://comawiki.martignier.net Costal Martignier} initial action 12 12 * @author {@link http://wikkawiki.org/NilsLindenberg Nils Lindenberg} rewritten 13 13 * @author {@link http://wikkawiki.org/DarTar Dario Taraborelli} further cleanup, error styling and improved logical structure 14 * 14 * 15 15 * @uses Wakka::Format() 16 16 * @uses Wakka::loadUserData() 17 17 * @uses Wakka::FormOpen() 18 18 * @uses Wakka::FormClose() 19 */ 19 */ 20 20 21 21 /** … … 40 40 #$user = $this->LoadUser($input); 41 41 $user = $this->loadUserData($input); 42 42 43 43 switch(TRUE) 44 44 { … … 63 63 $output .= $this->Format(sprintf(USERSETTINGS_REF,$usersettings_wlink)); 64 64 } 65 else 65 else 66 66 { 67 67 $output .= '<em class="error">'.ERROR_MAIL_NOT_SENT.'</em><br />'."\n"; … … 81 81 $output .= '<input type="submit" value="'.BUTTON_SEND_PW.'" />'."\n"; 82 82 $output .= '</fieldset>'."\n"; 83 $output .= $this->FormClose(); 83 $output .= $this->FormClose(); 84 84 } 85 85 -
trunk/actions/files/files.php
r719 r736 2 2 /** 3 3 * Display a form with file attachments to the current page. 4 * 5 * This actions displays a form allowing users to download files uploaded to wiki pages. By default only 4 * 5 * This actions displays a form allowing users to download files uploaded to wiki pages. By default only 6 6 * wiki admins can upload and delete files. If the intranet mode option is enabled, any user with write access 7 * to the current page can upload or remove file attachments. If the optional download parameter is set, a simple 7 * to the current page can upload or remove file attachments. If the optional download parameter is set, a simple 8 8 * download link is displayed for the specified file. 9 9 * … … 12 12 * @package Actions 13 13 * @version $Id:files.php 369 2007-03-01 14:38:59Z DarTar $ 14 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License14 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 15 15 * @filesource 16 * 16 * 17 17 * @author Victor Manuel Varela (original code) 18 18 * @author {@link http://wikkawiki.org/CryDust CryDust} (code overhaul, stylesheet) 19 19 * @author {@link http://wikkawiki.org/DarTar Dario Taraborelli} (code cleanup, defaults, i18n, added intranet mode) 20 20 * @author {@link http://wikkawiki.org/NilsLindenberg Nils Lindenberg} (i18n) 21 * 21 * 22 22 * @input string $download optional: prints a link to the file specified in the string 23 23 * string $text optional: a text for the link provided with the download parameter … … 32 32 * @todo security: check file type, not only extension 33 33 * @todo use buttons instead of links for file deletion; #72 comment 7 34 * @todo similarly replace download link with POST form button -> files handler 34 * @todo similarly replace download link with POST form button -> files handler 35 35 * can then use only $_POST instead of $_GET 36 36 * @todo replace $_REQUEST in files handler with $_POST / $_GET; #72, #312 … … 41 41 * @todo add support for file versioning; 42 42 * @todo add (AJAX-powered?) confirmation check on file deletion; 43 * @todo integrate file table in page template, àla Wacko;43 * @todo integrate file table in page template, a la Wacko; 44 44 */ 45 45 … … 57 57 if(!defined('MAX_UPLOAD_SIZE')) define('MAX_UPLOAD_SIZE', 2097152); 58 58 /** Pipe-separated list of allowed file extensions */ 59 if(!defined('ALLOWED_FILE_EXTENSIONS')) define('ALLOWED_FILE_EXTENSIONS', 'gif|jpeg|jpg|jpe|png|doc|xls|csv|ppt|ppz|pps|pot|pdf|asc|txt|zip|gtar|gz|bz2|tar|rar|vpp|mpp|vsd|mm|htm|html'); # 3459 if(!defined('ALLOWED_FILE_EXTENSIONS')) define('ALLOWED_FILE_EXTENSIONS', 'gif|jpeg|jpg|jpe|png|doc|xls|csv|ppt|ppz|pps|pot|pdf|asc|txt|zip|gtar|gz|bz2|tar|rar|vpp|mpp|vsd|mm|htm|html'); # #34 60 60 /** Displayed date format */ 61 if(!defined('UPLOAD_DATE_FORMAT')) define('UPLOAD_DATE_FORMAT', 'Y-m-d H:i'); //TODO use general config settings for date format 61 if(!defined('UPLOAD_DATE_FORMAT')) define('UPLOAD_DATE_FORMAT', 'Y-m-d H:i'); //TODO use general config settings for date format 62 62 /** Sort routines */ 63 63 if(!defined('SORT_BY_FILENAME')) define('SORT_BY_FILENAME', 'filename'); … … 93 93 { 94 94 global $wakka; 95 switch(TRUE) 95 switch(TRUE) 96 96 { 97 97 case ($wakka->IsAdmin()): … … 113 113 function mkdir_r ($dir) 114 114 { 115 if (strlen($dir) == 0) 115 if (strlen($dir) == 0) 116 116 { 117 117 return 0; 118 118 } 119 if (is_dir($dir)) 119 if (is_dir($dir)) 120 120 { 121 121 return 1; … … 170 170 $this->SetConfigValue('upload_path','files'); 171 171 } 172 $upload_path = $this->GetConfigValue('upload_path').DIRECTORY_SEPARATOR.$this->tag; # 89172 $upload_path = $this->GetConfigValue('upload_path').DIRECTORY_SEPARATOR.$this->tag; # #89 173 173 174 174 // 1. check if main upload path is writable … … 185 185 if (isset($vars['download'])) 186 186 { 187 if (file_exists($upload_path.DIRECTORY_SEPARATOR.$vars['download'])) # 89187 if (file_exists($upload_path.DIRECTORY_SEPARATOR.$vars['download'])) # #89 188 188 { 189 189 if (!isset($vars['text'])) … … 220 220 // get upload results 221 221 #if ($is_writable && isset($_POST['action']) && $_POST['action'] == 'upload' && userCanUpload()) #38 222 if ($is_writable && isset($_POST['upload']) && $_POST['upload'] == 'Upload' && userCanUpload()) # 38 #i18n222 if ($is_writable && isset($_POST['upload']) && $_POST['upload'] == 'Upload' && userCanUpload()) # #38 #i18n 223 223 { 224 224 switch ($_FILES['file']['error']) … … 261 261 case UPLOAD_ERR_INI_SIZE: 262 262 case UPLOAD_ERR_FORM_SIZE: 263 $error_msg = sprintf(ERROR_FILE_TOO_BIG, bytesToHumanReadableUsage($max_upload_size)); 263 $error_msg = sprintf(ERROR_FILE_TOO_BIG, bytesToHumanReadableUsage($max_upload_size)); 264 264 break; 265 265 case UPLOAD_ERR_PARTIAL: … … 284 284 // 4. display attached files table 285 285 if (is_readable($upload_path)) 286 { 286 { 287 287 $is_readable = TRUE; 288 288 $dir = opendir($upload_path); … … 313 313 $sortby = $_GET['sortby']; 314 314 } 315 switch($sortby) 316 { 317 case SORT_BY_DATE : 315 switch($sortby) 316 { 317 case SORT_BY_DATE : 318 318 array_multisort($dateArr, SORT_ASC, SORT_NUMERIC, $filenameArr, $sizeArr); 319 319 break; 320 case SORT_BY_SIZE : 320 case SORT_BY_SIZE : 321 321 array_multisort($sizeArr, SORT_ASC, SORT_NUMERIC, $filenameArr, $dateArr); 322 322 break; 323 case SORT_BY_FILENAME: 323 case SORT_BY_FILENAME: 324 324 default: 325 325 array_multisort($filenameArr, SORT_ASC, SORT_STRING, $dateArr, $sizeArr); … … 343 343 $download_link = '<a href="' .$this->Href('files.xml',$this->tag,'action=download&file='.rawurlencode($file)) 344 344 .'" title="'.sprintf(DOWNLOAD_LINK_TITLE, $file).'">'.urldecode($file).'</a>'; 345 $size = bytesToHumanReadableUsage($filesize); # 89346 $date = date(UPLOAD_DATE_FORMAT, $filedate); # 89345 $size = bytesToHumanReadableUsage($filesize); # #89 346 $date = date(UPLOAD_DATE_FORMAT, $filedate); # #89 347 347 348 348 $output_files .= '<tr>'."\n"; … … 383 383 else 384 384 { 385 echo '<div class="alertbox">'.sprintf(ERROR_UPLOAD_DIRECTORY_NOT_READABLE, '<tt>'.$upload_path.'</tt>').'</div>'; # 89385 echo '<div class="alertbox">'.sprintf(ERROR_UPLOAD_DIRECTORY_NOT_READABLE, '<tt>'.$upload_path.'</tt>').'</div>'; # #89 386 386 387 387 } -
trunk/actions/flash/flash.php
r639 r736 1 <?php1 <?php 2 2 /** 3 3 * Embed a Flash object in a wiki page. 4 * 4 * 5 5 * Example: {{flash url="http://example.com/example.swf" [width=x] [height=x]}} 6 6 * … … 10 10 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 11 11 * @filesource 12 * 12 * 13 13 * @uses Wakka::cleanUrl() 14 14 * @uses Wakka::StaticHref() -
trunk/actions/geshiversion/geshiversion.php
r685 r736 1 <?php1 <?php 2 2 /** 3 3 * Display current GeSHi version. … … 5 5 * @package Actions 6 6 * @version $Id$ 7 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License7 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 8 8 * @filesource 9 9 * -
trunk/actions/googleform/googleform.php
r717 r736 1 <?php1 <?php 2 2 /** 3 3 * Display a searchbox for searching google. … … 37 37 38 38 // *** param section *** 39 if (is_array($vars)) 39 if (is_array($vars)) 40 40 { 41 foreach ($vars as $param => $value) 41 foreach ($vars as $param => $value) 42 42 { 43 43 if ($param == 'q') … … 61 61 ?> 62 62 <form action="http://www.google.com/search" method="get" target="_blank"> 63 <input type="text" value="<?php echo $query; ?>" name="q" size="30" maxlength="2048" class="WBselectonfocus" /> 63 <input type="text" value="<?php echo $query; ?>" name="q" size="30" maxlength="2048" class="WBselectonfocus" /> 64 64 <input name="btnG" type="submit" value="<?php echo GOOGLE_BUTTON;?>" /> 65 65 <?php echo $this->FormClose(); ?> -
trunk/actions/highscores/highscores.php
r641 r736 1 <?php1 <?php 2 2 /** 3 3 * Displays a list of users, ranked after their ownership of pages in the wiki. 4 * 4 * 5 5 * @package Actions 6 6 * @version $Id$ 7 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License7 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 8 8 * @filesource 9 9 * 10 10 * @author Chris Tessmer (19 Dec 2002) 11 * 11 * 12 12 * @uses Wakka::Query() 13 13 * @uses Wakka::getCount() … … 30 30 $i = 0; 31 31 while($row = mysql_fetch_array($rankQuery)) 32 { 33 $i++;34 $str = '<tr>';35 $str .= "<td>$i. </td>";36 $str .= '<td>'.$this->Link($row["name"]).'</td>';37 $str .= '<td> </td>';38 $str .= '<td> </td>';39 $str .= '<td>'.$row["cnt"].'</td>';40 $str .= '<td> </td>';41 $str .= '<td>'.round(($row["cnt"]/$total)*100, 2).'% </td>';42 $str .= '</tr>';43 print($str);32 { 33 $i++; 34 $str = '<tr>'; 35 $str .= "<td>$i. </td>"; 36 $str .= '<td>'.$this->Link($row["name"]).'</td>'; 37 $str .= '<td> </td>'; 38 $str .= '<td> </td>'; 39 $str .= '<td>'.$row["cnt"].'</td>'; 40 $str .= '<td> </td>'; 41 $str .= '<td>'.round(($row["cnt"]/$total)*100, 2).'% </td>'; 42 $str .= '</tr>'; 43 print($str); 44 44 } 45 45 print("</table></blockquote>"); -
trunk/actions/image/image.php
r642 r736 1 <?php1 <?php 2 2 /** 3 3 * Display an image. 4 * 4 * 5 5 * @package Actions 6 6 * @version $Id$ 7 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License7 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 8 8 * @filesource 9 * 9 * 10 10 * @uses Wakka::Link() 11 11 * @uses Wakka::ReturnSafeHTML() … … 29 29 if (is_array($vars)) 30 30 { 31 foreach ($vars as $param => $value)32 {33 if ($param == 'src' and $vars['url'] == '') {$vars['url']=$value;}34 if ($param == 'title') {$title = $this->htmlspecialchars_ent($vars['title']);}35 if ($param == 'class') {$class = $this->htmlspecialchars_ent($vars['class']);}36 if ($param == 'alt') {$alt = $this->htmlspecialchars_ent($vars['alt']);}37 if ($param == 'link') {$link = $this->htmlspecialchars_ent($vars['link']);}31 foreach ($vars as $param => $value) 32 { 33 if ($param == 'src' and $vars['url'] == '') {$vars['url']=$value;} 34 if ($param == 'title') {$title = $this->htmlspecialchars_ent($vars['title']);} 35 if ($param == 'class') {$class = $this->htmlspecialchars_ent($vars['class']);} 36 if ($param == 'alt') {$alt = $this->htmlspecialchars_ent($vars['alt']);} 37 if ($param == 'link') {$link = $this->htmlspecialchars_ent($vars['link']);} 38 38 } 39 39 } -
trunk/actions/include/include.php
r623 r736 1 <?php1 <?php 2 2 /** 3 3 * Include another wikipage. 4 * 4 * 5 5 * Circular references are detected and prevented. This action sets a value $this->_included_page 6 6 * which holds the name of the page being included. If such page, when formatted, needs the name … … 16 16 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 17 17 * @filesource 18 * 18 * 19 19 * @uses Wakka::HasAccess() 20 20 * @uses Wakka::LoadPage() … … 53 53 if (!in_array($page, $this->included_pages)) 54 54 { 55 if ($this->HasAccess('read', $page)) 55 if ($this->HasAccess('read', $page)) 56 56 { 57 57 $this->included_pages[] = $page; … … 62 62 unset($this->_included_page); 63 63 } 64 } 64 } 65 65 else 66 66 { -
trunk/actions/interwikilist/interwikilist.php
r369 r736 1 <?php1 <?php 2 2 /** 3 3 * Echos the list of InterWiki shortcuts. 4 * 4 * 5 5 * @package Actions 6 6 * @version $Id$ 7 7 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 8 8 * @filesource 9 * 9 * 10 10 * @uses Wakka::Format 11 11 */ -
trunk/actions/lastedit/lastedit.php
r700 r736 1 <?php1 <?php 2 2 /** 3 3 * Display a box with information on the last edit. … … 5 5 * @package Actions 6 6 * @version $Id:lastedit.php 369 2007-03-01 14:38:59Z DarTar $ 7 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License7 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 8 8 * @filesource 9 9 * … … 25 25 * @uses Wakka::htmlspecialchars_ent() 26 26 * @uses Wakka::FormatUser() 27 * 27 * 28 28 * @todo make date/time format system-configurable; 29 29 */ … … 40 40 define('LASTEDIT_NOTES', 'lastedit_notes'); 41 41 42 if (!isset($show)) 42 if (!isset($show)) 43 43 { 44 44 $show = DEFAULT_SHOW; 45 45 } 46 46 47 if ($this->handler == 'show') 47 if ($this->handler == 'show') 48 48 { 49 49 $page = $this->page; … … 68 68 $this->htmlspecialchars_ent($page['note']).'</span>' : ''; 69 69 70 default: 70 default: 71 71 } 72 72 echo '<div class="'.LASTEDIT_BOX.'">'.sprintf(LASTEDIT_DESC, $user).$note.'<br /> '.$dateformatted.' '.$timeformatted.$difflink.'</div>'; -
trunk/actions/lastusers/lastusers.php
r686 r736 1 <?php1 <?php 2 2 /** 3 3 * Display a list of newly registered users. 4 * 4 * 5 5 * @package Actions 6 6 * @version $Id:lastusers.php 369 2007-03-01 14:38:59Z DarTar $ 7 7 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 8 8 * @filesource 9 * 9 * 10 10 * @uses Wakka::LoadAll() 11 11 * @uses Wakka::getCount() 12 12 * @uses Wakka::Link() 13 * 13 * 14 14 * @todo document usage and parameters 15 15 * @todo needs to be rewritten following coding guidelines; … … 32 32 "<caption>".LASTUSERS_CAPTION."</caption>"."\n". 33 33 " <tr>\n". 34 " <th>".NAME_TH."</th>\n".35 " <th>".OWNED_PAGES_TH."</th>\n".36 " <th>".SIGNUP_DATE_TIME_TH."</th>\n".34 " <th>".NAME_TH."</th>\n". 35 " <th>".OWNED_PAGES_TH."</th>\n". 36 " <th>".SIGNUP_DATE_TIME_TH."</th>\n". 37 37 " </tr>\n"; 38 38 -
trunk/actions/license/license.php
r685 r736 3 3 * Display the full text of a license. 4 4 * 5 * This action displays the full text of a number of licenses. The license type 5 * This action displays the full text of a number of licenses. The license type 6 6 * can be specified through a $type action parameter. 7 7 * … … 11 11 * @since Wikka 1.1.7 12 12 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 13 * @filesource 13 * @filesource 14 14 * * 15 15 * @uses Wakka::Format() … … 62 62 $license_text = LGPL_FULL_TEXT; 63 63 break; 64 64 65 65 default: 66 66 case 'GPL': -
trunk/actions/mindmap/mindmap.php
r685 r736 1 <?php1 <?php 2 2 /** 3 3 * Embed a mindmap in the current page. 4 * 4 * 5 5 * @package Actions 6 6 * @version $Id$ 7 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License7 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 8 8 * @filesource 9 * 9 * 10 10 * @uses Wakka::cleanUrl() 11 11 * @uses Wakka::htmlspecialchars_ent() … … 41 41 42 42 // output 43 if ($mindmap_url) 43 if ($mindmap_url) 44 44 { 45 45 // set up template variables 46 46 $jre_download_link = '<a href="'.WIKKA_JRE_DOWNLOAD_URL.'">'.WIKKA_JRE_LINK_DESC.'</a>'; 47 47 $jre_install_req = sprintf(MM_JRE_INSTALL_REQ,$jre_download_link); 48 $jre_install_req_js = str_replace(array('\\', '\'', "\r", "\n"), array('\\\\', '\\\'', '', '\\n'), $jre_install_req); 48 $jre_install_req_js = str_replace(array('\\', '\'', "\r", "\n"), array('\\\\', '\\\'', '', '\\n'), $jre_install_req); 49 49 $freemind_link = '<a href="'.FREEMIND_PROJECT_URL.'">Freemind</a>'; 50 50 … … 89 89 // display template 90 90 echo $mm_template; 91 } 92 else 91 } 92 else 93 93 { 94 94 echo '<em class="error">'.ERROR_INVALID_MM_SYNTAX.'<br />'.sprintf(PROPER_USAGE_MM_SYNTAX,SAMPLE_SYNTAX1,SAMPLE_SYNTAX2).'</em>'; -
trunk/actions/mychanges/mychanges.php
r700 r736 1 <?php1 <?php 2 2 /** 3 3 * Display a list of pages edited by the current user. 4 * 5 * If the current user is logged-in and has edited at least one page, a list of pages edited by the current user 4 * 5 * If the current user is logged-in and has edited at least one page, a list of pages edited by the current user 6 6 * is displayed, ordered alphabetically or by date and time (last edit first). 7 * 7 * 8 8 * @package Actions 9 9 * @version $Id:mychanges.php 369 2007-03-01 14:38:59Z DarTar $ 10 10 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 11 11 * @filesource 12 * 12 * 13 13 * @author {@link http://web.archive.org/web/20040616194824/http://www.wakkawiki.com/CarloZottmann Carlo Zottmann} 14 14 * @author {@link http://wikkawiki.org/NilsLindenberg Nils Lindenberg} (rewrite, i18n) 15 * 15 * 16 16 * @uses Wakka::existsUser() 17 17 * @uses Wakka::GetUserName() … … 60 60 AND latest = 'Y' 61 61 ORDER BY ".$order; 62 62 63 63 if ($pages = $this->LoadAll($query)) 64 64 { 65 65 $current = ''; 66 66 67 67 // build the list of pages 68 foreach ($pages as $page) 68 foreach ($pages as $page) 69 69 { 70 70 // order alphabetically … … 77 77 } 78 78 79 if ($firstChar != $current) 79 if ($firstChar != $current) 80 80 { 81 81 if ($current) $output .= "<br />\n"; -
trunk/actions/mypages/mypages.php
r700 r736 1 <?php1 <?php 2 2 /** 3 3 * Display a list of pages owned by the current user. 4 * 4 * 5 5 * If the current user is logged-in and owns at least one page, a list of pages owned by the current user 6 6 * is displayed, ordered alphabetically or by date and time (last edit first). … … 16 16 * @uses Wakka::existsUser() 17 17 * @uses Wakka::LoadPagesByOwner() 18 * @uses Wakka::GetUserName() 18 * @uses Wakka::GetUserName() 19 19 * @uses Wakka::Link() 20 20 * @todo fix RE (#104 etc.); also lose the comma in there! … … 34 34 foreach ($pages as $page) 35 35 { 36 //if ($this->GetUserName() == $page["owner"]) 36 //if ($this->GetUserName() == $page["owner"]) 37 37 //{ 38 38 $firstChar = strtoupper($page["tag"][0]); … … 42 42 } 43 43 44 if ($firstChar != $curChar) 44 if ($firstChar != $curChar) 45 45 { 46 46 if ($curChar) print("<br />\n"); … … 50 50 51 51 echo $this->Link($page['tag'])."<br />\n"; 52 52 53 53 //} 54 54 } 55 55 56 56 } 57 57 else -
trunk/actions/mysqlversion/mysqlversion.php
r369 r736 1 <?php1 <?php 2 2 /** 3 3 * Display current MySQL version. 4 * 4 * 5 5 * @package Actions 6 6 * @version $Id$ -
trunk/actions/newpage/newpage.php
r507 r736 2 2 /** 3 3 * Display a form to create a new page. 4 * 5 * @package Actions4 * 5 * @package Actions 6 6 * @version $Id:newpage.php 369 2007-03-01 14:38:59Z DarTar $ 7 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License7 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 8 8 * @filesource 9 * 9 * 10 10 * @author {@link http://www.comawiki.org/CoMa.php?CoMa=Costal_Martignier Costal Martignier} (initial version) 11 11 * @author {@link http://wikkawiki.org/JsnX JsnX} (modified 2005-1-17) 12 12 * @author {@link http://wikkawiki.org/JavaWoman JavaWoman} (modified 2005-1-17) 13 * 13 * 14 14 * @uses Wakka::Redirect() 15 15 * @uses Wakka::FormOpen() 16 16 * @uses Wakka::FormClose() 17 17 * @filesource 18 * 18 * 19 19 * @todo user central regex library #34 20 20 */ … … 26 26 $pagename = $_POST['pagename']; 27 27 28 if (!(preg_match("/^[A-ZÄÖÜ]+[a-zßäöü]+[A-Z0-9ÄÖÜ][A-Za-z0-9ÄÖÜßäöü]*$/s", $pagename))) #34 (use !IsWikiName()) 28 if (!(preg_match("/^[A-ZÄÖÜ]+[a-zßäöü]+[A-Z0-9ÄÖÜ][A-Za-z0-9ÄÖÜßäöü]*$/s", $pagename))) #34 (use !IsWikiName()) 29 29 { 30 30 echo '<em class="error">'.sprintf(WIKKA_ERROR_INVALID_PAGE_NAME, $pagename).'</em>'; … … 32 32 else if ($this->ExistsPage($pagename)) 33 33 { 34 echo '<em class="error">'.WIKKA_ERROR_PAGE_ALREADY_EXIST.'</em>'; 34 echo '<em class="error">'.WIKKA_ERROR_PAGE_ALREADY_EXIST.'</em>'; 35 35 } 36 else 36 else 37 37 { 38 38 $url = $this->Href('edit', $pagename); … … 46 46 <?php echo $this->FormOpen(); ?> 47 47 <fieldset class="newpage"><legend><?php echo NEWPAGE_CREATE_LEGEND; ?></legend> 48 <input type="text" name="pagename" size="40" value="<?php echo $pagename; ?>" /> 48 <input type="text" name="pagename" size="40" value="<?php echo $pagename; ?>" /> 49 49 <input type="submit" value="<?php echo NEWPAGE_CREATE_BUTTON; ?>" /> 50 50 </fieldset> 51 <?php echo $this->FormClose(); 52 } 51 <?php echo $this->FormClose(); 52 } 53 53 ?> -
trunk/actions/nocomments/nocomments.php
r614 r736 1 <?php 1 <?php 2 2 /** 3 3 * Disable comments on the current page. 4 * 4 * 5 5 * @package Actions 6 6 * @version $Id$ 7 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License7 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 8 8 * @filesource 9 9 */ -
trunk/actions/orphanedpages/orphanedpages.php
r645 r736 2 2 /** 3 3 * Display a list of orphaned pages, i.e. pages with no links from other pages. 4 * 5 * @package Actions4 * 5 * @package Actions 6 6 * @version $Id$ 7 7 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 8 8 * @filesource 9 * 9 * 10 10 * @uses Wakka::LoadOrphanedPages() 11 11 * @uses Wakka::Link() -
trunk/actions/ownedpages/ownedpages.php
r700 r736 2 2 /** 3 3 * Display the number and percentage of pages owned by the current user. 4 * 5 * @package Actions4 * 5 * @package Actions 6 6 * @version $Id$ 7 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License7 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 8 8 * @filesource 9 * 9 * 10 10 * @author {@link http://web.archive.org/web/20040820215257/http://www.wakkawiki.com/ChrisTessmer Chris Tessmer} 11 * 11 * 12 12 * @uses Wakka::reg_username 13 13 * @uses Wakka::existsUser() -
trunk/actions/pageindex/pageindex.php
r634 r736 10 10 * default if no page title can be generated) 11 11 * 12 * @package Actions13 * @version $Id:pageindex.php 369 2007-03-01 14:38:59Z DarTar $14 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License12 * @package Actions 13 * @version $Id:pageindex.php 369 2007-03-01 14:38:59Z DarTar $ 14 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 15 15 * @filesource 16 16 * 17 * @author {@link http://wikkawiki.org/GiorgosKontopoulos GiorgosKontopoulos} (added ACL check, first code cleanup)18 * @author {@link http://wikkawiki.org/DarTar DarTar} (adding doc header, minor code and layout refinements, i18n)19 * @author {@link http://wikkawiki.org/BrianKoontz BrianKoontz} (added showpagetitle option)20 * 17 * @author {@link http://wikkawiki.org/GiorgosKontopoulos GiorgosKontopoulos} (added ACL check, first code cleanup) 18 * @author {@link http://wikkawiki.org/DarTar DarTar} (adding doc header, minor code and layout refinements, i18n) 19 * @author {@link http://wikkawiki.org/BrianKoontz BrianKoontz} (added showpagetitle option) 20 * 21 21 * @uses Wakka::LoadPageTitles() 22 22 * @uses Wakka::GetUserName() … … 41 41 { 42 42 // filter by letter 43 $requested_letter = (isset($_GET['letter'])) ? $_GET['letter'] : ''; # 31243 $requested_letter = (isset($_GET['letter'])) ? $_GET['letter'] : ''; # #312 44 44 if (!$requested_letter && isset($letter)) 45 45 { … … 74 74 $firstChar = '#'; 75 75 } 76 if ($firstChar != $current_character) 76 if ($firstChar != $current_character) 77 77 { 78 78 $alpha_bar .= '<a href="'.$link.$firstChar.'">'.$firstChar.'</a> '."\n"; … … 80 80 $character_changed = TRUE; 81 81 } 82 if ($requested_letter == '' || $firstChar == $requested_letter) 82 if ($requested_letter == '' || $firstChar == $requested_letter) 83 83 { 84 if ($character_changed) 84 if ($character_changed) 85 85 { 86 86 $index_output .= "<br />\n<strong>$firstChar</strong><br />\n"; … … 93 93 $index_output .= "<span class=\"pagetitle\">[".$this->PageTitle($page['tag'])."]</span>"; 94 94 } 95 if ($cached_username == $page_owner) 95 if ($cached_username == $page_owner) 96 96 { 97 97 $index_output .= '*'; 98 98 $user_owns_pages = TRUE; 99 } 99 } 100 100 elseif ($page_owner != '(Public)' && $page_owner != '') 101 101 { … … 111 111 $index_caption .= '---'.PAGEINDEX_OWNED_PAGES_CAPTION; 112 112 } 113 echo $this->Format('===='.PAGEINDEX_HEADING.'==== --- <<'.$index_caption.'<< ::c:: ---'); 113 echo $this->Format('===='.PAGEINDEX_HEADING.'==== --- <<'.$index_caption.'<< ::c:: ---'); 114 114 echo "\n<strong>".$alpha_bar."</strong><br />\n"; 115 115 echo $index_output; 116 } 117 else 116 } 117 else 118 118 { 119 119 echo WIKKA_NO_PAGES_FOUND; -
trunk/actions/phpversion/phpversion.php
r369 r736 2 2 /** 3 3 * Print current PHP version. 4 * 4 * 5 5 * @package Actions 6 6 * @version $Id$ -
trunk/actions/recentlycommented/recentlycommented.php
r700 r736 7 7 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 8 8 * @filesource 9 * 9 * 10 10 * @author {@link http://wikkawiki.org/DarTar Dario Taraborelli} (preliminary code cleanup, ACL check) 11 11 * … … 15 15 * @uses Wakka::HasAccess() 16 16 * @uses Wakka::FormatUser() 17 * 17 * 18 18 * @todo make datetime format configurable; 19 19 */ -
trunk/actions/rss/rss.php
r683 r736 2 2 /** 3 3 * Cache and display an RSS feed. 4 * 4 * 5 5 * Usage: 6 6 * {{rss http://domain.com/feed.xml}} or 7 7 * {{rss url="http://domain.com/feed.xml" cachetime="30"}} 8 * NOTE 1 : in Onyx-RSS default is "debugMode" which results in all errors being printed8 * NOTE 1: in Onyx-RSS default is "debugMode" which results in all errors being printed 9 9 * this could be suppressed by turning debug mode off, but then we'd never have a 10 10 * clue about the cause of any error. … … 14 14 * find the cause of any problem. 15 15 * NOTE 2: no solution for timeout problems with non-existing feeds yet... 16 * 16 * 17 17 * @package Actions 18 18 * @version $Id$ 19 19 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 20 20 * @filesource 21 * 21 * 22 22 * @input string $url mandatory: URL of the feed 23 23 * @input integer $cachetime optional: time in minutes to cache the feed … … 26 26 * @uses Wakka::ReturnSafeHTML() 27 27 * @todo internationalization (#i18n marker) 28 * @todo should use makeList to generate the list; 28 * @todo should use makeList to generate the list; 29 29 * @todo maybe better convert to using Magpie first; 30 30 */ -
trunk/actions/table/table.php
r369 r736 2 2 /** 3 3 * Display a data table. 4 * 5 * @package Actions6 * @version $Id$7 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License4 * 5 * @package Actions 6 * @version $Id$ 7 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 8 8 * @filesource 9 9 * 10 10 * @input string $cells mandatory: string with all cells, separated by ';' and '###' for empty cells 11 * @input integer $cellpadding optional: padding within cells in pixels; default: 1 11 * @input integer $cellpadding optional: padding within cells in pixels; default: 1 12 12 * @input string $style optional: in-line style for the table. 13 13 * @input integer $columns optional: number of columns for the table; default: 1 … … 30 30 foreach ($vars as $param => $value) 31 31 { 32 if ($param == 'style') {$style=$value;} 33 if ($param == 'columns') {$columns=$value;} 32 if ($param == 'style') {$style=$value;} 33 if ($param == 'columns') {$columns=$value;} 34 34 if ($param == 'cellpadding') 35 35 { 36 $cellpadding =$value;37 $border =$value;38 } 36 $cellpadding = $value; 37 $border = $value; 38 } 39 39 if ($param == 'cells') $cells = split($delimiter, $value); 40 40 } … … 53 53 } 54 54 $cached_output .= "</table>"; 55 echo $this->ReturnSafeHTML($cached_output); 55 echo $this->ReturnSafeHTML($cached_output); 56 56 } 57 57 -
trunk/actions/textsearch/textsearch.php
r666 r736 1 1 <?php 2 /** 2 /** 3 3 * Search wiki pages for a phrase. 4 * 4 * 5 5 * @package Actions 6 6 * @version $Id$ 7 7 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 8 8 * @filesource 9 * 9 * 10 10 * @uses Wakka::FormClose() 11 11 * @uses Wakka::FormOpen() … … 15 15 * @uses Wakka::CheckMySQLVersion() 16 16 * @uses Wakka::htmlspecialchars_ent() 17 * 18 * @todo [accesibility] make form accessible 17 * 18 * @todo [accesibility] make form accessible 19 19 * @todo replace $_REQUEST with either $_GET or $_POST (or both if really 20 * necessary) - #312 21 * @todo i18n search button text 20 * necessary) - #312 21 * @todo i18n search button text 22 22 */ 23 23 … … 31 31 // display form 32 32 // TODO i18n 33 ?> 33 ?> 34 34 <?php echo $this->FormOpen('', '', 'get'); ?> 35 35 <fieldset><legend><?php echo SEARCH_FOR; ?></legend> … … 39 39 40 40 <?php 41 // strange construct here 41 // strange construct here 42 42 // also inconsistent behavior: 43 43 // if 'phrase' is empty, search tips would be displayed 44 44 // if 'phrase' is empty after trimming and removing slashes, search tips NOT displayed 45 45 46 // process search request 46 // process search request 47 47 #if (isset($_REQUEST['phrase']) && ($phrase = $_REQUEST['phrase'])) 48 48 if ('' !== $phrase) 49 49 { 50 #$phrase_re = stripslashes(trim($phrase)); 50 #$phrase_re = stripslashes(trim($phrase)); 51 51 #if (!$phrase_re) return; 52 52 #$results = $this->FullTextSearch($phrase_re); … … 90 90 #if ($this->CheckMySQLVersion(4,00,01)) // DONE replace with version_compare 91 91 if ($this->CheckMySQLVersion('4.00.01')) 92 { 92 { 93 93 // define variables for template 94 94 $search_tips = SEARCH_TIPS; -
trunk/actions/wantedpages/wantedpages.php
r649 r736 3 3 * Display a list of nonexisting pages to which other pages are linking to. 4 4 * 5 * <p>This action lists all pagenames that don't exist but are referred to by other pages on the wiki. By default, the 5 * <p>This action lists all pagenames that don't exist but are referred to by other pages on the wiki. By default, the 6 6 * WikkaInstaller creates a page named WantedPages that uses this action.</p> 7 * <p>Those non-existing pages are listed as one line per wanted pages. Each line is composed of 2 parts : The name of 7 * <p>Those non-existing pages are listed as one line per wanted pages. Each line is composed of 2 parts : The name of 8 8 * the wanted page in a form of a link: Clicking on this link will let you create the page and start editing its content. 9 9 * Then in brackets, you see the number of pages linking to the wanted page. This number is also in a form of a link: … … 45 45 if (in_array($_GET['ob'.$i], $sorting_fields)) 46 46 { 47 if ($sort) 47 if ($sort) 48 48 { 49 49 $sort .= ','; -
trunk/actions/wikkachanges/wikkachanges.php
r417 r736 2 2 /** 3 3 * Print information on the current release. 4 * 5 * @package Actions6 * @version $Id$7 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License4 * 5 * @package Actions 6 * @version $Id$ 7 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 8 8 * @filesource 9 * 9 * 10 10 * @uses Wakka::Format() 11 11 * @todo should be a default page, not an action -
trunk/actions/wikkaname/wikkaname.php
r650 r736 2 2 /** 3 3 * Print the name of this WikkaWiki. 4 * 4 * 5 5 * @package Actions 6 6 * @version $Id$ 7 7 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 8 8 * @filesource 9 * 9 * 10 10 * @uses Wakka::GetConfigValue() 11 11 * @uses Config::$wakka_name -
trunk/actions/wikkaversion/wikkaversion.php
r369 r736 2 2 /** 3 3 * Print current Wikka version. 4 * 5 * @package Actions6 * @version $Id$7 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License4 * 5 * @package Actions 6 * @version $Id$ 7 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 8 8 * @filesource 9 9 */