Plugin Directory

Changeset 338361


Ignore:
Timestamp:
01/28/2011 09:40:23 PM (15 years ago)
Author:
camdagr8
Message:

Changelog

2.0.2

  • Fixed xml output formatting.
  • Fixed settings update error.
  • Cleaned up output formatting.
  • Updated Flash Example
Location:
flash-api
Files:
17 added
5 edited

Legend:

Unmodified
Added
Removed
  • flash-api/trunk/flash_api.php

    r338075 r338361  
    33    Plugin Name: Flash API
    44    Description: This plugin serves as a faux webservice that outputs data from the WP Database to a flash application
    5     Version: 2.0.0
     5    Version: 2.0.2
    66    Author: Cameron Tullos - Illumifi Interactive
    77    Author URI: http://illumifi.net/
     
    9494                    <input type="hidden" name="action" value="update">
    9595                    <input type="hidden" name="page_options" value="flash_api_key" />           
    96                     <?php wp_nonce_field(); ?>
     96                    <?php wp_nonce_field('update-options'); ?>
    9797                </td>
    9898            </tr>
  • flash-api/trunk/readme.txt

    r331915 r338361  
    44Requires at least: 2.0.2
    55Tested up to: 3.1
    6 Stable tag: 2.0.0
     6Stable tag: 2.0.2
    77
    88This plugin serves as a faux web service that outputs data from the WP Database to a Flash application in any way you wish.
     
    6262== Changelog ==
    6363
     64= 2.0.2 =
     65* Fixed xml output formatting.
     66* Fixed settings update error.
     67* Cleaned up output formatting.
     68* Updated Flash Example
     69
     70= 2.0.1 =
     71* Fixed issue where services weren't showing up on some versions of wp
     72
    6473= 2.0.0 =
    6574* Complete overhaul or function referencing and management
  • flash-api/trunk/wsrv.php

    r331915 r338361  
    1515 * @param array:Array - an associative array
    1616 */
    17 function output($arr) {
    18     $type = strtolower($_REQUEST['output']);
     17function output($arr, $type = null) {
     18    if (!$type || $type == null) { $type = strtolower($_REQUEST['output']); }
    1919   
    2020    switch($type) {
     
    3939    header("Content-type: text/xml");
    4040    $array = new ArrayToXML($arr);
    41     $xml = '<?xml version="1.0" encoding="utf-8"?>' . "\r" . $array->getXML();
    42     $xml = str_replace('><', ">\r<", $xml);
     41    $xml = $array->getXML();
     42    $xml = '<?xml version="1.0" encoding="utf-8"?>' . "\r" . '<data>'.$xml.'</data>';
     43    $xml = str_replace('&lt;![CDATA[', '<![CDATA[', $xml);
     44    $xml = str_replace(']]&gt;', ']]>', $xml);
     45    $xml = str_replace('&lt;', '<', $xml);
     46    $xml = str_replace('&gt;', '>', $xml);
    4347    return $xml;
    4448}
     
    4953 */
    5054function outputJSON($arr) {
    51     return json_encode($arr);
     55    $json = json_encode($arr);
     56    $json = str_replace('\/', '/', $json);
     57    $json = str_replace('<!--[CDATA[', '', $json);
     58    $json = str_replace('<![CDATA[', '', $json);
     59    $json = str_replace(']]-->', '', $json);
     60    $json = str_replace(']]>', '', $json);
     61    return $json;
    5262}
    5363
Note: See TracChangeset for help on using the changeset viewer.