Plugin Directory

Changeset 348407


Ignore:
Timestamp:
02/21/2011 12:34:28 AM (15 years ago)
Author:
beatpanda
Message:

cleaning up SVN

Location:
wordpress-wiki/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • wordpress-wiki/trunk/controllers/wiki_admin.php

    r346548 r348407  
    3838            return true;
    3939        } else {
    40 <<<<<<< HEAD
    41             $wiki = get_role('wiki_editor');
    42             if ( $wiki->has_cap('edit_posts') ) {
    43                 return true;   
    44             } else {
    45 =======
    4640            $wiki = get_role('wiki_editor');           
    4741            if ( $wiki != null) {
     
    5347                    add_role( 'wiki_editor', 'Wiki Editor', array('read' => true) );
    5448                }
    55 >>>>>>> master
    5649                return false;
    5750            }
     
    6053   
    6154    function options_page() {
    62 <<<<<<< HEAD
    63         //TODO: This options page needs to provide a means to upgrade old WP-Wiki installs.
    64         //  1. For installs on 3.0, upgrade wiki pages to custom post types
    65         //  2. For all installs, upgrade options. They are:
    66         //      wiki_email_admins
    67         //      wiki_show_toc_onfrontpage
    68         //      wiki_cron_email
    69 =======
    70 >>>>>>> master
    7155        global $wp_version;
    7256        $wpw_options = get_option('wpw_options');
     
    7963        if ($wiki->has_cap('edit_posts')) {
    8064            remove_role('wiki_editor');
    81 <<<<<<< HEAD
    82             add_role( 'wiki_editor', 'Wiki Editor', array('read' => true) );
    83 =======
    84 >>>>>>> master
    8565        }
    8666        echo "Succesfully upgraded Wiki Editor role";
     
    151131    //On page update/edit
    152132   
    153 <<<<<<< HEAD
    154     function replace_current_with_pending($id) {
    155         //$revision = get_posts('include='.$id.'&post_status=pending');
    156         //var_dump($revision[0]);
    157 =======
    158133    function convert_pages_recursively($id) {
    159134        $children = get_posts('post_type=any&post_parent='.$id.'&status=publish&numberposts=-1');
     
    172147        //var_dump($revision[0])
    173148       
    174 >>>>>>> master
    175149        if(!isset($_POST['wpw_is_admin']))
    176150            return;
     
    182156       
    183157        if($wp_version < 3.0) {
    184 <<<<<<< HEAD
    185             if(isset($_POST['wpw_is_wiki']) && $_POST['wpw_is_wiki'] == "true" )
    186                 update_post_meta($id, '_wiki_page', 1);
    187             else
    188                 delete_post_meta($id, '_wiki_page');
    189         }
    190        
    191         if($this->WikiHelper->is_wiki('check_no_post',$id)) {
    192             if(isset( $_POST['wpw_toc']) ):
    193                 if ($_POST['wpw_toc'] == "true" )
    194                     update_post_meta($id, '_wiki_page_toc', 1);
    195                 else
    196                     delete_post_meta($id, '_wiki_page_toc');
    197 =======
    198158            if(isset($_POST['wpw_is_wiki']) && $_POST['wpw_is_wiki'] == "true" ):
    199159                update_post_meta($id, '_wiki_page', 1);
     
    208168            else:
    209169                delete_post_meta($id, '_wiki_page_toc');
    210 >>>>>>> master
    211170            endif;
    212171               
     
    226185            $id_we_are_changing = $_POST['wpw_change_wiki_id'];
    227186            $update_post = get_post($id_we_are_changing, 'ARRAY_A');
    228 <<<<<<< HEAD
    229             unset($update_post['ID']);
    230             unset($update_post['post_parent']);
    231             $update_post['post_type'] = 'wiki';
    232             $update_post['post_status'] = 'publish';
    233             $new = wp_insert_post($update_post);
    234             wp_delete_post($id_we_are_changing, true);
    235 =======
    236187            //The hackiest hack that ever hacked
    237188            $this->convert_pages_recursively($id_we_are_changing);
     
    239190            $update_post['post_status'] = 'publish';
    240191            $new = wp_update_post($update_post);
    241 >>>>>>> master
    242192            wp_redirect( get_edit_post_link($new, 'go_to_it') );
    243193        }
    244194   
    245195        //echo print_r($_POST, true).get_option('wiki_email_admins');
    246 <<<<<<< HEAD
    247     }
    248    
    249 =======
    250196    }   
    251 >>>>>>> master
    252197   
    253198    ///BUH
     
    318263            <h5><?php _e('Wiki Page'); ?></h5> 
    319264            <input type="checkbox" name="wpw_change_to_wiki" value="true" />
    320 <<<<<<< HEAD
    321             <label for="wpw_change_to_wiki"><?php _e('This is a Wiki page. Logged in users can edit its content.'); ?></label>
    322 =======
    323265            <label for="wpw_change_to_wiki"><?php _e('Convert this page and all of its subpages to Wikis.'); ?></label>
    324 >>>>>>> master
    325266            <input type="hidden" name="wpw_change_wiki_id" value="<?php echo $_GET['post']; ?>" />
    326267    <?php 
  • wordpress-wiki/trunk/controllers/wiki_pages.php

    r346548 r348407  
    2929        if($revisions) {
    3030            //Loop through them!
    31 <<<<<<< HEAD
    32 =======
    3331            $count = 0;
    34 >>>>>>> master
    3532            foreach ($revisions as $revision) {
    3633                if( @wp_get_post_autosave($post->ID)->ID != $revision->ID) {
     
    4138                    $revision_title = sprintf(__('Revision @ %1s by %2s'), $date, $author);
    4239                    $output.= '<a href="'.get_permalink($post->ID).'?revision='.$revision->ID.'">'.$revision_title.'</a><br />';
    43 <<<<<<< HEAD
    44                 }
    45             }
    46         }
    47 =======
    4840                    $count++;   
    4941                }
    5042            }
    5143        }
    52 >>>>>>> master
    5344        return $output;
    5445        }
     
    110101   
    111102    function styles() {
    112 <<<<<<< HEAD
    113         wp_enqueue_style('wordpress-wiki', PLUGIN_URL ."/".WPWIKI_DIR_NAME."/static/style.css");
    114 =======
    115103        wp_enqueue_style('wordpress-wiki', PLUGIN_URL ."/".WPWIKI_DIR_NAME."/static/style.css");
    116104        if ( is_rtl() )
    117105            wp_enqueue_style('wordpress-wiki-rtl', PLUGIN_URL ."/".WPWIKI_DIR_NAME."/static/rtl.css");
    118 >>>>>>> master
    119106    }
    120107   
     
    145132        if ( $this->WikiHelper->is_wiki('front_end_check') ) {
    146133            $wpw_options = get_option('wpw_options');
    147 <<<<<<< HEAD
    148             //if ( current_user_can('edit_wiki') ) {
    149                 remove_filter('the_content', 'wpautop');
    150                 remove_filter('the_content', 'wptexturize');
    151                 add_action('get_header', array($this,'styles'));
    152                 add_action('get_header', array($this,'scripts'), 9);
    153                 add_filter('the_content',array($this, 'substitute_in_revision_content'),11);
    154                 add_filter('the_content',array($this,'front_end_interface'),12);
    155                 add_action('wp_footer',array($this,'inline_editor'));
    156                    
    157             //} else {
    158             //  add_filter('the_content','wpw_nope');
    159             //}
    160 =======
    161134            remove_filter('the_content', 'wpautop');
    162135            remove_filter('the_content', 'wptexturize');
     
    170143                add_filter('the_content',array($this,'wpw_nope') );
    171144            }
    172 >>>>>>> master
    173145        }
    174146    }
     
    179151    function wpw_nope($content) {
    180152        global $post;
    181 <<<<<<< HEAD
    182         $content = wpw_wiki_parser($content, $post->post_title);
    183         $content = wpw_table_of_contents($content);
    184 =======
    185153        $content = $this->get_content($content);
    186 >>>>>>> master
    187154        $message = __('This page is a Wiki!');
    188155        $message .= '&nbsp;<a href="'.wp_login_url(get_permalink($post->ID)).'">'.__('Log in or register an account to edit.').'</a>';
     
    351318   
    352319    function set_toc($post_id) {
    353 <<<<<<< HEAD
    354         if ($this->WikiHelper->is_wiki('check_no_post',$post_id))
    355             update_post_meta($post_id,'_wiki_page_toc',1);
    356     }
    357    
    358     function save_post() {
    359         if (isset($_POST['_wpnonce']) && wp_verify_nonce($_POST['_wpnonce'], 'wpw_edit_form')) {
    360 =======
    361320        if ($this->WikiHelper->is_wiki('check_no_post',$post_id) & get_post_meta($post_id,'_wiki_page_toc_on_by_default', true) != 1) {
    362321            update_post_meta($post_id,'_wiki_page_toc',1);
     
    367326    function save_post() {
    368327        if (!$this->WikiHelper->is_restricted() && isset($_POST['_wpnonce']) && wp_verify_nonce($_POST['_wpnonce'], 'wpw_edit_form')) {
    369 >>>>>>> master
    370328            if ($_POST['wpw_editor_content'] != null) {
    371329                extract($_POST);
  • wordpress-wiki/trunk/readme.txt

    r346558 r348407  
    55Requires at least: 2.8
    66Tested up to: 3.1
    7 Stable Tag: 1.0.1
     7Stable Tag: 1.0
    88
    99== Description ==
  • wordpress-wiki/trunk/static/style.css

    r346548 r348407  
    99    font-size: 85%;
    1010    max-width: 45%;
    11 <<<<<<< HEAD
    12    
    13 =======
    14 >>>>>>> master
    1511}
    1612
     
    1814    list-style-type: none;
    1915    background: none;
    20 <<<<<<< HEAD
    21     list-style-position:outside;
    22     font-family:"Lucida Grande",Verdana,"Bitstream Vera Sans",Arial,sans-serif;
    23     font-size: 85%;
    24     }
    25 =======
    2616    list-style-position: outside;
    2717    font-family: "Lucida Grande", Verdana, "Bitstream Vera Sans", Arial, sans-serif;
    2818    font-size: 85%;
    2919}
    30 >>>>>>> master
    3120
    3221div.contents ol li.lvl2 {
     
    3423}
    3524
    36 <<<<<<< HEAD
    37 
    38 
    39 div.contents a:hover {
    40     color:#D54E21;
    41 }
    42 
    43 div.contents a {
    44     color:#21759B;
    45     font-weight:bold;
    46     text-decoration:none;
    47 }
    48 
    49 div.contents h3 {
    50     color:#333333;
    51     background: none;
    52     font-family:Georgia,"Times New Roman",Times,serif;
    53     margin-bottom:10px;
    54     padding-left: 0px;
    55     padding-bottom: 3px;
    56     border-bottom:1px solid #DADADA;
    57         margin-top: 0px;
    58 =======
    5925div.contents a:hover {
    6026    color: #D54E21;
     
    7642    border-bottom: 1px solid #DADADA;
    7743    margin-top: 0px;
    78 >>>>>>> master
    7944}
    8045
     
    8348    font-size: 85%;
    8449}
    85 <<<<<<< HEAD
    86 div.contents a.hide, div.contents a.show {
    87     cursor: pointer;
    88     font-size: 85%;
    89   display: inline;
    90 }
    91 #wpw_tab_nav {
    92     list-style-type:none;
    93     text-align:right;
    94     width:100%;
    95 }
    96 #wpw_tab_nav li {
    97     display:inline;
    98     margin-left:10px;
    99 }
    100 #wpw_tab_nav li a {
    101     text-decoration:none;
    102 }
    103 #wpw_tab_nav li.ui-tabs-selected {
    104     font-weight:bold;
    105     border-bottom:1px dotted #000;
    106 }
    107 .ui-tabs .ui-tabs-hide, .wpw-hide-it {
    108         display: none!important;
    109 }
    110 =======
    11150
    11251div.contents a.hide, div.contents a.show {
     
    13978    display: none!important;
    14079}
    141 >>>>>>> master
  • wordpress-wiki/trunk/views/options_page.php

    r346548 r348407  
    6464            </tr>
    6565           
    66 <<<<<<< HEAD
    67 =======
    6866            <tr valign="top">
    6967                <th scope="row">
     
    7472            </tr>
    7573           
    76 >>>>>>> master
    7774            <!--tr valign="top">
    7875                <th scope="row">
  • wordpress-wiki/trunk/wiki_helpers.php

    r346548 r348407  
    5353        return false;
    5454    }
    55 <<<<<<< HEAD
    56 =======
    5755   
    5856    function is_restricted() {
     
    6765        endif;
    6866    }
    69 >>>>>>> master
    7067}
    7168?>
  • wordpress-wiki/trunk/wordpress-wiki.php

    r334363 r348407  
    44Plugin URI: http://wordpress.org/extend/plugins/wordpress-wiki/
    55Description: Add Wiki functionality to your wordpress site.
    6 Version: 1.0
     6Version: 1.0.1RC3
    77Author: Dan Milward/Matthew Gerring
    88Author URI: http://www.instinct.co.nz
     
    1616    function WP_Wiki() {
    1717        global $wp_version;
    18        
    19         //include component controllers
    20         include('model/wiki_post_type.php');
    21         include('controllers/wiki_pages.php');
    22         include('controllers/wiki_notifications.php');
    23         include('controllers/wiki_feed.php');
    24         include('controllers/wiki_admin.php');
    25         include('controllers/wiki_dashboard_widget.php');
    26         include('controllers/wiki_user_contrib_widget.php');
    27         include('wiki_helpers.php');
    28        
    29         //include Wiki Parser class here so it doesn't get re-declared- fixes issue #4 on GitHub. Thanks Nexiom!
    30         include('lib/WPW_WikiParser.php');
    31        
    3218        /**
    3319        * Guess the wp-content and plugin urls/paths
     
    4531        define('WPWIKI_FILE_PATH', dirname(__FILE__));
    4632        define('WPWIKI_DIR_NAME', basename(WPWIKI_FILE_PATH));
     33       
     34        //include component controllers
     35        include(WPWIKI_FILE_PATH.'/model/wiki_post_type.php');
     36        include(WPWIKI_FILE_PATH.'/controllers/wiki_pages.php');
     37        include(WPWIKI_FILE_PATH.'/controllers/wiki_notifications.php');
     38        include(WPWIKI_FILE_PATH.'/controllers/wiki_feed.php');
     39        include(WPWIKI_FILE_PATH.'/controllers/wiki_admin.php');
     40        include(WPWIKI_FILE_PATH.'/controllers/wiki_dashboard_widget.php');
     41        include(WPWIKI_FILE_PATH.'/controllers/wiki_user_contrib_widget.php');
     42        include(WPWIKI_FILE_PATH.'/wiki_helpers.php');
     43       
     44        //include Wiki Parser class here so it doesn't get re-declared- fixes issue #4 on GitHub. Thanks Nexiom!
     45        include(WPWIKI_FILE_PATH.'/lib/wpw_wikiparser.php');
     46       
     47       
    4748       
    4849        //Enables Wiki Pages
     
    6667           
    6768            //Make Table of Contents on by default for Wiki post type
    68             add_action('publish_wiki',array($WikiPageController,'set_toc'));
     69            add_action('publish_wiki',array($WikiPageController,'set_toc'), 12);
    6970           
    7071            //Make Table of Contents on by default for pages marked as Wikis
     
    102103        //Admin pages
    103104        add_action('admin_menu', array($WikiAdmin,'register_options_page'));
    104         add_action('save_post',array($WikiAdmin,'replace_current_with_pending'));
     105        add_action('publish_wiki', array($WikiAdmin,'replace_current_with_pending'), 11);
     106        add_action('publish_page', array($WikiAdmin,'replace_current_with_pending'), 11);
    105107        add_action('admin_menu', array($WikiAdmin,'add_custom_box'));
    106108       
Note: See TracChangeset for help on using the changeset viewer.