Changeset 1074
- Timestamp:
- 08/09/06 13:20:57 (2 years ago)
- Location:
- sandbox
- Files:
-
- 1 added
- 3 removed
- 2 modified
-
blog/api/apicore.php (deleted)
-
blog/api/blogger.php (deleted)
-
blog/api/index.php (modified) (2 diffs)
-
blog/api/metaweblog.php (deleted)
-
lib/include.php (modified) (1 diff)
-
lib/model/api.php (added)
Legend:
- Unmodified
- Added
- Removed
-
sandbox/blog/api/index.php
r1073 r1074 2 2 define('ROOT', '../..'); 3 3 require ROOT . '/lib/include.php'; 4 if (false) {5 fetchConfigVal();6 }7 /*--------- Debugging environment -----------*/8 global $debug, $debug_file, $blogapi_dir;9 $debug = 0; /* DEBUGLOG */10 $debug_file = ROOT . "/.htdebug.log";11 $blogapi_dir = dirname( __FILE__ );12 4 13 if( $debug ) 14 { 15 global $debugfd, $debug_file; 16 $debugfd = fopen( $debug_file, "a" ); 17 } 18 else 19 { 20 if( file_exists( $debug_file ) ) 21 { 22 unlink( $debug_file ); 23 } 24 } 25 26 function DEBUG( $str, $internal = false) 27 { 28 global $debug, $debugfd; 29 if( !$debug ) 30 { 31 return ""; 32 } 33 if( $internal ) 34 { 35 $str = var_export( $str, true ); 36 } 37 fputs( $debugfd, $str ); 38 } 5 requireComponent( "Eolin.PHP.XMLStruct" ); 6 requireComponent( "Eolin.PHP.XMLTree" ); 7 requireComponent( "Eolin.PHP.XMLRPC" ); 8 requireComponent( "Tattertools.Control.RSS" ); 9 requireComponent( "Tattertools.Control.Auth" ); 10 requireComponent( "Tattertools.Data.Post" ); 11 requireComponent( "Tattertools.Data.Category" ); 39 12 40 13 /*--------- API main ---------------*/ 41 function BlogAPI()42 {43 include_once "apicore.php";44 45 api_BlogAPI();46 return "";47 }48 49 function AddRSD($target)50 {51 global $hostURL, $blogURL;52 $target .= '<link rel="EditURI" type="application/rsd+xml" title="RSD" href="'.$hostURL.$blogURL.'/api/rsd" />'.CRLF;53 return $target;54 }55 14 56 15 function SendRSD() … … 82 41 else 83 42 { 84 BlogAPI();43 api_BlogAPI(); 85 44 } 86 45 ?> -
sandbox/lib/include.php
r720 r1074 13 13 require 'functions.php'; 14 14 require 'database.php'; 15 require 'model/api.php'; 15 16 require 'model/service.php'; 16 17 require 'model/archive.php';
