Plugin Directory

Changeset 1769473


Ignore:
Timestamp:
11/17/2017 01:32:28 PM (8 years ago)
Author:
chen420
Message:

tagging version 0.2.8

Location:
tinywebdb-api
Files:
8 edited
1 copied

Legend:

Unmodified
Added
Removed
  • tinywebdb-api/tags/0.2.8/docs/README.md

    r1699752 r1769473  
    88Tags: appinventor, tinywebdb, api 
    99Requires at least: 4.0 
    10 Tested up to: 4.8 
    11 Stable tag: 0.2.7 
     10Tested up to: 4.9 
     11Stable tag: 0.2.9 
    1212License: GPLv2 or later 
    1313License URI: http://www.gnu.org/licenses/gpl-2.0.html 
     
    8787Refine API from original tinywebdb.
    8888
     89= 0.2.8 =
     90Active "Store A Value" and some enhancement.
     91
    8992= 1.0.0 =
  • tinywebdb-api/tags/0.2.8/readme.txt

    r1699752 r1769473  
    66Tags: appinventor, tinywebdb, api
    77Requires at least: 4.0
    8 Tested up to: 4.8
    9 Stable tag: 0.2.7
     8Tested up to: 4.9
     9Stable tag: 0.2.8
    1010License: GPLv2 or later
    1111License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    8181Re-write code with oo-calss style.
    8282
     83= 0.2.7 =
     84Refine API from original tinywebdb.
     85
     86= 0.2.8 =
     87Active "Store A Value" and some enhancement.
     88
    8389= 1.0.0 =
  • tinywebdb-api/tags/0.2.8/tinywebdb-api.php

    r1699752 r1769473  
    99Author: Hong Chen
    1010Author URI: http://edu2web.com/tinywebdb-api/
    11 Version: 0.2.7
     11Version: 0.2.8
    1212*/
    1313
    1414
    1515define("TINYWEBDB", "tools.php?page=tinywebdb-api/tinywebdb-api.php");
    16 define("TINYWEBDB_VER", "0.2.7");
     16define("TINYWEBDB_VER", "0.2.8");
    1717
    1818//***** Hooks *****
     
    6464            error_log("Wp TinyWebDB API : storeavalue: " . __FILE__ . "/" . __LINE__ . " ($apiKey) $tagName -- $tagValue");
    6565            $setting_apikey = get_option("wp_tinywebdb_api_key");
    66             if ($apiKey == $setting_apikey){
     66            if (empty($tagName)) exit("tagName is empty.");
     67            if ($apiKey != $setting_apikey) exit("wrong api key.");
    6768
    68                 $postid = TinyWebDB::storeavalue($tagName, $tagValue);
    69                 $tagName = TinyWebDB::wp_tinywebdb_api_get_tagName($postid);
     69            $postid = TinyWebDB::storeavalue($tagName, $tagValue);
     70            $tagName = TinyWebDB::wp_tinywebdb_api_get_tagName($postid);
    7071
    71                 header('Cache-Control: no-cache, must-revalidate');
    72                 header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
    73                 header('Content-type: application/json');
    74                 echo json_encode(array("STORED", $tagName, $tagValue));
    75             } else {
    76                 echo "check api key.";
    77             }
     72            header('Cache-Control: no-cache, must-revalidate');
     73            header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
     74            header('Content-type: application/json');
     75            echo json_encode(array("STORED", $tagName, $tagValue));
    7876            exit;
    7977            break;
  • tinywebdb-api/tags/0.2.8/tinywebdb.php

    r1699752 r1769473  
    107107    public static function getvalue($tagName) {
    108108
    109       $bedtag = array("id" => "0", "post_author" => "0", "post_content" => "ERROR BAD tag SUPPLIED");
    110 
    111109      // this action enable from v 0.1.x
    112110      // JSON_API , Post Parameters : tag
     
    127125        $postid = TinyWebDB::wp_tinywebdb_api_get_postid($tagName);
    128126        $post = get_post($postid);
    129         if (is_null($tagValue)) $tagValue = $bedtag;    //reports a get_post failure
    130         // $tagName = wp_tinywebdb_api_get_tagName($postid);
    131         return $post->post_content;
     127        if (is_null($post)) return "NO FOUND";   //reports a get_post failure
     128        else return $post->post_content;
    132129      }
    133130    }
  • tinywebdb-api/trunk/docs/README.md

    r1699752 r1769473  
    88Tags: appinventor, tinywebdb, api 
    99Requires at least: 4.0 
    10 Tested up to: 4.8 
    11 Stable tag: 0.2.7 
     10Tested up to: 4.9 
     11Stable tag: 0.2.9 
    1212License: GPLv2 or later 
    1313License URI: http://www.gnu.org/licenses/gpl-2.0.html 
     
    8787Refine API from original tinywebdb.
    8888
     89= 0.2.8 =
     90Active "Store A Value" and some enhancement.
     91
    8992= 1.0.0 =
  • tinywebdb-api/trunk/readme.txt

    r1699752 r1769473  
    66Tags: appinventor, tinywebdb, api
    77Requires at least: 4.0
    8 Tested up to: 4.8
    9 Stable tag: 0.2.7
     8Tested up to: 4.9
     9Stable tag: 0.2.8
    1010License: GPLv2 or later
    1111License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    8181Re-write code with oo-calss style.
    8282
     83= 0.2.7 =
     84Refine API from original tinywebdb.
     85
     86= 0.2.8 =
     87Active "Store A Value" and some enhancement.
     88
    8389= 1.0.0 =
  • tinywebdb-api/trunk/tinywebdb-api.php

    r1699752 r1769473  
    99Author: Hong Chen
    1010Author URI: http://edu2web.com/tinywebdb-api/
    11 Version: 0.2.7
     11Version: 0.2.8
    1212*/
    1313
    1414
    1515define("TINYWEBDB", "tools.php?page=tinywebdb-api/tinywebdb-api.php");
    16 define("TINYWEBDB_VER", "0.2.7");
     16define("TINYWEBDB_VER", "0.2.8");
    1717
    1818//***** Hooks *****
     
    6464            error_log("Wp TinyWebDB API : storeavalue: " . __FILE__ . "/" . __LINE__ . " ($apiKey) $tagName -- $tagValue");
    6565            $setting_apikey = get_option("wp_tinywebdb_api_key");
    66             if ($apiKey == $setting_apikey){
     66            if (empty($tagName)) exit("tagName is empty.");
     67            if ($apiKey != $setting_apikey) exit("wrong api key.");
    6768
    68                 $postid = TinyWebDB::storeavalue($tagName, $tagValue);
    69                 $tagName = TinyWebDB::wp_tinywebdb_api_get_tagName($postid);
     69            $postid = TinyWebDB::storeavalue($tagName, $tagValue);
     70            $tagName = TinyWebDB::wp_tinywebdb_api_get_tagName($postid);
    7071
    71                 header('Cache-Control: no-cache, must-revalidate');
    72                 header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
    73                 header('Content-type: application/json');
    74                 echo json_encode(array("STORED", $tagName, $tagValue));
    75             } else {
    76                 echo "check api key.";
    77             }
     72            header('Cache-Control: no-cache, must-revalidate');
     73            header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
     74            header('Content-type: application/json');
     75            echo json_encode(array("STORED", $tagName, $tagValue));
    7876            exit;
    7977            break;
  • tinywebdb-api/trunk/tinywebdb.php

    r1699752 r1769473  
    107107    public static function getvalue($tagName) {
    108108
    109       $bedtag = array("id" => "0", "post_author" => "0", "post_content" => "ERROR BAD tag SUPPLIED");
    110 
    111109      // this action enable from v 0.1.x
    112110      // JSON_API , Post Parameters : tag
     
    127125        $postid = TinyWebDB::wp_tinywebdb_api_get_postid($tagName);
    128126        $post = get_post($postid);
    129         if (is_null($tagValue)) $tagValue = $bedtag;    //reports a get_post failure
    130         // $tagName = wp_tinywebdb_api_get_tagName($postid);
    131         return $post->post_content;
     127        if (is_null($post)) return "NO FOUND";   //reports a get_post failure
     128        else return $post->post_content;
    132129      }
    133130    }
Note: See TracChangeset for help on using the changeset viewer.