Changeset 738

Show
Ignore:
Timestamp:
10/03/2007 06:48:41 AM (3 years ago)
Author:
JavaWoman
Message:

Cleanup

  • All line endings now UNIX (a lot were still Windows/DOS or even Mixed - no thanks to Eclipse)
  • (where I spotted it) removed double role of # EOL comment and ticket number
  • (minor) whitespace
Location:
trunk/handlers
Files:
17 modified

Legend:

Unmodified
Added
Removed
  • trunk/handlers/acls/acls.php

    r652 r738  
    4949 
    5050                $page = $this->LoadSingle(" 
    51                         SELECT *  
     51                        SELECT * 
    5252                        FROM ".$this->GetConfigValue('table_prefix')."acls 
    5353                        WHERE page_tag = '".mysql_real_escape_string($this->GetPageTag())."' 
  • trunk/handlers/clone/clone.php

    r694 r738  
    44 * 
    55 * Usage: append /clone to the URL of the page you want to clone 
    6  *  
    7  * This handler checks the existence of the source page, the validity of the  
    8  * name of the target page to be created, the user's read-access to the source  
     6 * 
     7 * This handler checks the existence of the source page, the validity of the 
     8 * name of the target page to be created, the user's read-access to the source 
    99 * page and write-access to the target page. 
    1010 * If the "Edit after creation" option is selected, the user is redirected to the 
     
    1313 * page, otherwise default ACL are applied to the new page. 
    1414 * 
    15  * @package         Handlers 
    16  * @subpackage        Page 
    17  * @version           $Id:clone.php 407 2007-03-13 05:59:51Z DarTar $ 
    18  * @since             Wikka 1.1.6.0 
    19  * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 
     15 * @package     Handlers 
     16 * @subpackage  Page 
     17 * @version             $Id:clone.php 407 2007-03-13 05:59:51Z DarTar $ 
     18 * @since               Wikka 1.1.6.0 
     19 * @licens              http://www.gnu.org/copyleft/gpl.html GNU General Public License 
    2020 * @filesource 
    2121 * 
     
    2323 * @author              {@link http://wikkawiki.org/DarTar Dario Taraborelli} - bugs fixed, code improved, removed popup alerts. 
    2424 * @author              {@link http://wikkawiki.org/BrianKoontz Brian Koontz} - clone ACL option 
    25  *  
     25 * 
    2626 * 
    2727 * @uses        Wakka::ExistsPage() 
    28  * @uses        Wakka::Format()  
    29  * @uses        Wakka::FormClose()  
    30  * @uses        Wakka::FormOpen()  
    31  * @uses        Wakka::HasAccess()     
    32  * @uses        Wakka::LoadPage()  
    33  * @uses        Wakka::Href()  
    34  * @uses        Wakka::Redirect()  
     28 * @uses        Wakka::Format() 
     29 * @uses        Wakka::FormClose() 
     30 * @uses        Wakka::FormOpen() 
     31 * @uses        Wakka::HasAccess() 
     32 * @uses        Wakka::LoadPage() 
     33 * @uses        Wakka::Href() 
     34 * @uses        Wakka::Redirect() 
    3535 * @uses        Wakka::SavePage() 
    36  *  
     36 * 
    3737 * @input       string  $to     required: the page to be created 
    3838 *                                      must be a non-existing page and current user must have privs to create it 
    39  *                                      default is source page name  
     39 *                                      default is source page name 
    4040 * @input       string  $note   optional: the note to be added to the page when created 
    4141 *                                      default is "Cloned from " followed by the name of the source page 
    4242 * @input       boolean $editoption     optional: if true, the new page will be opened for edition on creation 
    43                                         default is FALSE (to allow multiple cloning of the same source) 
     43                                        default is FALSE (to allow multiple cloning of the same source) 
    4444 * @input       boolean $cloneaclsoption        optional: if true, ACLs are copied from the source page to the new page 
    4545 *                                      default is FALSE 
     
    6363$to = $this->tag; 
    6464$note = sprintf(CLONED_FROM, $from); 
    65 $editoption = '';  
     65$editoption = ''; 
    6666$cloneaclsoption = ''; 
    6767$box = '<em>'.CLONE_VALID_TARGET.'</em>'; 
     
    7272        // source page does not exist! 
    7373        $box = sprintf(WIKKA_ERROR_PAGE_NOT_EXIST, $from); 
    74 } else  
     74} else 
    7575{ 
    7676        // 2. page exists - now check user's read-access to the source page 
     
    9090                        $editoption = (isset($_POST['editoption'])) ? ' checked="checked"' : ''; 
    9191                        $cloneaclsoption = (isset($_POST['cloneaclsoption'])) ? ' checked="checked"' : ''; 
    92                  
     92 
    9393                        // 3. check target pagename validity 
    9494                        if (!preg_match(VALID_PAGENAME_PATTERN, $to))  //TODO use central regex library 
     
    100100                        { 
    101101                                // 4. target page name is valid - now check user's write-access 
    102                                 if (!$this->HasAccess('write', $to))   
     102                                if (!$this->HasAccess('write', $to)) 
    103103                                { 
    104104                                        $box = '<em class="error">'.sprintf(ERROR_ACL_WRITE, $to).'</em>'; 
     
    108108                                        // 5. check target page existence 
    109109                                        if ($this->ExistsPage($to)) 
    110                                         {  
     110                                        { 
    111111                                                // page already exists! 
    112112                                                $box = '<em class="error">'.WIKKA_ERROR_PAGE_ALREADY_EXIST.'</em>'; 
     
    118118                                                if ($thepage) 
    119119                                                { 
    120                                                         $pagecontent = $thepage['body'];         
     120                                                        $pagecontent = $thepage['body']; 
    121121                                                } 
    122122                                                $this->SavePage($to, $pagecontent, $note); 
  • trunk/handlers/delete_referrer/delete_referrer.php

    r654 r738  
    88 * @license             http://www.gnu.org/copyleft/gpl.html GNU General Public License 
    99 * @filesource 
    10  *  
     10 * 
    1111 * @uses        Wakka::Href() 
    1212 * @uses        Wakka::Query() 
     
    1616if (isset($_GET['spam_link']))                  // coming from referrers handler #312 
    1717{ 
    18         $parsed_url = parse_url($_GET['spam_link']); #312 
     18        $parsed_url = parse_url($_GET['spam_link']); # #312 
    1919        $spammer = isset($parsed_url['host']) ? $parsed_url['host'] : ''; 
    2020} 
    2121elseif (isset($_GET['spam_site']))              // coming from referrers_sites handler #312 
    2222{ 
    23         $spammer = $_GET['spam_site']; #312 
     23        $spammer = $_GET['spam_site']; # #312 
    2424} 
    2525 
     
    3434 
    3535// Redirect back to original page/handler 
    36 $redirect = isset($_GET['redirect']) ? $_GET['redirect'] : ''; #312 
     36$redirect = isset($_GET['redirect']) ? $_GET['redirect'] : ''; # #312 
    3737$this->Redirect($this->Href($redirect)); 
    3838 
  • trunk/handlers/diff/diff.php

    r706 r738  
    2727 * 
    2828 * @todo        This is a really cheap way to do it. I think it may be more intelligent to write the two pages to temporary files and run /usr/bin/diff over them. Then again, maybe not. 
    29  *                      JW: that may be nice but won't work on a Windows system ;)  
     29 *                      JW: that may be nice but won't work on a Windows system ;) 
    3030 */ 
    3131 
    32 // If javascript is disabled, user may get here after pressing button Next... on the /revisions handler.  
     32// If javascript is disabled, user may get here after pressing button Next... on the /revisions handler. 
    3333if ((isset($_GET['more_revisions'])) && (isset($_GET['a'])) && (isset($_GET['start']))) 
    3434{ 
     
    5858 
    5959        // load pages 
    60         $pageA = (isset($_GET['a'])) ? $this->LoadPageById($_GET['a']) : '';    #312 
    61         $pageB = (isset($_GET['b'])) ? $this->LoadPageById($_GET['b']) : '';    #312 
     60        $pageA = (isset($_GET['a'])) ? $this->LoadPageById($_GET['a']) : '';    # #312 
     61        $pageB = (isset($_GET['b'])) ? $this->LoadPageById($_GET['b']) : '';    # #312 
    6262        if ('' == $pageA || '' == $pageB) 
    6363        { 
     
    7272        $linkPageB = '<a href="'.$this->Href('', '', 'time='.urlencode($pageB['time'])).'">'.$pageB['time'].'</a>'; 
    7373 
    74         // If asked, call original diff  
    75         if (isset($_GET['fastdiff']) && $_GET['fastdiff'])      #312 
     74        // If asked, call original diff 
     75        if (isset($_GET['fastdiff']) && $_GET['fastdiff'])      # #312 
    7676        { 
    7777 
     
    155155                                break; 
    156156                        } 
    157                         if ($sideO->decode_directive_line())  
     157                        if ($sideO->decode_directive_line()) 
    158158                        { 
    159159                                $argument=$sideO->getargument(); 
  • trunk/handlers/edit/edit.php

    r720 r738  
    186186                        // hence hsc_secure() instead of htmlspecialchars_ent() which UNescapes entities! 
    187187                        // JW/2007-02-20: why is this? wouldn't it be  easier for the person editing to show actual characters instead of entities? 
    188                         '<input type="hidden" name="body" value="'.$this->hsc_secure($body).'" />'."\n";        #427 
     188                        '<input type="hidden" name="body" value="'.$this->hsc_secure($body).'" />'."\n";        # #427 
    189189                $preview_form .= $preview_buttons."\n"; 
    190190                $preview_form .= $this->FormClose()."\n"; 
     
    245245                        // hence hsc_secure() instead of htmlspecialchars_ent() which UNescapes entities! 
    246246                        // JW/2007-02-20: why is this? wouldn't it be  easier for the person editing to show actual characters instead of entities? 
    247                         '<textarea id="body" name="body">'.$this->hsc_secure($body).'</textarea>'."\n"; #427 
     247                        '<textarea id="body" name="body">'.$this->hsc_secure($body).'</textarea>'."\n"; # #427 
    248248                if ($buttons_position == 'bottom') 
    249249                { 
  • trunk/handlers/files.xml/files.xml.php

    r694 r738  
    1616 * @license             http://www.gnu.org/copyleft/gpl.html GNU General Public License 
    1717 * @filesource 
    18  *  
     18 * 
    1919 * @uses        Wakka::GetConfigValue() 
    2020 * @uses        Wakka::GetPageTag() 
     
    3232        $this->SetConfigValue('upload_path','files'); 
    3333} 
    34 $upload_path = $this->GetConfigValue('upload_path').DIRECTORY_SEPARATOR.$this->GetPageTag(); #89 
     34$upload_path = $this->GetConfigValue('upload_path').DIRECTORY_SEPARATOR.$this->GetPageTag(); # #89 
    3535if (!is_dir($upload_path)) 
    3636{ 
     
    3939 
    4040// do the action 
    41 switch ($_GET['action'])        #312 
     41switch ($_GET['action'])        # #312 
    4242{ 
    4343        // @@@ shared download code 
    4444        case 'download': 
    4545                header('Accept-Ranges: bytes'); 
    46                 $_GET['file'] = basename($_GET['file']); #312 
    47                 $path = $upload_path.DIRECTORY_SEPARATOR.$_GET['file']; #89, #312 
     46                $_GET['file'] = basename($_GET['file']); # #312 
     47                $path = $upload_path.DIRECTORY_SEPARATOR.$_GET['file']; # #89, #312 
    4848                $filename = basename($path); 
    4949                header("Content-Type: application/x-download"); 
    5050                header("Content-Disposition: attachment; filename=\"".urldecode($filename)."\""); 
    51                 if ($this->HasAccess('read'))  
     51                if ($this->HasAccess('read')) 
    5252                { 
    5353                        if (isset($_SERVER['HTTP_RANGE']) && 
     
    8181                } 
    8282        case 'delete': 
    83                 if ($this->IsAdmin())  
     83                if ($this->IsAdmin()) 
    8484                { 
    85                         @unlink($upload_path.DIRECTORY_SEPARATOR.$_GET['file']); #89, #312 // TODO if this is admin-only, why hide any errors? 
     85                        @unlink($upload_path.DIRECTORY_SEPARATOR.$_GET['file']); # #89, #312 // TODO if this is admin-only, why hide any errors? 
    8686                } 
    8787                print $this->redirect($this->Href()); 
  • trunk/handlers/mindmap.mm/mindmap.mm.php

    r407 r738  
    11<?php 
    22/** 
    3  * Display a mindmap as XML.  
    4  *  
     3 * Display a mindmap as XML. 
     4 * 
    55 * @package             Handlers 
    66 * @subpackage  Mindmaps 
     
    88 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 
    99 * @filesource 
    10  *  
     10 * 
    1111 * @uses                Wakka::HasAccess() 
    1212 */ 
  • trunk/handlers/mindmap_fullscreen/mindmap_fullscreen.php

    r677 r738  
    22/** 
    33 * Open a fullscreen window with an embedded Freemind map 
    4  *  
     4 * 
    55 * @package  3rdParty 
    66 * @subpackage Freemind 
     
    1010 * @version  $Id$ 
    1111 * @filesource 
    12  *  
     12 * 
    1313 * @uses Wakka::hsc_secure() 
    1414 * @uses Wakka::StaticHref() 
    1515 * @uses Config::$default_lang 
    16  * @todo        check if we should (copy and) use Wakka::GetSafeVar() and  
    17  *                      Wakka::Wakka::cleanUrl() to secure our input parameters  
     16 * @todo        check if we should (copy and) use Wakka::GetSafeVar() and 
     17 *                      Wakka::Wakka::cleanUrl() to secure our input parameters 
    1818 *                      (cf. mindmap action!) 
    1919 * @todo        since this produces a whole page, turn into a normal handler 
     
    8282 
    8383<?php 
    84 $mindmap_url = $this->hsc_secure(preg_replace('/&amp;/','&',(trim($_GET['url'])))); #312 // duplicates Wakka::cleanUrl() 
    85 if (isset($_GET['height'])) $height = $this->hsc_secure(trim($_GET['height'])); #312 // more or less equivalent to Wakka::GetSafeVar() 
     84$mindmap_url = $this->hsc_secure(preg_replace('/&amp;/','&',(trim($_GET['url'])))); # #312 // duplicates Wakka::cleanUrl() 
     85if (isset($_GET['height'])) $height = $this->hsc_secure(trim($_GET['height'])); # #312 // more or less equivalent to Wakka::GetSafeVar() 
    8686 
    87 if ($mindmap_url)  
     87if ($mindmap_url) 
    8888{ 
    8989        // set up template variables 
     
    9393        $jre_download_link = '<a href="'.WIKKA_JRE_DOWNLOAD_URL.'">'.WIKKA_JRE_LINK_DESC.'</a>'; 
    9494        $jre_install_req = sprintf(MM_JRE_INSTALL_REQ, $jre_download_link); 
    95         $jre_install_req_js = str_replace(array('\\', '\'', "\r", "\n") ,array('\\\\', '\\\'', '', '\\n'), $jre_install_req);   // escape slashes for JavaScript  
    96         $jre_install_req_sub = $jre_install_req;  
     95        $jre_install_req_js = str_replace(array('\\', '\'', "\r", "\n") ,array('\\\\', '\\\'', '', '\\n'), $jre_install_req);   // escape slashes for JavaScript 
     96        $jre_install_req_sub = $jre_install_req; 
    9797        $jre_install_req_sub[0] = strtolower($jre_install_req_sub[0]);  // lower case first char for use in subphrase 
    9898        $freemind_link = '<a href="'.FREEMIND_PROJECT_URL.'">Freemind</a>'; 
  • trunk/handlers/processcomment/processcomment.php

    r716 r738  
    22/** 
    33 * Process a comment. 
    4  *  
    5  * @package     Handlers 
     4 * 
     5 * @package             Handlers 
    66 * @subpackage  Comments 
    7  * @version $Id: processcomment.php,v 1.3.1.3 2007/02/11 11:39:16 brian Exp brian $ 
    8  * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 
     7 * @version             $Id: processcomment.php,v 1.3.1.3 2007/02/11 11:39:16 brian Exp brian $ 
     8 * @license             http://www.gnu.org/copyleft/gpl.html GNU General Public License 
    99 * @filesource 
    10  *  
     10 * 
    1111 * @author {http://wikkawiki.org/BrianKoontz Brian Koontz} 
    12  *  
     12 * 
    1313 * @uses        Wakka::GetUserName() 
    1414 * @uses        Wakka::Href() 
     
    1919 * @uses        Wakka::UserIsOwner() 
    2020 * @uses        Wakka::htmlspecialchars_ent() 
    21  *  
     21 * 
    2222 * @todo        move main <div> to templating class 
    2323 */ 
     
    6464        <?php } else { ?> 
    6565        <label for="commentbox"><?php echo NEW_COMMENT_LABEL; ?></label><br /> 
    66         <?php } ?>       
     66        <?php } ?> 
    6767        <textarea id="commentbox" name="body" rows="6" cols="78"></textarea><br /> 
    6868        <input type="submit" name="submit" value="<?php echo COMMENT_ADD_BUTTON; ?>" accesskey="s" /> 
     
    8989                        $this->SaveComment($this->tag, $body, $parent_id); 
    9090                } 
    91                  
     91 
    9292                // redirect to page 
    9393                $this->redirect($this->Href(), $redirectmessage); 
  • trunk/handlers/raw/raw.php

    r407 r738  
    22/** 
    33 * Display the raw version of a wiki page, i.e. the source with no formatting. 
    4  *  
     4 * 
    55 * @package             Handlers 
    66 * @subpackage  Page 
    77 * @version             $Id$ 
    8  * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 
     8 * @license             http://www.gnu.org/copyleft/gpl.html GNU General Public License 
    99 * @filesource 
    10  *  
     10 * 
    1111 * @uses                Wakka::HasAccess() 
    1212 */ 
  • trunk/handlers/recentchanges.xml.mm/recentchanges.xml.mm.php

    r701 r738  
    22/** 
    33 * Show a mindmap of the recent changes in the wiki as an XML File. 
    4  *  
     4 * 
    55 * @package             Handlers 
    66 * @subpackage  Mindmaps 
     
    88 * @license             http://www.gnu.org/copyleft/gpl.html GNU General Public License 
    99 * @filesource 
    10  *  
     10 * 
    1111 * @uses        Wakka::Href() 
    1212 * @uses        Wakka::htmlspecialchars_ent() 
    1313 * @uses        Wakka::LoadRecentlyChanged() 
    14  *  
     14 * 
    1515 * @todo        i18n 
    1616 * @todo        replace numbers by constants: no "magic numbers"!) 
     
    3434        //      $max = 50; 
    3535        //} 
    36          
     36 
    3737        $c = 0; 
    3838        foreach ($pages as $page) 
     
    5858                        $xml .= '<node LINK="'.$pagelink.'" TEXT="'.$pagetag.'" FOLDED="true">'."\n"; 
    5959                        $timeformatted = date('H:i T', strtotime($page['time'])); 
    60                         $xml .= '<node LINK="'.$pagelink.'/revisions" TEXT="Revision time: '.$timeformatted.'"/>'."\n"; #i18n 
     60                        $xml .= '<node LINK="'.$pagelink.'/revisions" TEXT="Revision time: '.$timeformatted.'"/>'."\n"; # i18n 
    6161                        if ($pagenote = $this->htmlspecialchars_ent($page['note'],ENT_COMPAT,'XML')) 
    6262                        { 
     
    6868                        } 
    6969 
    70                         $xml .= '<node LINK="'.$pagelink.'/history" TEXT="View History"/>'."\n";        #i18n 
     70                        $xml .= '<node LINK="'.$pagelink.'/history" TEXT="View History"/>'."\n";        # i18n 
    7171                        $xml .= "</node>\n"; 
    7272                        // $xml .= "<arrowlink ENDARROW=\"Default\" DESTINATION=\"Freemind_Link_".$page["user"]."\" STARTARROW=\"None\"/>\n"; 
  • trunk/handlers/recentchanges.xml/recentchanges.xml.php

    r726 r738  
    5252 */ 
    5353if (!defined('FEED_VALID_FORMATS')) define('FEED_VALID_FORMATS', 'RSS0.91,RSS1.0,RSS2.0,ATOM1.0');      // no whitespace around commas! 
    54 if (!defined('FEED_DESCRIPTION_TRUNCATE_SIZE')) define('FEED_DESCRIPTION_TRUNCATE_SIZE', 200); #character limit to truncate description // expects integer 
    55 if (!defined('FEED_DESCRIPTION_HTML')) define('FEED_DESCRIPTION_HTML',TRUE); #Indicates whether the description field should be rendered in HTML        // expects boolean 
    56 if (!defined('FEED_DEFAULT_OUTPUT_FORMAT')) define('FEED_DEFAULT_OUTPUT_FORMAT','RSS2.0'); #any of the valid formats specified in VALID_FORMATS 
     54if (!defined('FEED_DESCRIPTION_TRUNCATE_SIZE')) define('FEED_DESCRIPTION_TRUNCATE_SIZE', 200); // character limit to truncate description       // expects integer 
     55if (!defined('FEED_DESCRIPTION_HTML')) define('FEED_DESCRIPTION_HTML', TRUE); // Indicates whether the description field should be rendered in HTML     // expects boolean 
     56if (!defined('FEED_DEFAULT_OUTPUT_FORMAT')) define('FEED_DEFAULT_OUTPUT_FORMAT','RSS2.0'); //any of the valid formats specified in VALID_FORMATS 
    5757//if (!defined('FEED_DEFAULT_OWNER_FILTER')) define('FEED_DEFAULT_OWNER_FILTER', ''); #empty, modifications of pages owned by any user 
    5858//if (!defined('FEED_DEFAULT_USER_FILTER')) define('FEED_DEFAULT_USER_FILTER', ''); #empty, modifications by any user 
     
    108108//initialize feed (general settings) 
    109109$rss->useCached(); //TODO: make this configurable 
    110 $rss->title = sprintf(FEED_TITLE_RECENT_CHANGES, $this->GetConfigValue('wakka_name'));  
    111 $rss->description = sprintf(FEED_DESCRIPTION_RECENT_CHANGES, $this->GetConfigValue('wakka_name'));  
     110$rss->title = sprintf(FEED_TITLE_RECENT_CHANGES, $this->GetConfigValue('wakka_name')); 
     111$rss->description = sprintf(FEED_DESCRIPTION_RECENT_CHANGES, $this->GetConfigValue('wakka_name')); 
    112112$rss->cssStyleSheet = $this->StaticHref('css/'.FEED_CSS); 
    113113$rss->descriptionTruncSize = FEED_DESCRIPTION_TRUNCATE_SIZE; 
    114114$rss->descriptionHtmlSyndicated = FEED_DESCRIPTION_HTML; 
    115115$rss->link = $this->Href('', $this->GetConfigValue('root_page')); 
    116 $rss->syndicationURL = $this->Href($this->handler,'','f='.$f);  
     116$rss->syndicationURL = $this->Href($this->handler,'','f='.$f); 
    117117 
    118118//create feed image 
     
    140140                        $item = instantiate('FeedItem'); 
    141141                        $item->title = $page['tag']; 
    142                         #$item->link = $this->Href('show', $page['tag'], 'time='.urlencode($page['time']));  
     142                        #$item->link = $this->Href('show', $page['tag'], 'time='.urlencode($page['time'])); 
    143143                        $item->link = $this->Href('', $page['tag'], 'time='.urlencode($page['time'])); 
    144144                        // @@@ ^ uses &amp;amp; in all formats - this is FC escaping the &amp; that Href() outputs 
     
    159159  Identifier:  Source 
    160160  Definition:  A Reference to a resource from which the present resource 
    161                is derived. 
     161                           is derived. 
    162162  Comment:     The present resource may be derived from the Source resource 
    163                in whole or in part.  Recommended best practice is to reference  
    164                the resource by means of a string or number conforming to a  
    165                formal identification system. 
     163                           in whole or in part.  Recommended best practice is to reference 
     164                           the resource by means of a string or number conforming to a 
     165                           formal identification system. 
    166166*/ 
    167167                        if ('RSS1.0' == $f)             // dc:source used only here 
  • trunk/handlers/recentchanges_simple.xml.mm/recentchanges_simple.xml.mm.php

    r701 r738  
    22/** 
    33 * Show a simple mindmap of recent changes in the wiki as an XML File. 
    4  *  
     4 * 
    55 * Only the date and the page of the change are shown. 
    6  *  
     6 * 
    77 * @package             Handlers 
    88 * @subpackage  Mindmaps 
     
    1010 * @license             http://www.gnu.org/copyleft/gpl.html GNU General Public License 
    1111 * @filesource 
    12  *  
     12 * 
    1313 * @uses        in_iarray() 
    1414 * @uses        Wakka::Href() 
     
    2323/** 
    2424 * Checks if an item is contained in an array (case insensitive). 
    25  *  
     25 * 
    2626 * @name        in_iarray() 
    2727 * @return      TRUE or FALSE 
    2828 */ 
    29 function in_iarray($item, $array)  
     29function in_iarray($item, $array) 
    3030{ 
    3131        $item = &strtoupper($item); 
    32         foreach ($array as $element)  
     32        foreach ($array as $element) 
    3333        { 
    34                 if ($item == strtoupper($element))  
     34                if ($item == strtoupper($element)) 
    3535                { 
    3636                        return TRUE; 
     
    5555        //      $max = 50; 
    5656        //} 
    57          
     57 
    5858        $c = 0; 
    5959        foreach ($pages as $page) 
     
    7575                        // $xml .= "<arrowlink ENDARROW=\"Default\" DESTINATION=\"Freemind_Link_".$page["user"]."\" STARTARROW=\"None\"/>\n"; 
    7676                        $xml .= "</node>\n"; 
    77                         if (isset($users[$page['user']]) && (is_array($users[$page['user']])))  
     77                        if (isset($users[$page['user']]) && (is_array($users[$page['user']]))) 
    7878                        { 
    7979                                $u_count = count($users[$page['user']]); 
  • trunk/handlers/referrers/referrers.php

    r701 r738  
    66 * @subpackage  Referrers 
    77 * @version             $Id:referrers.php 407 2007-03-13 05:59:51Z DarTar $ 
    8  * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 
     8 * @license             http://www.gnu.org/copyleft/gpl.html GNU General Public License 
    99 * @filesource 
    1010 * 
     
    3535$ref_urls_to_page_url = $this->Href('referrers'); 
    3636$ref_blacklist_url = $this->Href('review_blacklist'); 
    37 if (isset($_GET["global"])) #312 
     37if (isset($_GET["global"])) # #312 
    3838{ 
    3939        // referrers to this wiki 
    4040        // prepare UI 
    41         $global = $_GET["global"]; #312 
     41        $global = $_GET["global"]; # #312 
    4242        $referrers_domains_link = '<a href="'.$ref_domains_to_wiki_url.'">'.REFERRERS_DOMAINS_LINK_DESC.'</a>'; 
    4343        $heading = sprintf(REFERRERS_URLS_TO_WIKI, $referrers_domains_link); 
     
    5454        switch ((int) $this->GetConfigValue('referrers_purge_time')) 
    5555        { 
    56                 case 0:  
     56                case 0: 
    5757                        $referrers_purge_time = ''; 
    5858                        break; 
  • trunk/handlers/referrers_sites/referrers_sites.php

    r701 r738  
    3333$ref_urls_to_page_url = $this->Href('referrers'); 
    3434$ref_blacklist_url = $this->Href('review_blacklist'); 
    35 if (isset($_GET["global"])) #312 
     35if (isset($_GET["global"])) # #312 
    3636{ 
    3737        // referrers to this wiki 
    3838        // prepare UI 
    39         $global = $_GET["global"]; #312 
     39        $global = $_GET["global"]; # #312 
    4040        $referrers_urls_link = '<a href="'.$ref_urls_to_wiki_url.'">'.REFERRERS_URLS_LINK_DESC.'</a>'; 
    4141        $heading = sprintf(REFERRERS_DOMAINS_TO_WIKI, $referrers_urls_link); 
     
    5252        switch ((int) $this->GetConfigValue('referrers_purge_time')) 
    5353        { 
    54                 case 0:  
     54                case 0: 
    5555                        $referrers_purge_time = ''; 
    5656                        break; 
  • trunk/handlers/revisions.xml/revisions.xml.php

    r680 r738  
    22/** 
    33 * Generate a RSS 2.0 feed of the revisions of the current page. 
    4  *  
     4 * 
    55 * @package             Handlers 
    66 * @subpackage  XML 
     
    88 * @license             http://www.gnu.org/copyleft/gpl.html GNU General Public License 
    99 * @filesource 
    10  *  
     10 * 
    1111 * @uses                Config::$wakka_name 
    1212 * @uses                Wakka::GetConfigValue() 
  • trunk/handlers/revisions/revisions.php

    r707 r738  
    99 * page at that revision.</p> 
    1010 * <p>The user can also pick two revisions from the list and compare them by passing their id's to the 
    11  * {@link diff.php diff handler}. Two kinds of diffs are proposed: the normal diff and the simple  
     11 * {@link diff.php diff handler}. Two kinds of diffs are proposed: the normal diff and the simple 
    1212 * diff. This is done by choosing revisions using the checkboxes and by clicking the button <kbd> 
    1313 * Show Differences</kbd>. 
    1414 * The maximum number of revisions shown is configured through the user preference or at the 
    1515 * wikka configuration. See {@link Wakka::LoadRevisions()}. If the page has more revisions than this 
    16  * configured value, a button <kbd>Next ...</kbd> will appear to allow viewing more revisions. The  
     16 * configured value, a button <kbd>Next ...</kbd> will appear to allow viewing more revisions. The 
    1717 * revision marked at the left column will appear at the top of the next page, this will let the user 
    1818 * compare any revision of the current page with another revision on the next (or later) page.</p> 
     
    3939$start = 0; 
    4040 
    41 if ($this->HasAccess('read'))  
     41if ($this->HasAccess('read')) 
    4242{ 
    4343        if (isset($_GET['start'])) 
     
    6060                $output  = $this->FormOpen('diff', '', 'get'); 
    6161                $output .= "<fieldset>\n"; 
    62                 $output .= "<legend>".sprintf(REVISIONS_CAPTION, $this->Link($this->tag))."</legend>"."\n";              
     62                $output .= "<legend>".sprintf(REVISIONS_CAPTION, $this->Link($this->tag))."</legend>"."\n"; 
    6363                $output .= '<table border="0" cellspacing="0" cellpadding="1">'."\n"; 
    6464                $output .= "<tr>\n"; 
     
    108108        echo $output; 
    109109        echo '</div>'."\n"; 
    110 }  
    111 else  
     110} 
     111else 
    112112{ 
    113113        echo '<div class="page">'."\n";