mirror of https://github.com/acanas/swad-core.git
Version 15.169.6
This commit is contained in:
parent
fc52b5d644
commit
7e0ac827ea
|
@ -138,13 +138,14 @@
|
|||
/****************************** Public constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 15.169.5 (2016-03-31)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 15.169.6 (2016-03-31)"
|
||||
#define CSS_FILE "swad15.165.5.css"
|
||||
#define JS_FILE "swad15.131.3.js"
|
||||
|
||||
// Number of lines (includes comments but not blank lines) has been got with the following command:
|
||||
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*.h sql/swad*.sql | tail -1
|
||||
/*
|
||||
Version 15.169.6: Mar 31, 2016 Code refactoring in function to get a parameter. (197313 lines)
|
||||
Version 15.169.5: Mar 31, 2016 Code refactoring in function to get a parameter. (197292 lines)
|
||||
Version 15.169.4: Mar 31, 2016 Code refactoring in list of parameters. (197280 lines)
|
||||
Version 15.169.3: Mar 31, 2016 Code refactoring in list of parameters. (197271 lines)
|
||||
|
|
|
@ -236,8 +236,13 @@ etc, etc.
|
|||
void Fil_StartReceptionOfFile (char *SrcFileName,char *MIMEType)
|
||||
{
|
||||
char *Ptr;
|
||||
int Ch,i;
|
||||
|
||||
int Ch;
|
||||
int i;
|
||||
/*
|
||||
struct Param *Param;
|
||||
Par_GetParameter (Par_PARAM_SINGLE,Fil_NAME_OF_PARAM_FILENAME_ORG,SrcFileName,
|
||||
PATH_MAX,Param);
|
||||
*/
|
||||
/* At this point, a heading has been read from Gbl.F.Tmp
|
||||
with all the variables passed by form */
|
||||
rewind (Gbl.F.Tmp);
|
||||
|
|
|
@ -534,6 +534,7 @@ unsigned Par_GetParameter (tParamType ParamType,const char *ParamName,
|
|||
unsigned NumTimes;
|
||||
bool ParamFound = false;
|
||||
unsigned ParamNameLength;
|
||||
struct StartLength CopyValueFrom;
|
||||
|
||||
/***** Default values returned *****/
|
||||
ParamValue[0] = '\0'; // By default, the value of the parameter will be an empty string
|
||||
|
@ -623,9 +624,23 @@ unsigned Par_GetParameter (tParamType ParamType,const char *ParamName,
|
|||
Param->Value.Length);
|
||||
break;
|
||||
case Act_CONTENT_DATA:
|
||||
fseek (Gbl.F.Tmp,Param->Value.Start,SEEK_SET);
|
||||
if (fread (PtrDst,sizeof (char),Param->Value.Length,Gbl.F.Tmp) != Param->Value.Length)
|
||||
if (Param->Filename.Start) // It's a file
|
||||
{
|
||||
/* Copy filename in ParamValue */
|
||||
CopyValueFrom.Start = Param->Filename.Start;
|
||||
CopyValueFrom.Length = Param->Filename.Length;
|
||||
}
|
||||
else // It's a normal parameter
|
||||
{
|
||||
/* Copy value in ParamValue */
|
||||
CopyValueFrom.Start = Param->Value.Start;
|
||||
CopyValueFrom.Length = Param->Value.Length;
|
||||
}
|
||||
fseek (Gbl.F.Tmp,CopyValueFrom.Start,SEEK_SET);
|
||||
if (fread (PtrDst,sizeof (char),CopyValueFrom.Length,Gbl.F.Tmp) !=
|
||||
CopyValueFrom.Length)
|
||||
Lay_ShowErrorAndExit ("Error while getting value of parameter.");
|
||||
|
||||
break;
|
||||
}
|
||||
BytesAlreadyCopied += Param->Value.Length;
|
||||
|
|
Loading…
Reference in New Issue