Changeset 5623

Show
Ignore:
Timestamp:
03/24/08 12:33:40 (10 months ago)
Author:
inureyes
Message:

#890

  • 일단 ajax call 가능하도록 해 놓음.
  • Input Validation routine을 켜놓음.
  • ErrorPage, NotFoundPage에서 ajax call일 경우를 처리하도록 인자 추가
Location:
trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/components/Textcube.Function.Respond.php

    r5593 r5623  
    3333    } 
    3434     
    35     function NotFoundPage() { 
     35    function NotFoundPage($isAjaxCall = false) { 
     36        if($isAjaxCall) return respond::ResultPage(-1); 
    3637        header('HTTP/1.1 404 Not Found'); 
    3738        header("Connection: close"); 
     
    8889    } 
    8990     
    90     function ErrorPage($message=NULL, $buttonValue=NULL, $buttonLink=NULL) { 
     91    function ErrorPage($message=NULL, $buttonValue=NULL, $buttonLink=NULL, $isAjaxCall = false) { 
    9192        global $service; 
     93        if($isAjaxCall) return respond::ResultPage(-1); 
    9294?> 
    9395    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 
  • trunk/interface/owner/center/about/index.php

    r5592 r5623  
    6969                                            <tr> 
    7070                                                <td class="name vcard"><a class="fn url" href="http://daybreaker.info">Kim Joongi</a></td> 
    71                                                 <td class="role"><?php echo _t('XHTML specification / Textcube main page / Quality Assurance');?></td> 
     71                                                <td class="role"><?php echo _t('XHTML / Textcube server / Quality Assurance');?></td> 
    7272                                            </tr> 
    7373                                            <tr> 
    7474                                                <td class="name vcard"><a class="fn url" href="http://www.graphittie.org/blog">graphittie™</a></td> 
    75                                                 <td class="role"><?php echo _t('UI / Sidebar / XHTML specification / Bug tracking');?></td> 
     75                                                <td class="role"><?php echo _t('UI / Sidebar / XHTML / Bug tracking');?></td> 
    7676                                            </tr> 
    7777                                            <tr> 
     
    8181                                            <tr> 
    8282                                                <td class="name vcard"><a class="fn url" href="http://www.create74.com">Yong-ju, Park</a></td> 
    83                                                 <td class="role"><?php echo _t('Teamblog / Coverpage / Plugin');?></td> 
     83                                                <td class="role"><?php echo _t('Mobile / Teamblog / Coverpage / Plugin');?></td> 
    8484                                            </tr> 
    8585                                            <tr> 
  • trunk/interface/owner/skin/sidebar/setPlugin/index.php

    r5285 r5623  
    88} 
    99 
    10  
    11 /*$IV = array( 
     10$IV = array( 
    1211    'REQUEST' => array( 
    1312        'sidebarNumber' => array('int'), 
    1413        'modulePos' => array('int'), 
    15         ) 
    16     );*/ 
     14        'viewMode' => array('int','mandatory'=>false) 
     15    ) 
     16); 
    1717     
    1818if (!array_key_exists('viewMode', $_REQUEST)) $_REQUEST['viewMode'] = ''; 
     
    2121requireLibrary('blog.skin'); 
    2222requireModel("blog.sidebar"); 
     23requireComponent("Textcube.Function.Respond"); 
    2324requireStrictRoute(); 
    2425 
     
    2728$sidebarOrderData = getSidebarModuleOrderData($sidebarCount); 
    2829 
    29 if (!isset($_REQUEST['sidebarNumber']) || !is_numeric($_REQUEST['sidebarNumber'])) respond::NotFoundPage(); 
    30 if (!isset($_REQUEST['modulePos']) || !is_numeric($_REQUEST['modulePos'])) respond::NotFoundPage(); 
     30if (!isset($_REQUEST['sidebarNumber']) || !is_numeric($_REQUEST['sidebarNumber'])) respond::NotFoundPage($ajaxcall); 
     31if (!isset($_REQUEST['modulePos']) || !is_numeric($_REQUEST['modulePos'])) respond::NotFoundPage($ajaxcall); 
    3132 
    3233$sidebarNumber = $_REQUEST['sidebarNumber']; 
    3334$modulePos = $_REQUEST['modulePos']; 
    3435 
    35 if (($sidebarNumber < 0) || ($sidebarNumber >= $sidebarCount)) respond::ErrorPage(); 
    36 if (!isset($sidebarOrderData[$sidebarNumber]) || !isset($sidebarOrderData[$sidebarNumber][$modulePos])) respond::ErrorPage(); 
     36if (($sidebarNumber < 0) || ($sidebarNumber >= $sidebarCount)) respond::ErrorPage(null,null,null,$ajaxcall); 
     37if (!isset($sidebarOrderData[$sidebarNumber]) || !isset($sidebarOrderData[$sidebarNumber][$modulePos])) respond::ErrorPage(null,null,null,$ajaxcall); 
    3738 
    3839$pluginData = $sidebarOrderData[$sidebarNumber][$modulePos]; 
    39 if ($pluginData['type'] != 3) respond::ErrorPage(); 
     40if ($pluginData['type'] != 3) respond::ErrorPage(null,null,null,$ajaxcall); 
    4041 
    4142$plugin = $pluginData['id']['plugin']; 
     
    7576 
    7677$sidebarOrderData[$sidebarNumber][$modulePos]['parameters'] = $newParameter; 
    77 setBlogSetting("sidebarOrder", serialize($sidebarOrderData)); 
     78setting::setBlogSettingGlobal("sidebarOrder", serialize($sidebarOrderData)); 
    7879Skin::purgeCache(); 
    7980if ($ajaxcall == false) { 
    8081    if ($_REQUEST['viewMode'] != '') $_REQUEST['viewMode'] = '?' . $_REQUEST['viewMode']; 
    8182    header('Location: '. $blogURL . '/owner/skin/sidebar' . $_REQUEST['viewMode']); 
     83} else { 
     84    respond::ResultPage(0); 
    8285} 
    8386?>