Plugin Directory

Changeset 764107


Ignore:
Timestamp:
08/29/2013 10:22:33 AM (12 years ago)
Author:
Travelgrove
Message:

Call-time pass-by-reference errors fixed in each file

Location:
travel-search/tags/1.2.5
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • travel-search/tags/1.2.5/classes/searchboxesSettingsFormRenderer.class.php

    r751809 r764107  
    4848    function admin_init() {
    4949        // registering the settings
    50         register_setting('tg_searchboxes_options', 'tg_searchboxes_options', array(&$this, 'validate_options'));
    51         add_settings_section('tg_searchboxes_options', 'Default Searchbox Values and Targeting Options', array(&$this, 'description_text'), 'tg_searchboxes_options');
     50        register_setting('tg_searchboxes_options', 'tg_searchboxes_options', array($this, 'validate_options'));
     51        add_settings_section('tg_searchboxes_options', 'Default Searchbox Values and Targeting Options', array($this, 'description_text'), 'tg_searchboxes_options');
    5252        // adding the id referral field to the form as a setting field
    53         add_settings_field('tg_searchboxes_options_id_referral', 'Your unique Travelgrove affiliate ID:', array(&$this, 'id_referral_input'), 'tg_searchboxes_options', 'tg_searchboxes_options');
     53        add_settings_field('tg_searchboxes_options_id_referral', 'Your unique Travelgrove affiliate ID:', array($this, 'id_referral_input'), 'tg_searchboxes_options', 'tg_searchboxes_options');
    5454        // adding the date format select to the form as a setting field
    55         add_settings_field('tg_searchboxes_options_date_format', 'Date Format:', array(&$this, 'date_format_select'), 'tg_searchboxes_options', 'tg_searchboxes_options');
     55        add_settings_field('tg_searchboxes_options_date_format', 'Date Format:', array($this, 'date_format_select'), 'tg_searchboxes_options', 'tg_searchboxes_options');
    5656        // adding the departure date select to the form as a setting field
    57         add_settings_field('tg_searchboxes_options_departure_date', 'Default Departure Date:', array(&$this, 'departure_date_select'), 'tg_searchboxes_options', 'tg_searchboxes_options');
     57        add_settings_field('tg_searchboxes_options_departure_date', 'Default Departure Date:', array($this, 'departure_date_select'), 'tg_searchboxes_options', 'tg_searchboxes_options');
    5858        // adding the return date select to the form as a setting field
    59         add_settings_field('tg_searchboxes_options_return_date', 'Default Return Date:', array(&$this, 'return_date_select'), 'tg_searchboxes_options', 'tg_searchboxes_options');
     59        add_settings_field('tg_searchboxes_options_return_date', 'Default Return Date:', array($this, 'return_date_select'), 'tg_searchboxes_options', 'tg_searchboxes_options');
    6060    }
    6161   
  • travel-search/tags/1.2.5/controllers/controller-admin.php

    r751809 r764107  
    6969    function __construct() {
    7070        //  activation hook used to install the plugin - saving the default options into WP options table
    71         register_activation_hook( TG_SEARCHBOXES__FILE__, array( &$this, 'tg_searchboxes_install' ) );
     71        register_activation_hook( TG_SEARCHBOXES__FILE__, array( $this, 'tg_searchboxes_install' ) );
    7272        //  deac.hook - deleting the options for TG-searchboxes from WP options table
    73         register_deactivation_hook(TG_SEARCHBOXES__FILE__, array(&$this, 'tg_searchboxes_deactivate'));
     73        register_deactivation_hook(TG_SEARCHBOXES__FILE__, array($this, 'tg_searchboxes_deactivate'));
    7474        //  call parent's constructor for reading the options from WP options table
    7575        parent::__construct();
     
    7878
    7979        // adding a menu to the menues on the left of the dashboard
    80         add_action( 'admin_menu', array(&$this, 'tg_searchboxes_create_menu'));
     80        add_action( 'admin_menu', array($this, 'tg_searchboxes_create_menu'));
    8181
    8282        // initializing the class needed to display the html for the searchboxes settings page
    8383        $this->searchboxesSettingsFormRenderer = new searchboxesSettingsFormRenderer($this);
    84         add_action('admin_init', array(&$this->searchboxesSettingsFormRenderer, 'admin_init'));
    85 //      add_action('admin_init', array(&$this, 'jquery_ui'), 0);
     84        add_action('admin_init', array($this->searchboxesSettingsFormRenderer, 'admin_init'));
     85//      add_action('admin_init', array($this, 'jquery_ui'), 0);
    8686        //  is an AJAX request or not; DOING_AJAX is set by WP automatically; AJAX req. is triggered on Add-TG-Box button click
    8787        $doing_ajax = defined('DOING_AJAX') ? DOING_AJAX : false;
     
    9292            // valid ajax req. => Editor Button clicked => then on the thickbox popup div show the content of the specified views
    9393            // currently there's only 1 action+fn. for that:do_action_tg_searchboxes
    94             add_action( 'init', array( &$this, 'do_action_' . $_GET['action'] ) );
     94            add_action( 'init', array( $this, 'do_action_' . $_GET['action'] ) );
    9595        }
    9696        // the editor button will be present only on the pages in the array below
     
    9898        foreach ( $pages_with_editor_button as $page ) {
    9999            // if any of the given pages are loaded => edd the editor button
    100             add_action( 'load-' . $page, array( &$this, 'add_editor_button' ) );
     100            add_action( 'load-' . $page, array( $this, 'add_editor_button' ) );
    101101        }
    102102        return;
     
    144144            $this->page_slug,
    145145            // The function that displays the page content for the menu page
    146             array(&$this, 'tg_searchboxes_load_view'),
    147 //          array(&$this, 'tg_searchboxes_settings'),
     146            array($this, 'tg_searchboxes_load_view'),
     147//          array($this, 'tg_searchboxes_settings'),
    148148            // The url to the icon to be used for this menu
    149149            plugins_url( '/images/tg20x20.gif', TG_SEARCHBOXES__FILE__ )
     
    152152        add_action( 'admin_print_styles-'.$searchboxesSettingsPage,
    153153                // enqueuing the needed JS+CSS files via WP
    154                 array(&$this, 'tg_searchboxes_admin_head'));
     154                array($this, 'tg_searchboxes_admin_head'));
    155155
    156156        $demoPage   = add_submenu_page(
     
    166166            'tg_searchboxes_demo',
    167167            // the function to be called to output the content for this page.
    168             array(&$this, 'tg_searchboxes_load_view')
     168            array($this, 'tg_searchboxes_load_view')
    169169        );
    170170        // loading the JS+CSS needed when the demo page is displayed; the same as on the post page
    171         add_action('admin_print_styles-'.$demoPage, array(&$this, 'tg_searchboxes_frontend_head'));
     171        add_action('admin_print_styles-'.$demoPage, array($this, 'tg_searchboxes_frontend_head'));
    172172        return true;
    173173    }
     
    236236        $jsfile     = "admin/admin-editor-buttons-script.min.js";
    237237            // printing the scripts needed
    238         add_action('wp_print_scripts', array(&$this, 'tg_searchboxes_admin_scripts'));
     238        add_action('wp_print_scripts', array($this, 'tg_searchboxes_admin_scripts'));
    239239
    240240        // HTML editor integration
     
    256256        // TinyMCE integration
    257257        if ( user_can_richedit() ) {
    258             add_filter( 'mce_external_plugins', array( &$this, 'add_tinymce_plugin' ));
    259             add_filter( 'mce_buttons', array( &$this, 'add_tinymce_button' ), 0);
     258            add_filter( 'mce_external_plugins', array( $this, 'add_tinymce_plugin' ));
     259            add_filter( 'mce_buttons', array( $this, 'add_tinymce_button' ), 0);
    260260        }
    261261       
    262         add_action( 'admin_print_footer_scripts', array( &$this, '_print_editor_button' ), 51);
     262        add_action( 'admin_print_footer_scripts', array( $this, '_print_editor_button' ), 51);
    263263    }
    264264   
  • travel-search/tags/1.2.5/controllers/controller-frontend.php

    r741552 r764107  
    2424    /** call parent's constructor for reading the options from WP options table */
    2525    parent::__construct();
    26 //  add_action('wp_enqueue_scripts', array(&$this, 'jquery_ui'), 0);
     26//  add_action('wp_enqueue_scripts', array($this, 'jquery_ui'), 0);
    2727    /** adding to the dom the css files needed by the plugin in the frontend    */
    2828    $this->enqueue_tg_searchboxes_css();
     
    3131    /** adding a hook for the shortcode "tg_searchboxes";
    3232    * WP will automatically pass the found arguments: [shortcode argument1=value1 argument2=value2] */
    33     add_shortcode($this->shortcode_tg_searchboxes, array(&$this, 'tg_searchboxes_handle_tg_shortcode'));
     33    add_shortcode($this->shortcode_tg_searchboxes, array($this, 'tg_searchboxes_handle_tg_shortcode'));
    3434   
    3535    // checking if current request is to load the searchbox via external JS file
     
    146146function tg_searchboxes_handle_tg_shortcode($attr) {
    147147    /** init the renderer w/ the params. found in the source, by WP fn. */
    148     $tgSearchboxesRenderer  = new tgSearchboxesRenderer(&$this, $attr);
     148    $tgSearchboxesRenderer  = new tgSearchboxesRenderer($this, $attr);
    149149    // return the generated searchbox
    150150    return $tgSearchboxesRenderer->renderSearchboxes();
  • travel-search/tags/1.2.5/views/admin/demo/content.php

    r723445 r764107  
    1616<?php
    1717    $atts   = array( 'options' => '{"size":"dynamic"}');
    18     $tgSearchboxesRenderer  = new tgSearchboxesRenderer(&$this, $atts);
     18    $tgSearchboxesRenderer  = new tgSearchboxesRenderer($this, $atts);
    1919    echo $tgSearchboxesRenderer->renderSearchboxes();
    2020?>
     
    2525<?php
    2626    $atts = array( 'options' => '{"size":"160x600"}');
    27     $tgSearchboxesRenderer = new tgSearchboxesRenderer(&$this, $atts);
     27    $tgSearchboxesRenderer = new tgSearchboxesRenderer($this, $atts);
    2828    echo $tgSearchboxesRenderer->renderSearchboxes();
    2929?>
     
    3535<?php
    3636    $atts = array( 'options' => '{"size":"300x250"}');
    37     $tgSearchboxesRenderer = new tgSearchboxesRenderer(&$this, $atts);
     37    $tgSearchboxesRenderer = new tgSearchboxesRenderer($this, $atts);
    3838    echo $tgSearchboxesRenderer->renderSearchboxes();
    3939?>
     
    4444<?php
    4545    $atts = array( 'options' => '{"size":"300x533"}');
    46     $tgSearchboxesRenderer = new tgSearchboxesRenderer(&$this, $atts);
     46    $tgSearchboxesRenderer = new tgSearchboxesRenderer($this, $atts);
    4747    echo $tgSearchboxesRenderer->renderSearchboxes();
    4848?>
     
    5353<?php
    5454    $atts = array( 'options' => '{"size":"728x90"}');
    55     $tgSearchboxesRenderer = new tgSearchboxesRenderer(&$this, $atts);
     55    $tgSearchboxesRenderer = new tgSearchboxesRenderer($this, $atts);
    5656    echo $tgSearchboxesRenderer->renderSearchboxes();
    5757?>
  • travel-search/tags/1.2.5/views/admin/settings/content.php

    r723445 r764107  
    7373<?php   
    7474    $atts = array('options' =>'{"size":"300x250", "defaultSettings":true}');
    75     $tgSearchboxesRenderer = new tgSearchboxesRenderer(&$this, $atts);
     75    $tgSearchboxesRenderer = new tgSearchboxesRenderer($this, $atts);
    7676    echo $tgSearchboxesRenderer->renderSearchboxes();
    7777?>
  • travel-search/tags/1.2.5/views/admin/tg_searchboxes/160x600/content.php

    r723445 r764107  
    1414<?php
    1515    $atts = array( 'options' => '{"size":"160x600", "ajaxSettings":true}');
    16     $tgSearchboxesRenderer = new tgSearchboxesRenderer(&$this, $atts);
     16    $tgSearchboxesRenderer = new tgSearchboxesRenderer($this, $atts);
    1717    echo $tgSearchboxesRenderer->renderSearchboxes();
    1818?>
  • travel-search/tags/1.2.5/views/admin/tg_searchboxes/300x250/content.php

    r723445 r764107  
    1414<?php
    1515    $atts   = array( 'options' => '{"size":"300x250", "ajaxSettings":true}');
    16     $tgSearchboxesRenderer  = new tgSearchboxesRenderer(&$this, $atts);
     16    $tgSearchboxesRenderer  = new tgSearchboxesRenderer($this, $atts);
    1717    echo $tgSearchboxesRenderer->renderSearchboxes();
    1818?>
  • travel-search/tags/1.2.5/views/admin/tg_searchboxes/300x533/content.php

    r723445 r764107  
    1414<?php
    1515    $atts = array( 'options' => '{"size":"300x533", "ajaxSettings":true}');
    16     $tgSearchboxesRenderer = new tgSearchboxesRenderer(&$this, $atts);
     16    $tgSearchboxesRenderer = new tgSearchboxesRenderer($this, $atts);
    1717    echo $tgSearchboxesRenderer->renderSearchboxes();
    1818?>
  • travel-search/tags/1.2.5/views/admin/tg_searchboxes/728x90/content.php

    r723445 r764107  
    1414<?php
    1515    $atts = array( 'options' => '{"size":"728x90", "ajaxSettings":true}');
    16     $tgSearchboxesRenderer = new tgSearchboxesRenderer(&$this, $atts);
     16    $tgSearchboxesRenderer = new tgSearchboxesRenderer($this, $atts);
    1717    echo $tgSearchboxesRenderer->renderSearchboxes();
    1818?>
  • travel-search/tags/1.2.5/views/admin/tg_searchboxes/dynamic/content.php

    r723445 r764107  
    1414<?php
    1515    $atts = array( 'options' => '{"size":"dynamic", "ajaxSettings":true}');
    16     $tgSearchboxesRenderer = new tgSearchboxesRenderer(&$this, $atts);
     16    $tgSearchboxesRenderer = new tgSearchboxesRenderer($this, $atts);
    1717    echo $tgSearchboxesRenderer->renderSearchboxes();
    1818?>
Note: See TracChangeset for help on using the changeset viewer.