mirror of https://github.com/acanas/swad-core.git
Version 15.224.3
This commit is contained in:
parent
90c4217ba9
commit
d3c0891ade
|
@ -545,7 +545,8 @@ a:hover /* Default ==> underlined */
|
|||
.TAB_ON_YELLOW {background-color:rgba(255, 242, 189, 0.99);}
|
||||
|
||||
.TAB_OFF_WHITE {background-color:#D4D4D4;}
|
||||
.TAB_OFF_GREY {background-color:#D4D4D4;}
|
||||
/*.TAB_OFF_GREY {background-color:#D4D4D4;}*/
|
||||
.TAB_OFF_GREY {background-color:#AEA79F;}
|
||||
.TAB_OFF_BLUE {background-color:#CAE1E8;}
|
||||
.TAB_OFF_YELLOW {background-color:#FADE94;}
|
||||
|
||||
|
|
|
@ -129,13 +129,14 @@
|
|||
/****************************** Public constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 15.224.2 (2016-06-12)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 15.224.3 (2016-06-13)"
|
||||
#define CSS_FILE "swad15.218.css"
|
||||
#define JS_FILE "swad15.216.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.224.3: Jun 13, 2016 Fix bug while finding cell content in file of marks. (202267 lines)
|
||||
Version 15.224.2: Jun 12, 2016 Info about number of files is moved to bottom of file browsers. (202266 lines)
|
||||
Version 15.224.1: Jun 12, 2016 Change in layout of file browsers. (202266 lines)
|
||||
Version 15.224: Jun 12, 2016 Now a user can unfollow users followed by him/her whose profile is not visible.
|
||||
|
|
|
@ -487,6 +487,7 @@ static bool Mrk_GetUsrMarks (FILE *FileUsrMarks,struct UsrData *UsrDat,
|
|||
// Users' IDs are always stored internally in capitals and without leading zeros
|
||||
Str_RemoveLeadingZeros (UsrIDFromTable);
|
||||
Str_ConvertToUpperText (UsrIDFromTable);
|
||||
|
||||
if (ID_CheckIfUsrIDIsValid (UsrIDFromTable))
|
||||
// A valid user's ID is found in the first column of table, and stored in UsrIDFromTable.
|
||||
// Compare UsrIDFromTable with all the confirmed user's IDs in list
|
||||
|
|
137
swad_string.c
137
swad_string.c
|
@ -1949,6 +1949,8 @@ char *Str_GetCellFromHTMLTableSkipComments (FILE *FileSrc,char *Str,int MaxLengt
|
|||
long PosTD;
|
||||
int i = 0;
|
||||
int Ch;
|
||||
bool EndCellFound = false;
|
||||
bool DirectiveFound;
|
||||
bool SpaceFound;
|
||||
char StrAux[1+1]; // To find next "/td>" or "nbsp;"
|
||||
|
||||
|
@ -1973,87 +1975,86 @@ char *Str_GetCellFromHTMLTableSkipComments (FILE *FileSrc,char *Str,int MaxLengt
|
|||
|
||||
Str_FindStrInFile (FileSrc,">",Str_NO_SKIP_HTML_COMMENTS);
|
||||
|
||||
for (;;)
|
||||
for (EndCellFound = false;
|
||||
!EndCellFound;
|
||||
)
|
||||
{
|
||||
if ((Ch = Str_ReadCharAndSkipComments (FileSrc,Str_SKIP_HTML_COMMENTS)) == EOF) // Set pointer to '<' if not comment, or to first character after comment if comment
|
||||
break;
|
||||
|
||||
/***** Skip directives except </td> *****/
|
||||
if (Ch == (int) '<') // Start of directive, not a comment
|
||||
DirectiveFound = (Ch == (int) '<');
|
||||
|
||||
if (DirectiveFound) // Start of directive, not a comment
|
||||
{
|
||||
/* Check if it's </td> */
|
||||
if (strcasecmp (Str_GetNextStrFromFileConvertingToLower (FileSrc,StrAux,1),"/"))
|
||||
{ // It's not </
|
||||
Str_FindStrInFileBack (FileSrc,"<",Str_NO_SKIP_HTML_COMMENTS); // Skip directive backward
|
||||
if (!strcasecmp (Str_GetNextStrFromFileConvertingToLower (FileSrc,StrAux,1),"/")) // It's </
|
||||
if (!strcasecmp (Str_GetNextStrFromFileConvertingToLower (FileSrc,StrAux,1),"t")) // It's </t
|
||||
if (!strcasecmp (Str_GetNextStrFromFileConvertingToLower (FileSrc,StrAux,1),"d")) // It's </td
|
||||
if (!strcasecmp (Str_GetNextStrFromFileConvertingToLower (FileSrc,StrAux,1),">")) // It's </td>
|
||||
EndCellFound = true; // </td> found
|
||||
|
||||
if (!EndCellFound)
|
||||
{
|
||||
/* Skip directive */
|
||||
Str_FindStrInFileBack (FileSrc,"<",Str_NO_SKIP_HTML_COMMENTS);
|
||||
Str_FindStrInFile (FileSrc,">",Str_NO_SKIP_HTML_COMMENTS);
|
||||
continue;
|
||||
}
|
||||
if (strcasecmp (Str_GetNextStrFromFileConvertingToLower (FileSrc,StrAux,1),"t"))
|
||||
{ // It's not </t
|
||||
Str_FindStrInFileBack (FileSrc,"<",Str_NO_SKIP_HTML_COMMENTS); // Skip directive backward
|
||||
Str_FindStrInFile (FileSrc,">",Str_NO_SKIP_HTML_COMMENTS);
|
||||
continue;
|
||||
}
|
||||
if (strcasecmp (Str_GetNextStrFromFileConvertingToLower (FileSrc,StrAux,1),"d"))
|
||||
{ // It's not </td
|
||||
Str_FindStrInFileBack (FileSrc,"<",Str_NO_SKIP_HTML_COMMENTS); // Skip directive backward
|
||||
Str_FindStrInFile (FileSrc,">",Str_NO_SKIP_HTML_COMMENTS);
|
||||
continue;
|
||||
}
|
||||
if (strcasecmp (Str_GetNextStrFromFileConvertingToLower (FileSrc,StrAux,1),">"))
|
||||
{ // It's not </td>
|
||||
Str_FindStrInFileBack (FileSrc,"<",Str_NO_SKIP_HTML_COMMENTS); // Skip directive backward
|
||||
Str_FindStrInFile (FileSrc,">",Str_NO_SKIP_HTML_COMMENTS);
|
||||
continue;
|
||||
}
|
||||
break; // If it's </td>
|
||||
}
|
||||
|
||||
SpaceFound = false;
|
||||
|
||||
/***** Skip *****/
|
||||
if (Ch == (int) '&')
|
||||
if (!EndCellFound)
|
||||
{
|
||||
/* Ver if no it's */
|
||||
if (strcasecmp (Str_GetNextStrFromFileConvertingToLower (FileSrc,StrAux,1),"n"))
|
||||
{ // It's not &n
|
||||
Str_FindStrInFileBack (FileSrc,"&",Str_NO_SKIP_HTML_COMMENTS); // Back until &
|
||||
Str_FindStrInFile (FileSrc,"&",Str_NO_SKIP_HTML_COMMENTS); // Skip &
|
||||
}
|
||||
else if (strcasecmp (Str_GetNextStrFromFileConvertingToLower (FileSrc,StrAux,1),"b"))
|
||||
{ // It's not &nb
|
||||
Str_FindStrInFileBack (FileSrc,"&",Str_NO_SKIP_HTML_COMMENTS); // Back until &
|
||||
Str_FindStrInFile (FileSrc,"&",Str_NO_SKIP_HTML_COMMENTS); // Skip &
|
||||
}
|
||||
else if (strcasecmp (Str_GetNextStrFromFileConvertingToLower (FileSrc,StrAux,1),"s"))
|
||||
{ // It's not &nbs
|
||||
Str_FindStrInFileBack (FileSrc,"&",Str_NO_SKIP_HTML_COMMENTS); // Back until &
|
||||
Str_FindStrInFile (FileSrc,"&",Str_NO_SKIP_HTML_COMMENTS); // Skip &
|
||||
}
|
||||
else if (strcasecmp (Str_GetNextStrFromFileConvertingToLower (FileSrc,StrAux,1),"p"))
|
||||
{ // It's not  
|
||||
Str_FindStrInFileBack (FileSrc,"&",Str_NO_SKIP_HTML_COMMENTS); // Back until &
|
||||
Str_FindStrInFile (FileSrc,"&",Str_NO_SKIP_HTML_COMMENTS); // Skip &
|
||||
}
|
||||
else if (strcasecmp (Str_GetNextStrFromFileConvertingToLower (FileSrc,StrAux,1),";"))
|
||||
{ // It's not
|
||||
Str_FindStrInFileBack (FileSrc,"&",Str_NO_SKIP_HTML_COMMENTS); // Back until &
|
||||
Str_FindStrInFile (FileSrc,"&",Str_NO_SKIP_HTML_COMMENTS); // Skip &
|
||||
}
|
||||
else // It's
|
||||
SpaceFound = true;
|
||||
if (DirectiveFound)
|
||||
Ch = (int) ' '; // Replace directive for ' ' (separator)
|
||||
else
|
||||
{
|
||||
/***** Check for space or *****/
|
||||
SpaceFound = false;
|
||||
|
||||
if (Ch == (int) '&')
|
||||
{
|
||||
/* Check for (case insensitive) */
|
||||
if (strcasecmp (Str_GetNextStrFromFileConvertingToLower (FileSrc,StrAux,1),"n"))
|
||||
{ // It's not &n
|
||||
Str_FindStrInFileBack (FileSrc,"&",Str_NO_SKIP_HTML_COMMENTS); // Back until &
|
||||
Str_FindStrInFile (FileSrc,"&",Str_NO_SKIP_HTML_COMMENTS); // Skip &
|
||||
}
|
||||
else if (strcasecmp (Str_GetNextStrFromFileConvertingToLower (FileSrc,StrAux,1),"b"))
|
||||
{ // It's not &nb
|
||||
Str_FindStrInFileBack (FileSrc,"&",Str_NO_SKIP_HTML_COMMENTS); // Back until &
|
||||
Str_FindStrInFile (FileSrc,"&",Str_NO_SKIP_HTML_COMMENTS); // Skip &
|
||||
}
|
||||
else if (strcasecmp (Str_GetNextStrFromFileConvertingToLower (FileSrc,StrAux,1),"s"))
|
||||
{ // It's not &nbs
|
||||
Str_FindStrInFileBack (FileSrc,"&",Str_NO_SKIP_HTML_COMMENTS); // Back until &
|
||||
Str_FindStrInFile (FileSrc,"&",Str_NO_SKIP_HTML_COMMENTS); // Skip &
|
||||
}
|
||||
else if (strcasecmp (Str_GetNextStrFromFileConvertingToLower (FileSrc,StrAux,1),"p"))
|
||||
{ // It's not  
|
||||
Str_FindStrInFileBack (FileSrc,"&",Str_NO_SKIP_HTML_COMMENTS); // Back until &
|
||||
Str_FindStrInFile (FileSrc,"&",Str_NO_SKIP_HTML_COMMENTS); // Skip &
|
||||
}
|
||||
else if (strcasecmp (Str_GetNextStrFromFileConvertingToLower (FileSrc,StrAux,1),";"))
|
||||
{ // It's not
|
||||
Str_FindStrInFileBack (FileSrc,"&",Str_NO_SKIP_HTML_COMMENTS); // Back until &
|
||||
Str_FindStrInFile (FileSrc,"&",Str_NO_SKIP_HTML_COMMENTS); // Skip &
|
||||
}
|
||||
else // It's
|
||||
SpaceFound = true;
|
||||
}
|
||||
|
||||
/***** Skip spaces *****/
|
||||
if (isspace (Ch) ||
|
||||
Ch == 0xA0) // Unicode translation for
|
||||
SpaceFound = true;
|
||||
|
||||
if (SpaceFound)
|
||||
Ch = (int) ' '; // Replace any kind of space for ' ' (separator)
|
||||
}
|
||||
|
||||
if (i < MaxLength)
|
||||
Str[i++] = (char) Ch;
|
||||
}
|
||||
|
||||
/***** Skip spaces *****/
|
||||
if (isspace (Ch) ||
|
||||
Ch == 0xA0) // Unicode translation for
|
||||
SpaceFound = true;
|
||||
|
||||
if (SpaceFound)
|
||||
Ch = (int) ' ';
|
||||
|
||||
if (i < MaxLength)
|
||||
Str[i++] = (char) Ch;
|
||||
}
|
||||
Str[i] = '\0';
|
||||
return Str;
|
||||
|
|
Loading…
Reference in New Issue