Plugin Directory

Changeset 1760640


Ignore:
Timestamp:
11/08/2017 09:34:13 AM (8 years ago)
Author:
frankverhoeven
Message:

Rolled back to working 3.0.2

Location:
fv-community-news/trunk
Files:
3 deleted
10 edited

Legend:

Unmodified
Added
Removed
  • fv-community-news/trunk

    • Property svn:ignore
      •  

        old new  
        1 .idea
         1nbproject
  • fv-community-news/trunk/fv-community-news.php

    r606779 r1760640  
    2323    {
    2424        /**
     25         * @var string
     26         */
     27        public $version = '3.0.3';
     28
     29        /**
     30         * @var FvCommunityNews
     31         */
     32        private static $_instance;
     33
     34        /**
    2535         * __construct()
    2636         *
     
    3040        public function __construct()
    3141        {
    32             $this->_setupAutoloader();
     42
    3343        }
    3444
     
    8292
    8393            return $this;
    84         }
    85 
    86         /**
    87          * Start the autoloader.
    88          *
    89          * @return FvCommunityNews
    90          */
    91         protected function _setupAutoloader()
    92         {
    93             require_once './fvcn-includes/classes/library/FV/Loader.php';
    94             require_once './fvcn-includes/classes/library/FV/Loader/Autoloader.php';
    95 
    96             $autoloader = new FV_Loader_AutoLoader( new FV_Loader() );
    97 
    98             $autoloader->registerNamespace('FvCommunityNews', '../../../application')
    99                        ->register();
    100 
    101             return $this;
    10294        }
    10395
     
    321313            return $this;
    322314        }
     315
     316
     317        /**
     318         * setInstance()
     319         *
     320         * @version 20120710
     321         * @param FvCommunityNews $instance
     322         * @return FvCommunityNews
     323         */
     324        public static function setInstance(FvCommunityNews $instance=null)
     325        {
     326            if (null === self::$_instance) {
     327                if (null === $instance) {
     328                    self::$_instance = new FvCommunityNews();
     329                } else {
     330                    self::$_instance = $instance;
     331                }
     332            }
     333        }
     334
     335        /**
     336         * getInstance()
     337         *
     338         * @version 20120710
     339         * @return FvCommunityNews
     340         */
     341        public static function getInstance()
     342        {
     343            self::setInstance();
     344            return self::$_instance;
     345        }
    323346    }
    324347
     
    329352     */
    330353    try {
    331         $FvCommunityNews = new FvCommunityNews();
    332         $FvCommunityNews->start();
     354        FvCommunityNews::getInstance()->start();
    333355    } catch (Exception $e) {
    334356        if (defined('WP_DEBUG') && true === WP_DEBUG) {
  • fv-community-news/trunk/fvcn-includes/classes/library/FV/Config.php

    r606779 r1760640  
    3232    public function set($key, $value)
    3333    {
    34        
     34
    3535    }
    3636
  • fv-community-news/trunk/fvcn-includes/classes/library/FV/Config/Ini.php

    r606779 r1760640  
    5050    public function set($key, $value)
    5151    {
    52         throw new Exception('Ini configuration is read-only');
     52        $this->_config[ $key ] = $value;
     53        return $this;
    5354    }
    5455}
  • fv-community-news/trunk/fvcn-includes/classes/library/FV/Config/Interface.php

    r606779 r1760640  
    1414     */
    1515    public function get($key);
     16
     17    /**
     18     * Set an option.
     19     *
     20     * @param string $key
     21     * @param mixed $value
     22     */
     23    public function set($key, $value);
    1624}
  • fv-community-news/trunk/fvcn-includes/classes/library/FV/Config/WordPress.php

    r606779 r1760640  
    2727    public function __construct(FV_Config_Interface $default)
    2828    {
    29         if ($default instanceof FV_Config_WordPress) {
    30             throw new Exception('WordPress default config cannot be an instance of FV_Config_WordPress.');
    31         }
    32 
    3329        $this->_defaultConfig = $default;
    3430    }
  • fv-community-news/trunk/fvcn-includes/classes/library/FV/Loader.php

    r606779 r1760640  
    11<?php
    2 
    3 require_once './Loader/Interface.php';
    4 
    52
    63/**
  • fv-community-news/trunk/fvcn-includes/classes/library/FV/Loader/AutoLoader.php

    r606779 r1760640  
    11<?php
    2 
    3 require_once './Autoloader/Interface.php';
    4 
    52
    63/**
     
    121118        }
    122119
    123         $filename .= './' . str_replace(array('_', '\\'), '/', $className) . '.php';
     120        $filename .= '/' . str_replace(array('_', '\\'), DIRECTORY_SEPARATOR, $className);
    124121
    125122        return $filename;
  • fv-community-news/trunk/fvcn-includes/classes/library/FV/Loader/Autoloader/Interface.php

    r606779 r1760640  
    99{
    1010    /**
    11      * Register a namespace.
    12      *
    13      * @param string $namespace
    14      * @param string $location
    15      * @return \FV_Loader_AutoLoader
    16      * @throws Exception
    17      */
    18     public function registerNamespace($namespace, $location);
    19 
    20     /**
    21      * Register the autoloader.
    22      *
    23      * @return \FV_Loader_AutoLoader
    24      */
    25     public function register();
    26 
    27     /**
    2811     * Autoload function.
    2912     *
  • fv-community-news/trunk/readme.txt

    r1760628 r1760640  
    22
    33Contributors:       frankverhoeven
     4Donate link:        https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=SB62B7H867Y4C&lc=US&item_name=Frank%20Verhoeven&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donate_LG%2egif%3aNonHosted
    45Tags:               Community News, Community, News, Widget, Custom Post, Custom Posting, Post, Form, Akismet, Ajax
    56Requires at least:  3.3
Note: See TracChangeset for help on using the changeset viewer.