Changeset 1769473
- Timestamp:
- 11/17/2017 01:32:28 PM (8 years ago)
- Location:
- tinywebdb-api
- Files:
-
- 8 edited
- 1 copied
-
tags/0.2.8 (copied) (copied from tinywebdb-api/trunk)
-
tags/0.2.8/docs/README.md (modified) (2 diffs)
-
tags/0.2.8/readme.txt (modified) (2 diffs)
-
tags/0.2.8/tinywebdb-api.php (modified) (2 diffs)
-
tags/0.2.8/tinywebdb.php (modified) (2 diffs)
-
trunk/docs/README.md (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/tinywebdb-api.php (modified) (2 diffs)
-
trunk/tinywebdb.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tinywebdb-api/tags/0.2.8/docs/README.md
r1699752 r1769473 8 8 Tags: appinventor, tinywebdb, api 9 9 Requires at least: 4.0 10 Tested up to: 4. 811 Stable tag: 0.2. 710 Tested up to: 4.9 11 Stable tag: 0.2.9 12 12 License: GPLv2 or later 13 13 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 87 87 Refine API from original tinywebdb. 88 88 89 = 0.2.8 = 90 Active "Store A Value" and some enhancement. 91 89 92 = 1.0.0 = -
tinywebdb-api/tags/0.2.8/readme.txt
r1699752 r1769473 6 6 Tags: appinventor, tinywebdb, api 7 7 Requires at least: 4.0 8 Tested up to: 4. 89 Stable tag: 0.2. 78 Tested up to: 4.9 9 Stable tag: 0.2.8 10 10 License: GPLv2 or later 11 11 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 81 81 Re-write code with oo-calss style. 82 82 83 = 0.2.7 = 84 Refine API from original tinywebdb. 85 86 = 0.2.8 = 87 Active "Store A Value" and some enhancement. 88 83 89 = 1.0.0 = -
tinywebdb-api/tags/0.2.8/tinywebdb-api.php
r1699752 r1769473 9 9 Author: Hong Chen 10 10 Author URI: http://edu2web.com/tinywebdb-api/ 11 Version: 0.2. 711 Version: 0.2.8 12 12 */ 13 13 14 14 15 15 define("TINYWEBDB", "tools.php?page=tinywebdb-api/tinywebdb-api.php"); 16 define("TINYWEBDB_VER", "0.2. 7");16 define("TINYWEBDB_VER", "0.2.8"); 17 17 18 18 //***** Hooks ***** … … 64 64 error_log("Wp TinyWebDB API : storeavalue: " . __FILE__ . "/" . __LINE__ . " ($apiKey) $tagName -- $tagValue"); 65 65 $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."); 67 68 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); 70 71 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)); 78 76 exit; 79 77 break; -
tinywebdb-api/tags/0.2.8/tinywebdb.php
r1699752 r1769473 107 107 public static function getvalue($tagName) { 108 108 109 $bedtag = array("id" => "0", "post_author" => "0", "post_content" => "ERROR BAD tag SUPPLIED");110 111 109 // this action enable from v 0.1.x 112 110 // JSON_API , Post Parameters : tag … … 127 125 $postid = TinyWebDB::wp_tinywebdb_api_get_postid($tagName); 128 126 $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; 132 129 } 133 130 } -
tinywebdb-api/trunk/docs/README.md
r1699752 r1769473 8 8 Tags: appinventor, tinywebdb, api 9 9 Requires at least: 4.0 10 Tested up to: 4. 811 Stable tag: 0.2. 710 Tested up to: 4.9 11 Stable tag: 0.2.9 12 12 License: GPLv2 or later 13 13 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 87 87 Refine API from original tinywebdb. 88 88 89 = 0.2.8 = 90 Active "Store A Value" and some enhancement. 91 89 92 = 1.0.0 = -
tinywebdb-api/trunk/readme.txt
r1699752 r1769473 6 6 Tags: appinventor, tinywebdb, api 7 7 Requires at least: 4.0 8 Tested up to: 4. 89 Stable tag: 0.2. 78 Tested up to: 4.9 9 Stable tag: 0.2.8 10 10 License: GPLv2 or later 11 11 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 81 81 Re-write code with oo-calss style. 82 82 83 = 0.2.7 = 84 Refine API from original tinywebdb. 85 86 = 0.2.8 = 87 Active "Store A Value" and some enhancement. 88 83 89 = 1.0.0 = -
tinywebdb-api/trunk/tinywebdb-api.php
r1699752 r1769473 9 9 Author: Hong Chen 10 10 Author URI: http://edu2web.com/tinywebdb-api/ 11 Version: 0.2. 711 Version: 0.2.8 12 12 */ 13 13 14 14 15 15 define("TINYWEBDB", "tools.php?page=tinywebdb-api/tinywebdb-api.php"); 16 define("TINYWEBDB_VER", "0.2. 7");16 define("TINYWEBDB_VER", "0.2.8"); 17 17 18 18 //***** Hooks ***** … … 64 64 error_log("Wp TinyWebDB API : storeavalue: " . __FILE__ . "/" . __LINE__ . " ($apiKey) $tagName -- $tagValue"); 65 65 $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."); 67 68 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); 70 71 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)); 78 76 exit; 79 77 break; -
tinywebdb-api/trunk/tinywebdb.php
r1699752 r1769473 107 107 public static function getvalue($tagName) { 108 108 109 $bedtag = array("id" => "0", "post_author" => "0", "post_content" => "ERROR BAD tag SUPPLIED");110 111 109 // this action enable from v 0.1.x 112 110 // JSON_API , Post Parameters : tag … … 127 125 $postid = TinyWebDB::wp_tinywebdb_api_get_postid($tagName); 128 126 $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; 132 129 } 133 130 }
Note: See TracChangeset
for help on using the changeset viewer.