Changeset 4606

Show
Ignore:
Timestamp:
10/22/07 22:57:08 (2 years ago)
Author:
inureyes
Message:

#718

  • 글 쓰기 및 기타 환경 설정까지 됩니다. 이제 테스트 페이즈.
Location:
trunk
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • trunk/blog/owner/entry/edit/item.php

    r4503 r4606  
    297297                                        if(entryManager.isSaved == true) { 
    298298                                            var request = new HTTPRequest("POST", "<?php echo $blogURL;?>/owner/entry/update/"+entryManager.entryId); 
     299<?php 
     300    if($service['useRewriteEngine'] == false) { 
     301?> 
     302                                            request.correcturl = true; 
     303<?php 
     304    } 
     305?> 
    299306                                        } else { 
    300307                                            var request = new HTTPRequest("POST", "<?php echo $blogURL;?>/owner/entry/add/"); 
     
    350357                                        if(entryManager.isSaved == true) { 
    351358                                            var request = new HTTPRequest("POST", "<?php echo $blogURL;?>/owner/entry/update/"+entryManager.entryId); 
     359<?php 
     360    if($service['useRewriteEngine'] == false) { 
     361?> 
     362                                            request.correcturl = true; 
     363<?php 
     364    } 
     365?> 
    352366                                        } else { 
    353367                                            var request = new HTTPRequest("POST", "<?php echo $blogURL;?>/owner/entry/add/"); 
  • trunk/blog/owner/entry/update/item.php

    r3845 r4606  
    4343    } 
    4444} 
    45 respondResultPage(1); 
     45respondResultPage(-1); 
    4646?> 
  • trunk/lib/config.php

    r4605 r4606  
    4646    include_once (ROOT . "/components/$name.php"); 
    4747} 
    48  
    4948function requireModel($name) { 
    5049    include_once (ROOT . "/lib/model/$name.php"); 
    5150} 
    52  
    53  
    5451function requireView($name) { 
    5552    include_once (ROOT . "/lib/view/$name.php"); 
    5653} 
    57  
    58  
    5954function requireLibrary($name) { 
    6055    include_once (ROOT . "/lib/$name.php"); 
  • trunk/script/EAF3.js

    r4603 r4606  
    315315HTTPRequest.prototype.url         = null; 
    316316HTTPRequest.prototype.correcturl  = false; 
     317HTTPRequest.prototype.id          = null; 
    317318HTTPRequest.prototype.contentType = "application/x-www-form-urlencoded"; 
    318319HTTPRequest.prototype.content     = ""; 
     
    405406        }; 
    406407    }; 
    407      
     408    if(this.correcturl != false) this.url = this.url+'/index.php'; 
    408409    if(this.cache) this._request.open(this.method,this.url,this.async); 
    409410    else if(this.url.lastIndexOf("?") >= 0) 
     
    413414    if(STD.isFirefox) 
    414415        this._request.setRequestHeader("Referer",location.href); 
    415     if(arguments.length>0) this.content=arguments[0]; 
     416    if(arguments.length>0) { 
     417        this.content=arguments[0]; 
     418        if(this.correcturl!=false && this.id!=null) { 
     419            this.content=arguments[0]+"&id="+this.id; 
     420        } 
     421    } 
    416422    if(this.content.length>0) this._request.setRequestHeader("Content-Type",this.contentType); 
    417423    this._request.send(this.content); 
     
    461467 
    462468HTTPRequest.prototype.parseURL = function(url) { 
    463     if(this.correcturl == true) url = url+'/index.php'; 
     469    var idIndex = url.lastIndexOf("/"); 
     470    if(idIndex >= 0) { 
     471        var idCandidate = url.substring(idIndex+1); 
     472        if(idCandidate.toString().search(/^-?[0-9]+$/) == 0) { 
     473            this.id = idCandidate; 
     474            url = url.substring(0,idIndex); 
     475        } 
     476    } 
    464477    return url; 
    465478};