Changeset 1784

Show
Ignore:
Timestamp:
04/22/2011 08:44:18 PM (2 years ago)
Author:
BrianKoontz
Message:

Merged 1.3.1 changes into trunk ([1765]-[1780],[1782]). Refs #191, #843, #1040, #1041, #38, #1042, #1043, #1018, #1045, #208, #415, #1039, #189

Location:
trunk
Files:
20 modified
39 copied

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/actions/recentcomments/recentcomments.php

  • trunk/actions/recentlycommented/recentlycommented.php

  • trunk/actions/usersettings/usersettings.php

    r1752 r1784  
    162162                $revisioncount = $user['revisioncount']; 
    163163                $changescount = $user['changescount']; 
    164                 $usertheme = ($user['theme']!= '')? $user['theme'] : $this->GetConfigValue('theme'); 
     164                $usertheme = (isset($user['theme']) && $user['theme']!= '')? $user['theme'] : $this->GetConfigValue('theme'); 
    165165        } 
    166166 
  • trunk/docs/CHANGES.htm

    r1474 r1784  
    33<html> 
    44<head> 
    5         <title>Wikka Release Notes for Version 1.2 (Released 01Sep2009)</title> 
     5        <title>Wikka Release Notes for Version 1.3.1 (Released 31Mar2011)</title> 
    66    <meta http-equiv="Content-Type" content="text/html; 
    77charset=iso-8859-1" /> 
     
    99<body> 
    1010 
    11         <h3>Wikka Release Notes for Version 1.2 (Released 01Sep2009)</h3> 
    12         For the latest WikkaWiki 1.2 release notes, please visit <a href="http://docs.wikkawiki.org/WikkaReleaseNotes12">http://docs.wikkawiki.org/WikkaReleaseNotes12</a> 
     11        <h3>Wikka Release Notes for Version 1.3.1 (Released 31Mar2011)</h3> 
     12        For the latest WikkaWiki 1.3.1 release notes, please visit <a href="http://docs.wikkawiki.org/WikkaReleaseNotes131">http://docs.wikkawiki.org/WikkaReleaseNotes131</a> 
    1313</body> 
    1414</html> 
  • trunk/docs/CHANGES.txt

    r1554 r1784  
    1 **Wikka Release Notes for Version 1.3 (Released XX XXX XXXX)** 
     1**Wikka Release Notes for Version 1.3.1 (Released 31Mar2011)** 
    22 
    3 For the latest WikkaWiki 1.3 release notes, please visit 
    4 http://docs.wikkawiki.org/WikkaReleaseNotes13 
     3For the latest WikkaWiki 1.3.1 release notes, please visit 
     4http://docs.wikkawiki.org/WikkaReleaseNotes131 
    55 
  • trunk/docs/README.txt

    r1325 r1784  
    2626- Tormod Haugen 
    2727- Olivier Borowski 
     28- Yuxuan "fishy" Wang 
     29- EmeraldIsland 
     30- Krzysztof Trybowski 
    2831 
    2932Wikka Hall of Fame 
  • trunk/docs/thirdparty.txt

    r999 r1784  
    6262             the WayBack Machine; start here: 
    6363http://web.archive.org/web/20030601150132/www.readinged.com/onyx/rss/ 
     64 
     65Name       : WikkaEdit  
     66Bundled    : unknown version 
     67Description: Wiki editor 
     68For Wikka  : Featured wiki editor 
     69License    : GNU General Public License (GPL) 
     70Home page  : http://wikkawiki.org/WikkaEdit 
     71Author     : Olivier Borowski  
     72                         olivier.borowski [at] wikkawiki [dot] org  
     73 
     74Name       : FeedCreator 
     75Bundled    : Version 1.7.2-ppt 
     76Description: Flexible news feed generator 
     77For Wikka  : Provides feed generation functionality  
     78License    : GNU Lesser General Public License (LGPL) 
     79Home page  : unknown 
     80Author     : Scott Reynen (and others)  
     81                         scott [at] randomchaos [dot] com 
  • trunk/formatters/wakka.php

    r1752 r1784  
    574574                } 
    575575                // urls (see RFC 1738 <http://www.ietf.org/rfc/rfc1738.txt>) 
    576                 elseif (preg_match("/^([a-z]+:\/\/[[:alnum:]\/?;:@&=\.-]+[[:alnum:]\/])(.*)$/", $thing, $matches)) 
     576                elseif (preg_match("/^([a-z]+:\/\/[[:alnum:]\/?;:@&=\._-]+[[:alnum:]\/])(.*)$/", $thing, $matches)) 
    577577                { 
    578578                        $url = $matches[1]; 
  • trunk/handlers/clone/clone.php

    r1752 r1784  
    1010 * If the "Edit after creation" option is selected, the user is redirected to the 
    1111 * target page for editing immediately after its creation. 
     12 * If the "Clone ACL" option is selected, ACL settings are copied to the target page,   
     13 * otherwise default ACL are applied to the new page. 
    1214 * 
    1315 * @package             Handlers 
     
    1618 * @author              {@link http://wikkawiki.org/ChristianBarthelemy Christian Barthelemy} - original idea and code. 
    1719 * @author              {@link http://wikkawiki.org/DarTar Dario Taraborelli} - bugs fixed, code improved, removed popup alerts. 
     20 * @author              {@link http://wikkawiki.org/BrianKoontz Brian Koontz} - clone ACL option 
    1821 * @since               Wikka 1.1.6.0 
    1922 * 
     
    3033 * 
    3134 * @input       string  $to     required: the page to be created 
    32  *                                      must be a non existing page and current user must be authorized 
     35 *                                      must be a non existing page and current user must have privs  
    3336 *                                      to create it 
    3437 *                                      default is source page name 
     
    3841 *                                      editing on creation 
    3942 *                                      default is FALSE (to allow multiple cloning of the same source) 
     43 * @input   boolean $cloneaclsoption optional: if true, ACLs are copied from the source page to the new page; default is false  
    4044 * 
    4145 * @todo        Use central regex library for valid pagenames. 
     
    5054$note = sprintf(T_("Cloned from %s"), $from); 
    5155$editoption = ''; 
    52 $box = T_("Please fill in a valid target <tt>PageName</tt> and an (optional) edit note"); 
     56$cloneaclsoption = ''; 
     57$box = PLEASE_FILL_VALID_TARGET; 
    5358 
    5459echo '<div id="content">'."\n"; 
     
    7984                        $note = isset($_POST['note']) && $_POST['note'] ?  $this->GetSafeVar('note', 'post') : $note; 
    8085                        $editoption = (isset($_POST['editoption'])) ? ' checked="checked"' : ''; 
     86                        $cloneaclsoption = (isset($_POST['cloneaclsoption']))? 'checked="checked"' : '';  
     87 
    8188                        // 3. Check user's write access 
    8289                        if (!$this->HasAccess('write', $to)) 
     
    99106                                { 
    100107                                        // 6. Valid request - proceed to page cloning 
    101                                         $thepage = $this->LoadPage($from); # load the source page 
    102                                         if ($thepage) $pagecontent = $thepage['body']; # get its content 
    103                                         $this->SavePage($to, $pagecontent, $note); #create target page 
     108                                        $thepage=$this->LoadPage($from);  
     109                                        if ($thepage) $pagecontent = $thepage['body'];  
     110                                        $this->SavePage($to, $pagecontent, $note);  
     111                                        // Clone ACLs if requested  
     112                                        if ($cloneaclsoption == 'checked="checked"')  
     113                                        {  
     114                                                echo $from; 
     115                                                $acl = $this->LoadAllACLs($from, 0);  
     116                                                var_dump($acl); 
     117                                                $this->SaveACL($to, 'read', $this->TrimACLs($acl['read_acl']));  
     118                                                $this->SaveACL($to, 'write', $this->TrimACLs($acl['write_acl']));  
     119                                                $this->SaveACL($to, 'comment_read', $this->TrimACLs($acl['comment_read_acl']));  
     120                                                $this->SaveACL($to, 'comment_post', $this->TrimACLs($acl['comment_post_acl']));  
     121                                        }  
     122 
     123                                        // Open editor if requested  
    104124                                        if ($editoption == ' checked="checked"') 
    105125                                        { 
     
    130150                        '<td></td>'."\n". 
    131151                        '<td>'."\n". 
    132                         '<input type="checkbox" name="editoption"'.$editoption.' id="editoption" /><label for="editoption">'.T_(" Edit after creation ").'</label>'."\n". 
    133                         '<input type="submit" name="create" value="'.T_("Clone").'" />'."\n". 
     152                        '<input type="checkbox" name="editoption"'.$editoption.' id="editoption" /><label for="editoption">'.LABEL_EDIT_OPTION.'</label>'."\n". 
     153            '<input type="checkbox" name="cloneaclsoption" '.$cloneaclsoption.' id="cloneaclsoption" /><label for="cloneaclsoption">'.LABEL_ACL_OPTION.'</label>'."\n".  
     154                        '</tr>'."\n".  
     155                        '<tr>'."\n".  
     156                        '<td></td>'."\n".  
     157                        '<td>'."\n".  
     158                        '<input type="submit" name="create" value="'.LABEL_CLONE.'" />'."\n". 
    134159                        '</td>'."\n". 
    135160                        '</tr>'."\n". 
  • trunk/handlers/recentchanges.xml/recentchanges.xml.php

  • trunk/lang/en/en.inc.php

    r1725 r1784  
    792792if(!defined('SEARCH_EXPANDED_LINK_DESC')) define('SEARCH_EXPANDED_LINK_DESC', 'Expanded Text Search'); // search link description 
    793793if(!defined('SEARCH_TRY_EXPANDED')) define('SEARCH_TRY_EXPANDED', 'Try the %s which shows surrounding text.'); // %s expanded search link 
     794/* 
     795if(!defined('SEARCH_TIPS')) define('SEARCH_TIPS', "<br /><br /><hr /><br /><strong>Search Tips:</strong><br /><br />" 
     796        ."<div class=\"indent\"><tt>apple banana</tt></div>" 
     797        ."Find pages that contain at least one of the two words. <br />" 
     798        ."<br />" 
     799        ."<div class=\"indent\"><tt>+apple +juice</tt></div>" 
     800        ."Find pages that contain both words. <br />" 
     801        ."<br />" 
     802        ."<div class=\"indent\"><tt>+apple -macintosh</tt></div>" 
     803        ."Find pages that contain the word 'apple' but not 'macintosh'. <br />" 
     804        ."<br />" 
     805        ."<div class=\"indent\"><tt>apple*</tt></div>" 
     806        ."Find pages that contain words such as apple, apples, applesauce, or applet. <br />" 
     807        ."<br />" 
     808        ."<div class=\"indent\"><tt>\"some words\"</tt></div>" 
     809        ."Find pages that contain the exact phrase 'some words' (for example, pages that contain 'some words of wisdom' <br />" 
     810        ."but not 'some noise words'). <br />"); 
     811*/ 
    794812if(!defined('SEARCH_MYSQL_IDENTICAL_CHARS')) define('SEARCH_MYSQL_IDENTICAL_CHARS', 'aàáâã,eèéêë,iìîï,oòóôõ,uùúû,cç,nñ,yý'); 
    795813if(!defined('SEARCH_WORD_1')) define('SEARCH_WORD_1', 'apple'); 
     
    10381056if(!defined('EDIT_NOTE')) define('EDIT_NOTE', 'Edit note:'); 
    10391057if(!defined('ERROR_ACL_READ')) define('ERROR_ACL_READ', 'You are not allowed to read the source of this page.'); 
    1040 if(!defined('ERROR_INVALID_PAGENAME')) define('ERROR_INVALID_PAGENAME', 'This page name is invalid. Valid page names must not contain the characters | ? = &lt; &gt; / \' " % or &amp;.'); 
     1058if(!defined('ERROR_INVALID_PAGENAME')) define('ERROR_INVALID_PAGENAME', 'This page name is invalid. Valid page names must not contain the characters: [ ] { } % + | ? = < > \' " / #x00-#x1f #x7f or ,'); 
    10411059if(!defined('ERROR_PAGE_ALREADY_EXIST')) define('ERROR_PAGE_ALREADY_EXIST', 'Sorry, the destination page already exists'); 
    10421060if(!defined('ERROR_PAGE_NOT_EXIST')) define('ERROR_PAGE_NOT_EXIST', ' Sorry, page %s does not exist.'); 
    10431061if(!defined('LABEL_CLONE')) define('LABEL_CLONE', 'Clone'); 
    10441062if(!defined('LABEL_EDIT_OPTION')) define('LABEL_EDIT_OPTION', ' Edit after creation '); 
     1063if (!defined('LABEL_ACL_OPTION')) define('LABEL_ACL_OPTION', ' Clone 
     1064ACL'); 
    10451065if(!defined('PLEASE_FILL_VALID_TARGET')) define('PLEASE_FILL_VALID_TARGET', 'Please fill in a valid target <tt>PageName</tt> and an (optional) edit note.'); 
    10461066/**#@-*/ 
  • trunk/libs/Wakka.class.php

    r1752 r1784  
    24352435         * Check if a given string contains prohibited characters. 
    24362436         * Currently, these prohibited characters are: 
    2437          *   | ? = < > ' " & 
     2437         *   [ ] { } % + | ? = < > ' " / 0x00-0x1f 0x7f , 
    24382438         * 
    24392439         * @param       string $text mandatory: 
     
    24442444        function IsWikiName($text) 
    24452445        { 
    2446                 $result = preg_match("/[\|\?=<>\'\"&\/%]/", $text); 
     2446                $result = preg_match("/[\[\]\{\}%\+\|\?=<>\'\"\/\\x00-\\x1f\\x7f,]/", html_entity_decode($text)); 
    24472447                return !$result; 
    24482448        } 
     
    26172617                if ($user = $this->GetUser()) 
    26182618                { 
    2619                         $theme =  ($user['theme']!='')? $user['theme'] : $this->GetConfigValue('theme'); 
     2619                        $theme =  (isset($user['theme']) && $user['theme']!='')? $user['theme'] : $this->GetConfigValue('theme'); 
    26202620                } 
    26212621                else 
     
    41164116        function TrimACLs($list) 
    41174117        { 
     4118                $trimmed_list = ''; 
    41184119                foreach (explode("\n", $list) as $line) 
    41194120                { 
  • trunk/setup/default.php

    r1754 r1784  
    202202        <tr><td align="right" nowrap="nowrap">Meta Description:</td><td><input type="text" size="50" name="config[meta_description]" value="<?php if(isset($wakkaConfig["meta_description"])) echo $wakkaConfig["meta_description"] ?>" /></td></tr> 
    203203        <tr><td></td><td>Choose the <em>look and feel</em> of your wiki (you'll be able to change this later).</td></tr> 
    204         <tr><td align="right" nowrap="nowrap">Theme:</td><td><?php SelectTheme($wakkaConfig["theme"]); /* refs #1025 */ ?></td></tr> 
    205         <tr><td align="right" nowrap="nowrap">Language pack:</td><td><?php Language_selectbox($wakkaConfig["default_lang"]); /* refs #1025 */ ?></td></tr> 
     204        <tr><td align="right" nowrap="nowrap">Theme:</td><td><?php SelectTheme($wakkaConfig["theme"]); ?></td></tr> 
     205        <tr><td align="right" nowrap="nowrap">Language pack:</td><td><?php Language_selectbox($wakkaConfig["default_lang"]); ?></td></tr> 
    206206 
    207207        <?php 
  • trunk/setup/install.php

    r1754 r1784  
    239239        @mysql_query('delete from '.$config['table_prefix'].'users where name = \''.$config['admin_users'].'\'', $dblink); 
    240240    test(__('Adding admin user').'...', 
    241                 @mysql_query("insert into ".$config["table_prefix"]."users 
    242                         set name = '".$config["admin_users"]."', password = '".$pass_val."', email = '".$config["admin_email"]."', signuptime = now(), challenge='".$challenge."'", $dblink), "Hmm!", 0); 
     241                @mysql_query("insert into ".$config["table_prefix"]."users set name = '".$config["admin_users"]."', password = '".$pass_val."', email = '".$config["admin_email"]."', signuptime = now(), challenge='".$challenge."'", $dblink), "Hmm!", 0); 
    243242 
    244243        // Auto-login wiki admin 
     
    457456                'WikkaConfig'), $dblink, $config, $lang_defaults_path, $lang_defaults_fallback_path, $upgrade_note); 
    458457case "1.3": 
     458case "1.3.1": 
    459459        // Converting DB UTF-8 (but data remains 
    460460        // unchanged -- this is handled by a standalone script)  
     
    539539        test('Copying existing comment_acls to new fields...',  
    540540        @mysql_query("update ".$config['table_prefix']."acls as a inner join(select page_tag, comment_acl from ".$config['table_prefix']."acls) as b on a.page_tag = b.page_tag set a.comment_read_acl=b.comment_acl, a.comment_post_acl=b.comment_acl", $dblink), __('Failed').'. ?', 1); 
     541        test('Drop old comment acl...',  
     542        @mysql_query("alter table ".$config['table_prefix']."acls drop comment_acl", $dblink), __('Failed').'. ?', 1); 
    541543        test(__('Creating index on owner column').'...',  
    542544        @mysql_query('alter table '.$config['table_prefix'].'pages add index `idx_owner` (`owner`)', $dblink), __('Already done?  OK!'), 0);  
     
    571573                brute_copy("config/options_menu.user.inc",  
    572574                         "config/options_menu.user.inc.prev"); 
     575        test(__('Adding challenge field').'...', 
     576        @mysql_query("ALTER TABLE ".$config['table_prefix']."users ADD challenge VARCHAR( 8 ) NOT NULL default ''", $dblink), __('Already done?  OK!'), 0); 
    573577} 
    574578 
  • trunk/setup/test

  • trunk/templates/default/css/wikka.css

    r1668 r1784  
    201201        text-decoration: none; 
    202202        color: #333;     
    203 } 
    204  
    205 #content h1:hover:after,  
    206 #content h2:hover:after,  
    207 #content h3:hover:after,  
    208 #content h4:hover:after,  
    209 #content h5:hover:after,  
    210 #content h6:hover:after { 
    211         color: #aaa; content: "\0020\0020\00b6"; 
    212203} 
    213204 
  • trunk/templates/kubrick/css/kubrick.css

    r1702 r1784  
    192192a.keys { 
    193193        text-decoration: none; 
    194 } 
    195  
    196 #content h1:hover:after,  
    197 #content h2:hover:after,  
    198 #content h3:hover:after,  
    199 #content h4:hover:after,  
    200 #content h5:hover:after,  
    201 #content h6:hover:after { 
    202         color: #aaa; content: "\0020\0020\00b6"; 
    203194} 
    204195 
  • trunk/templates/light/css/light.css

    r1755 r1784  
    235235} 
    236236 
    237 #content h1:hover:after,  
    238 #content h2:hover:after,  
    239 #content h3:hover:after,  
    240 #content h4:hover:after,  
    241 #content h5:hover:after,  
    242 #content h6:hover:after { 
    243         color: #aaa; content: "\0020\0020\00b6"; 
    244 } 
    245  
    246237#content a.heading { 
    247238        line-height: inherit; 
     
    383374 
    384375#content h1 { 
    385         font: normal 18pt/20pt Arial, "DejaVu Sans", Helvetica, Verdana, sans-serif; 
     376        font: normal 18pt/20pt  Arial, "DejaVu Sans", Helvetica, Verdana, sans-serif; 
    386377        margin: 0pt; 
    387378        color: #666; 
     
    392383 
    393384#content h2 { 
    394         font: normal 16pt/18pt Arial, "DejaVu Sans", Helvetica, Verdana, sans-serif; 
     385        font: normal 16pt/18pt  Arial, "DejaVu Sans", Helvetica, Verdana, sans-serif; 
    395386        margin: 0pt; 
    396387        color: #666; 
     
    529520        border-left: 1px solid #AAC; 
    530521        border-bottom: none; 
    531         font-family: Verdana, Arial, "DejaVu Sans", Helvetica, sans-serif; 
     522        font-family: Arial, Verdana, "DejaVu Sans", Helvetica, sans-serif; 
    532523        font-size: 100%; 
    533524        padding: 0 3px; 
  • trunk/wikka.php

    r1752 r1784  
    3535 
    3636// ---------------------- DEBUGGING AND ERROR REPORTING ----------------------- 
    37 error_reporting(E_ALL); 
    38 //error_reporting (E_ALL & E_NOTICE & E_DEPRECATED); 
     37if(version_compare(phpversion(),'5.3','<')) 
     38        error_reporting(E_ALL); 
     39else 
     40        error_reporting(E_ALL & !E_DEPRECATED); 
    3941// ---------------------- END DEBUGGING AND ERROR REPORTING ------------------- 
    4042 
     
    482484 
    483485        // is authentification given? 
     486        $ask = false; 
    484487        if (isset($_SERVER["PHP_AUTH_USER"])) { 
    485488                if (!(($_SERVER["PHP_AUTH_USER"] == "admin") && ($_SERVER["PHP_AUTH_PW"] == $lockpw))) { 
    486                         $ask = 1; 
     489                        $ask = true; 
    487490                } 
    488491        } else { 
    489                 $ask = 1; 
     492                $ask = true; 
    490493        } 
    491494