Plugin Directory

Changeset 536720


Ignore:
Timestamp:
04/26/2012 12:43:11 PM (14 years ago)
Author:
Skowron
Message:

PP-1548 Wordpress Plugin should not show the appId and Token within 'inline place' code

Location:
nokia-mapsplaces/trunk/page
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • nokia-mapsplaces/trunk/page/js/core.js

    r534035 r536720  
    164164       
    165165        // Now href should be given precedence
    166         options.href = currentHref;
     166        options.href = currentHref.replace(/(app_id=[^&]+&?)/, '').replace(/(app_code=[^&]+&?)/, '');
    167167        /*
    168168        if (data.href) {
  • nokia-mapsplaces/trunk/page/place.php

    r534035 r536720  
    8888
    8989            var data = {
     90                appId: 'I5YGccWtqlFgymFvzbq1',
     91                authenticationToken: 'L6NaX3SgOkROXjtP-oLPSg',
    9092                "template": template,
    9193                <?php
     
    98100                ?>
    99101            }
     102           
     103            data.href = data.href.replace(/(app_id=[^&]+&?)/, '').replace(/(app_code=[^&]+&?)/, '');
     104            var appCodeData = 'app_id=' + data.appId + '&app_code=' + data.authenticationToken;
     105            var separator = data.href.match(/\?/) ? "&" : "?";
     106
     107            data.href = data.href + separator + appCodeData;
     108           
    100109            if('auto' === data.sizes.width){
    101110                var iframeid = document.getElementById('iframeid').getAttribute('content');
     
    112121                    document.getElementById('placewidget').className = data.displayOptions;
    113122                }
    114                 nokia.places.settings.setAppContext({appId: 'I5YGccWtqlFgymFvzbq1', authenticationToken: 'L6NaX3SgOkROXjtP-oLPSg'});  //remove
     123                nokia.places.settings.setAppContext({appId: data.appId, authenticationToken: data.authenticationToken});  //remove
    115124                var place = new nokia.places.widgets.Place({
    116125                    targetNode: 'placewidget',
    117126                    template: data.template,
    118127                    placeId: data.placeId,
    119                     href: data.href,
     128                    href: data.href,
    120129                    moduleParams: {
    121130                        'Map': {
Note: See TracChangeset for help on using the changeset viewer.