Plugin Directory

Changeset 483672


Ignore:
Timestamp:
01/02/2012 11:12:30 PM (14 years ago)
Author:
tombenner
Message:

Updating to 1.1.2

Location:
wp-mvc
Files:
9 edited
4 copied

Legend:

Unmodified
Added
Removed
  • wp-mvc/tags/1.1.2/core/mvc_configuration.php

    r371344 r483672  
    33class MvcConfiguration {
    44
    5     function &getInstance($boot = true) {
     5    function &get_instance($boot = true) {
    66        static $instance = array();
    77       
     
    1414
    1515    function set($config, $value = null) {
    16         $_this =& MvcConfiguration::getInstance();
     16        $_this =& MvcConfiguration::get_instance();
    1717
    1818        if (!is_array($config)) {
     
    3535
    3636    function get($config) {
    37         $_this =& MvcConfiguration::getInstance();
     37        $_this =& MvcConfiguration::get_instance();
    3838
    3939        if (strpos($config, '.') !== false) {
  • wp-mvc/tags/1.1.2/core/mvc_dispatcher.php

    r451789 r483672  
    77        $controller_name = $options['controller'];
    88        $action = $options['action'];
    9         $object_id = empty($options['id']) ? null : $options['id'];
     9        $params = $options;
    1010       
    1111        $controller_class = MvcInflector::camelize($controller_name).'Controller';
     
    2121        }
    2222       
    23         $params = $_REQUEST;
    24         $params = self::escape_params($params);
     23        $request_params = $_REQUEST;
     24        $request_params = self::escape_params($request_params);
     25       
     26        $params = array_merge($request_params, $params);
    2527       
    2628        if (is_admin()) {
    2729            unset($params['page']);
    28         } else {
    29             if (empty($params['id']) && !empty($object_id)) {
    30                 $params['id'] = $object_id;
    31             }
    3230        }
    3331       
  • wp-mvc/tags/1.1.2/core/mvc_router.php

    r451789 r483672  
    4242                    $value = $options[$option_key];
    4343                    $path = preg_replace('/'.preg_quote($pattern).'/', $value, $path, 1);
     44                } else if (isset($options['object']) && is_object($options['object'])) {
     45                    if (isset($options['object']->{$option_key})) {
     46                        $value = $options['object']->{$option_key};
     47                        $path = preg_replace('/'.preg_quote($pattern).'/', $value, $path, 1);
     48                        $path = rtrim($path, '.*?');
     49                    }
    4450                }
    4551            }
  • wp-mvc/tags/1.1.2/readme.txt

    r452703 r483672  
    33Tags: mvc, framework, model, view, controller, development, plugin
    44Requires at least: 3.0
    5 Tested up to: 3.2.1
    6 Stable tag: 1.1.1
     5Tested up to: 3.3
     6Stable tag: 1.1.2
    77
    88WP MVC is a full-fledged MVC framework, similar to CakePHP and Rails, that developers can use to create WordPress plugins.
  • wp-mvc/tags/1.1.2/wp_mvc.php

    r472892 r483672  
    55Description: Sets up an MVC framework inside of WordPress.
    66Author: Tom Benner
    7 Version: 1.1.1
     7Version: 1.1.2
    88Author URI:
    99*/
  • wp-mvc/trunk/core/mvc_configuration.php

    r371344 r483672  
    33class MvcConfiguration {
    44
    5     function &getInstance($boot = true) {
     5    function &get_instance($boot = true) {
    66        static $instance = array();
    77       
     
    1414
    1515    function set($config, $value = null) {
    16         $_this =& MvcConfiguration::getInstance();
     16        $_this =& MvcConfiguration::get_instance();
    1717
    1818        if (!is_array($config)) {
     
    3535
    3636    function get($config) {
    37         $_this =& MvcConfiguration::getInstance();
     37        $_this =& MvcConfiguration::get_instance();
    3838
    3939        if (strpos($config, '.') !== false) {
  • wp-mvc/trunk/core/mvc_dispatcher.php

    r451789 r483672  
    77        $controller_name = $options['controller'];
    88        $action = $options['action'];
    9         $object_id = empty($options['id']) ? null : $options['id'];
     9        $params = $options;
    1010       
    1111        $controller_class = MvcInflector::camelize($controller_name).'Controller';
     
    2121        }
    2222       
    23         $params = $_REQUEST;
    24         $params = self::escape_params($params);
     23        $request_params = $_REQUEST;
     24        $request_params = self::escape_params($request_params);
     25       
     26        $params = array_merge($request_params, $params);
    2527       
    2628        if (is_admin()) {
    2729            unset($params['page']);
    28         } else {
    29             if (empty($params['id']) && !empty($object_id)) {
    30                 $params['id'] = $object_id;
    31             }
    3230        }
    3331       
  • wp-mvc/trunk/core/mvc_router.php

    r451789 r483672  
    4242                    $value = $options[$option_key];
    4343                    $path = preg_replace('/'.preg_quote($pattern).'/', $value, $path, 1);
     44                } else if (isset($options['object']) && is_object($options['object'])) {
     45                    if (isset($options['object']->{$option_key})) {
     46                        $value = $options['object']->{$option_key};
     47                        $path = preg_replace('/'.preg_quote($pattern).'/', $value, $path, 1);
     48                        $path = rtrim($path, '.*?');
     49                    }
    4450                }
    4551            }
  • wp-mvc/trunk/readme.txt

    r452703 r483672  
    33Tags: mvc, framework, model, view, controller, development, plugin
    44Requires at least: 3.0
    5 Tested up to: 3.2.1
    6 Stable tag: 1.1.1
     5Tested up to: 3.3
     6Stable tag: 1.1.2
    77
    88WP MVC is a full-fledged MVC framework, similar to CakePHP and Rails, that developers can use to create WordPress plugins.
  • wp-mvc/trunk/wp_mvc.php

    r472892 r483672  
    55Description: Sets up an MVC framework inside of WordPress.
    66Author: Tom Benner
    7 Version: 1.1.1
     7Version: 1.1.2
    88Author URI:
    99*/
Note: See TracChangeset for help on using the changeset viewer.