mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-11 11:15:27 +02:00
Version 15.169.6
This commit is contained in:
parent
fc52b5d644
commit
7e0ac827ea
|
@ -138,13 +138,14 @@
|
||||||
/****************************** Public constants *****************************/
|
/****************************** 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 CSS_FILE "swad15.165.5.css"
|
||||||
#define JS_FILE "swad15.131.3.js"
|
#define JS_FILE "swad15.131.3.js"
|
||||||
|
|
||||||
// Number of lines (includes comments but not blank lines) has been got with the following command:
|
// 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
|
// 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.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.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)
|
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)
|
void Fil_StartReceptionOfFile (char *SrcFileName,char *MIMEType)
|
||||||
{
|
{
|
||||||
char *Ptr;
|
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
|
/* At this point, a heading has been read from Gbl.F.Tmp
|
||||||
with all the variables passed by form */
|
with all the variables passed by form */
|
||||||
rewind (Gbl.F.Tmp);
|
rewind (Gbl.F.Tmp);
|
||||||
|
|
|
@ -534,6 +534,7 @@ unsigned Par_GetParameter (tParamType ParamType,const char *ParamName,
|
||||||
unsigned NumTimes;
|
unsigned NumTimes;
|
||||||
bool ParamFound = false;
|
bool ParamFound = false;
|
||||||
unsigned ParamNameLength;
|
unsigned ParamNameLength;
|
||||||
|
struct StartLength CopyValueFrom;
|
||||||
|
|
||||||
/***** Default values returned *****/
|
/***** Default values returned *****/
|
||||||
ParamValue[0] = '\0'; // By default, the value of the parameter will be an empty string
|
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);
|
Param->Value.Length);
|
||||||
break;
|
break;
|
||||||
case Act_CONTENT_DATA:
|
case Act_CONTENT_DATA:
|
||||||
fseek (Gbl.F.Tmp,Param->Value.Start,SEEK_SET);
|
if (Param->Filename.Start) // It's a file
|
||||||
if (fread (PtrDst,sizeof (char),Param->Value.Length,Gbl.F.Tmp) != Param->Value.Length)
|
{
|
||||||
|
/* 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.");
|
Lay_ShowErrorAndExit ("Error while getting value of parameter.");
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
BytesAlreadyCopied += Param->Value.Length;
|
BytesAlreadyCopied += Param->Value.Length;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user