Plugin Directory

Changeset 634745


Ignore:
Timestamp:
12/06/2012 08:25:21 AM (13 years ago)
Author:
chen420
Message:

TinyWebDB API バージョン 0.2.1, add reports a get_post failure

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tinywebdb-api/trunk/tinywebdb-api.php

    r629956 r634745  
    99Author: Hong Chen
    1010Author URI: http://digilib.net/
    11 Version: 0.2.0
     11Version: 0.2.1
    1212*/
    1313
    1414
    1515define("TINYWEBDB", "tools.php?page=tinywebdb-api/tinywebdb-api.php");
    16 define("TINYWEBDB_VER", "0.2.0");
     16define("TINYWEBDB_VER", "0.2.1");
    1717
    1818
     
    8383    $public_query_vars[] = 'tag';
    8484    $public_query_vars[] = 'value';
     85    $public_query_vars[] = 'apikey';
    8586    return $public_query_vars;
    8687}
     
    8889function wp_tinywebdb_api_query() {
    8990    global $wpdb, $table_prefix;
     91    $bedtag = array("id" => "0", "post_author" => "0", "post_content" => "ERROR BAD tag SUPPLIED");
    9092
    9193    $request = $_SERVER['REQUEST_URI'];
     
    123125                $postid = wp_tinywebdb_api_get_postid($tagName);
    124126                $tagValue = get_post($postid);
     127                if (is_null($tagValue)) $tagValue = $bedtag;    //reports a get_post failure
    125128                // $tagName = wp_tinywebdb_api_get_tagName($postid);
    126129
Note: See TracChangeset for help on using the changeset viewer.