Version 15.224.3

This commit is contained in:
Antonio Cañas Vargas 2016-06-13 20:15:31 +02:00
parent 90c4217ba9
commit d3c0891ade
4 changed files with 74 additions and 70 deletions

View File

@ -545,7 +545,8 @@ a:hover /* Default ==> underlined */
.TAB_ON_YELLOW {background-color:rgba(255, 242, 189, 0.99);} .TAB_ON_YELLOW {background-color:rgba(255, 242, 189, 0.99);}
.TAB_OFF_WHITE {background-color:#D4D4D4;} .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_BLUE {background-color:#CAE1E8;}
.TAB_OFF_YELLOW {background-color:#FADE94;} .TAB_OFF_YELLOW {background-color:#FADE94;}

View File

@ -129,13 +129,14 @@
/****************************** Public constants *****************************/ /****************************** 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 CSS_FILE "swad15.218.css"
#define JS_FILE "swad15.216.js" #define JS_FILE "swad15.216.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.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.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.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. Version 15.224: Jun 12, 2016 Now a user can unfollow users followed by him/her whose profile is not visible.

View File

@ -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 // Users' IDs are always stored internally in capitals and without leading zeros
Str_RemoveLeadingZeros (UsrIDFromTable); Str_RemoveLeadingZeros (UsrIDFromTable);
Str_ConvertToUpperText (UsrIDFromTable); Str_ConvertToUpperText (UsrIDFromTable);
if (ID_CheckIfUsrIDIsValid (UsrIDFromTable)) if (ID_CheckIfUsrIDIsValid (UsrIDFromTable))
// A valid user's ID is found in the first column of table, and stored in 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 // Compare UsrIDFromTable with all the confirmed user's IDs in list

View File

@ -1949,6 +1949,8 @@ char *Str_GetCellFromHTMLTableSkipComments (FILE *FileSrc,char *Str,int MaxLengt
long PosTD; long PosTD;
int i = 0; int i = 0;
int Ch; int Ch;
bool EndCellFound = false;
bool DirectiveFound;
bool SpaceFound; bool SpaceFound;
char StrAux[1+1]; // To find next "/td>" or "nbsp;" 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); 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 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; break;
/***** Skip directives except </td> *****/ /***** 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> */ /* Check if it's </td> */
if (strcasecmp (Str_GetNextStrFromFileConvertingToLower (FileSrc,StrAux,1),"/")) if (!strcasecmp (Str_GetNextStrFromFileConvertingToLower (FileSrc,StrAux,1),"/")) // It's </
{ // It's not </ if (!strcasecmp (Str_GetNextStrFromFileConvertingToLower (FileSrc,StrAux,1),"t")) // It's </t
Str_FindStrInFileBack (FileSrc,"<",Str_NO_SKIP_HTML_COMMENTS); // Skip directive backward 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); 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; if (!EndCellFound)
/***** Skip &nbsp; *****/
if (Ch == (int) '&')
{ {
/* Ver if no it's &nbsp; */ if (DirectiveFound)
if (strcasecmp (Str_GetNextStrFromFileConvertingToLower (FileSrc,StrAux,1),"n")) Ch = (int) ' '; // Replace directive for ' ' (separator)
{ // It's not &n else
Str_FindStrInFileBack (FileSrc,"&",Str_NO_SKIP_HTML_COMMENTS); // Back until & {
Str_FindStrInFile (FileSrc,"&",Str_NO_SKIP_HTML_COMMENTS); // Skip & /***** Check for space or &nbsp; *****/
} SpaceFound = false;
else if (strcasecmp (Str_GetNextStrFromFileConvertingToLower (FileSrc,StrAux,1),"b"))
{ // It's not &nb if (Ch == (int) '&')
Str_FindStrInFileBack (FileSrc,"&",Str_NO_SKIP_HTML_COMMENTS); // Back until & {
Str_FindStrInFile (FileSrc,"&",Str_NO_SKIP_HTML_COMMENTS); // Skip & /* Check for &nbsp; (case insensitive) */
} if (strcasecmp (Str_GetNextStrFromFileConvertingToLower (FileSrc,StrAux,1),"n"))
else if (strcasecmp (Str_GetNextStrFromFileConvertingToLower (FileSrc,StrAux,1),"s")) { // It's not &n
{ // It's not &nbs Str_FindStrInFileBack (FileSrc,"&",Str_NO_SKIP_HTML_COMMENTS); // Back until &
Str_FindStrInFileBack (FileSrc,"&",Str_NO_SKIP_HTML_COMMENTS); // Back until & Str_FindStrInFile (FileSrc,"&",Str_NO_SKIP_HTML_COMMENTS); // Skip &
Str_FindStrInFile (FileSrc,"&",Str_NO_SKIP_HTML_COMMENTS); // Skip & }
} else if (strcasecmp (Str_GetNextStrFromFileConvertingToLower (FileSrc,StrAux,1),"b"))
else if (strcasecmp (Str_GetNextStrFromFileConvertingToLower (FileSrc,StrAux,1),"p")) { // It's not &nb
{ // It's not &nbsp Str_FindStrInFileBack (FileSrc,"&",Str_NO_SKIP_HTML_COMMENTS); // Back until &
Str_FindStrInFileBack (FileSrc,"&",Str_NO_SKIP_HTML_COMMENTS); // Back until & Str_FindStrInFile (FileSrc,"&",Str_NO_SKIP_HTML_COMMENTS); // Skip &
Str_FindStrInFile (FileSrc,"&",Str_NO_SKIP_HTML_COMMENTS); // Skip & }
} else if (strcasecmp (Str_GetNextStrFromFileConvertingToLower (FileSrc,StrAux,1),"s"))
else if (strcasecmp (Str_GetNextStrFromFileConvertingToLower (FileSrc,StrAux,1),";")) { // It's not &nbs
{ // It's not &nbsp; Str_FindStrInFileBack (FileSrc,"&",Str_NO_SKIP_HTML_COMMENTS); // Back until &
Str_FindStrInFileBack (FileSrc,"&",Str_NO_SKIP_HTML_COMMENTS); // Back until & Str_FindStrInFile (FileSrc,"&",Str_NO_SKIP_HTML_COMMENTS); // Skip &
Str_FindStrInFile (FileSrc,"&",Str_NO_SKIP_HTML_COMMENTS); // Skip & }
} else if (strcasecmp (Str_GetNextStrFromFileConvertingToLower (FileSrc,StrAux,1),"p"))
else // It's &nbsp; { // It's not &nbsp
SpaceFound = true; 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 &nbsp;
Str_FindStrInFileBack (FileSrc,"&",Str_NO_SKIP_HTML_COMMENTS); // Back until &
Str_FindStrInFile (FileSrc,"&",Str_NO_SKIP_HTML_COMMENTS); // Skip &
}
else // It's &nbsp;
SpaceFound = true;
}
/***** Skip spaces *****/
if (isspace (Ch) ||
Ch == 0xA0) // Unicode translation for &nbsp;
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 &nbsp;
SpaceFound = true;
if (SpaceFound)
Ch = (int) ' ';
if (i < MaxLength)
Str[i++] = (char) Ch;
} }
Str[i] = '\0'; Str[i] = '\0';
return Str; return Str;