Ignore:
Timestamp:
Nov 3, 2012, 3:07:43 AM (11 years ago)
Author:
djay
Message:

Add _ method to the zoo Python module to enable translation from zoo-services textdomain. Add gettextPath in the main section of the main.cfg to set the directory to search for language files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/zoo-project/zoo-kernel/zoo_loader.c

    r375 r376  
    7878  fprintf (stderr, "RequestMethod: (%s) %d %d\n", cgiRequestMethod,strncasecmp(cgiRequestMethod,"post",4),strncmp(cgiContentType,"text/xml",8)==0 || strncasecmp(cgiRequestMethod,"post",4)==0);
    7979  fprintf (stderr, "Request: %s\n", cgiQueryString);
     80  fflush(stderr);
    8081#endif
    8182
     
    8586  if(strncmp(cgiContentType,"text/xml",8)==0 ||
    8687     strncasecmp(cgiRequestMethod,"post",4)==0){
    87     //fprintf(stderr,"length %d\n",cgiContentLength);
    8888    if(cgiContentLength==NULL){
    8989       cgiContentLength=0;
     
    104104         }
    105105       }
    106        if(res==NULL){
     106       if(res==NULL && (strQuery==NULL || strlen(strQuery)==0)){
    107107         return errorException(NULL,"ZOO-Kernel failed to process your request cause the request was emtpty.","InternalError");
    108        }else
    109          tmpMap=createMap("request",res);
     108       }else{
     109         if(strQuery==NULL || strlen(strQuery)==0)
     110           tmpMap=createMap("request",res);
     111       }
    110112    }else{
    111113      char *buffer=new char[cgiContentLength+1];
     
    113115        buffer[cgiContentLength]=0;
    114116        tmpMap=createMap("request",buffer);
    115         //fprintf(stderr,"%s\n",tmpMap->value);
    116117      }else{
    117118        buffer[0]=0;
     
    133134            free(tmp);
    134135          }
    135          
    136           sprintf(tmpValueFinal,"%s=%s",*arrayStep,ivalue);
    137136          free(tmpValueFinal);
    138137#ifdef DEBUG
     
    321320  }
    322321
    323 
    324322  if(strncasecmp(cgiContentType,"multipart/form-data",19)==0){
    325       map* tmp=getMap(tmpMap,"dataInputs");
    326       if(tmp!=NULL){
    327         addToMap(tmpMap,"dataInputs",strstr(strQuery,"dataInputs=")+11);
    328       }
    329     }
     323    map* tmp=getMap(tmpMap,"dataInputs");
     324    if(tmp!=NULL){
     325      addToMap(tmpMap,"dataInputs",strstr(strQuery,"dataInputs=")+11);
     326    }
     327  }
    330328
    331329  runRequest(tmpMap);
Note: See TracChangeset for help on using the changeset viewer.

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png