springnote모듈에서 다른 springnote의 도메인을 설정하여 보여줄 수 있도록 기능 추가

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@3312 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2007-12-12 06:56:36 +00:00
parent 5b8654de30
commit 6e44fda337
9 changed files with 25 additions and 3 deletions

View file

@ -16,6 +16,7 @@
var $appkey = '82dee99105c92c166bb8586415d47283b9a54cd2';
var $server = 'api.springnote.com';
var $port = 80;
var $domain = '';
/**
* @brief 초기화
@ -26,16 +27,17 @@
/**
* @brief 스프링노트 페이지를 가져오기 위한 기본 설정
**/
function setInfo($userid, $userkey) {
function setInfo($userid, $userkey, $domain = '') {
$this->userid = $userid;
$this->userkey = $userkey;
$this->domain = $domain;
}
/**
* @brief url 생성
**/
function getUrl($pageid = null) {
return sprintf('http://%s:%s/pages%s.xml', $this->server, $this->port, $pageid?'/'.$pageid:'');
return sprintf('http://%s:%s/pages%s.xml%s', $this->server, $this->port, $pageid?'/'.$pageid:'', $this->domain?'?domain='.$this->domain:'');
}
/**