mirror of https://github.com/acanas/swad-core.git
Version 15.242.2
This commit is contained in:
parent
beb47c575f
commit
c7ef325adc
|
@ -147,7 +147,7 @@ void QR_LinkTo (unsigned Size,const char *ParamStr,long Cod)
|
|||
" alt=\"%s\" title=\"%s\""
|
||||
" style=\"width:%upx; height:%upx;\" />",
|
||||
Size,Size,
|
||||
Cfg_HTTPS_URL_SWAD_CGI,
|
||||
Cfg_URL_SWAD_CGI,
|
||||
Txt_STR_LANG_ID[Gbl.Prefs.Language],ParamStr,Cod,
|
||||
Txt_Shortcut,
|
||||
Txt_Shortcut,
|
||||
|
@ -170,7 +170,7 @@ void QR_ExamAnnnouncement (void)
|
|||
" style=\"width:250px; height:250px;\" />"
|
||||
"</div>",
|
||||
300,300,
|
||||
Cfg_HTTPS_URL_SWAD_CGI,Gbl.CurrentCrs.Crs.CrsCod,Act_Actions[ActSeeAllExaAnn].ActCod,
|
||||
Cfg_URL_SWAD_CGI,Gbl.CurrentCrs.Crs.CrsCod,Act_Actions[ActSeeAllExaAnn].ActCod,
|
||||
Txt_Link_to_announcement_of_exam,
|
||||
Txt_Link_to_announcement_of_exam);
|
||||
}
|
||||
|
|
14
swad_RSS.c
14
swad_RSS.c
|
@ -87,7 +87,7 @@ void RSS_UpdateRSSFileForACrs (struct Course *Crs)
|
|||
fprintf (FileRSS,"<title>%s: %s</title>\n",
|
||||
Cfg_PLATFORM_SHORT_NAME,Crs->ShortName);
|
||||
fprintf (FileRSS,"<link>%s/?crs=%ld</link>\n",
|
||||
Cfg_HTTPS_URL_SWAD_CGI,Crs->CrsCod);
|
||||
Cfg_URL_SWAD_CGI,Crs->CrsCod);
|
||||
fprintf (FileRSS,"<description>%s</description>\n",
|
||||
Crs->FullName);
|
||||
fprintf (FileRSS,"<language>%s</language>\n",
|
||||
|
@ -101,7 +101,7 @@ void RSS_UpdateRSSFileForACrs (struct Course *Crs)
|
|||
fprintf (FileRSS,"<title>%s: %s</title>\n",
|
||||
Cfg_PLATFORM_SHORT_NAME,Crs->ShortName);
|
||||
fprintf (FileRSS,"<link>%s/?crs=%ld</link>\n",
|
||||
Cfg_HTTPS_URL_SWAD_CGI,Crs->CrsCod);
|
||||
Cfg_URL_SWAD_CGI,Crs->CrsCod);
|
||||
fprintf (FileRSS,"<width>112</width>\n");
|
||||
fprintf (FileRSS,"<height>32</height>\n");
|
||||
fprintf (FileRSS,"</image>\n");
|
||||
|
@ -200,7 +200,7 @@ static void RSS_WriteNotices (FILE *FileRSS,struct Course *Crs)
|
|||
|
||||
/* Write link to the notice */
|
||||
fprintf (FileRSS,"<link>%s/?crs=%ld</link>\n",
|
||||
Cfg_HTTPS_URL_SWAD_CGI,Crs->CrsCod);
|
||||
Cfg_URL_SWAD_CGI,Crs->CrsCod);
|
||||
|
||||
/* Write full content of the notice */
|
||||
strncpy (Content,row[3],Cns_MAX_BYTES_TEXT);
|
||||
|
@ -216,7 +216,7 @@ static void RSS_WriteNotices (FILE *FileRSS,struct Course *Crs)
|
|||
|
||||
/* Write unique string for this item */
|
||||
fprintf (FileRSS,"<guid isPermaLink=\"false\">%s, course #%ld, notice #%ld</guid>\n",
|
||||
Cfg_HTTPS_URL_SWAD_CGI,Crs->CrsCod,NotCod);
|
||||
Cfg_URL_SWAD_CGI,Crs->CrsCod,NotCod);
|
||||
|
||||
/* Write publication date */
|
||||
fprintf (FileRSS,"<pubDate>");
|
||||
|
@ -290,7 +290,7 @@ static void RSS_WriteExamAnnouncements (FILE *FileRSS,struct Course *Crs)
|
|||
|
||||
/* Write link to the notice */
|
||||
fprintf (FileRSS,"<link>%s/?crs=%ld</link>\n",
|
||||
Cfg_HTTPS_URL_SWAD_CGI,Crs->CrsCod);
|
||||
Cfg_URL_SWAD_CGI,Crs->CrsCod);
|
||||
|
||||
/* Write full content of the exam announcement */
|
||||
//strncpy (Content,row[4],Cns_MAX_BYTES_TEXT);
|
||||
|
@ -306,7 +306,7 @@ static void RSS_WriteExamAnnouncements (FILE *FileRSS,struct Course *Crs)
|
|||
|
||||
/* Write unique string for this item */
|
||||
fprintf (FileRSS,"<guid isPermaLink=\"false\">%s, course #%ld, exam #%ld</guid>\n",
|
||||
Cfg_HTTPS_URL_SWAD_CGI,Crs->CrsCod,ExaCod);
|
||||
Cfg_URL_SWAD_CGI,Crs->CrsCod,ExaCod);
|
||||
|
||||
/* Write publication date */
|
||||
fprintf (FileRSS,"<pubDate>");
|
||||
|
@ -332,5 +332,5 @@ static void RSS_WriteExamAnnouncements (FILE *FileRSS,struct Course *Crs)
|
|||
void RSS_WriteRSSLink (FILE *FileTgt,long CrsCod)
|
||||
{
|
||||
fprintf (FileTgt,"%s/%s/%ld/%s/%s",
|
||||
Cfg_HTTPS_URL_SWAD_PUBLIC,Cfg_FOLDER_CRS,CrsCod,Cfg_RSS_FOLDER,Cfg_RSS_FILE);
|
||||
Cfg_URL_SWAD_PUBLIC,Cfg_FOLDER_CRS,CrsCod,Cfg_RSS_FOLDER,Cfg_RSS_FILE);
|
||||
}
|
||||
|
|
|
@ -4491,7 +4491,7 @@ void Act_GetBreadcrumbStrForAction (Act_Action_t Action,bool HTML,char *Breadcru
|
|||
Arrow = HTML ? ">" :
|
||||
">";
|
||||
sprintf (BreadcrumbStr,"%s %s %s %s %s",
|
||||
Cfg_HTTPS_URL_SWAD_CGI,Arrow,
|
||||
Cfg_URL_SWAD_CGI,Arrow,
|
||||
Txt_TABS_FULL_TXT[Act_Actions[Superaction].Tab],Arrow,
|
||||
Txt_MENU_TITLE[Act_Actions[Superaction].Tab][Act_Actions[Superaction].IndexInMenu]);
|
||||
}
|
||||
|
@ -4592,7 +4592,7 @@ static void Act_FormStartInternal (Act_Action_t NextAction,bool PutParameterLoca
|
|||
{
|
||||
/* Start form */
|
||||
fprintf (Gbl.F.Out,"<form method=\"post\" action=\"%s/%s",
|
||||
Cfg_HTTPS_URL_SWAD_CGI,
|
||||
Cfg_URL_SWAD_CGI,
|
||||
Txt_STR_LANG_ID[Gbl.Prefs.Language]);
|
||||
if (Anchor)
|
||||
if (Anchor[0])
|
||||
|
|
|
@ -105,7 +105,7 @@ void Ban_SeeBanners (void)
|
|||
"</tr>",
|
||||
Gbl.Banners.Lst[NumBan].WWW,
|
||||
Gbl.Banners.Lst[NumBan].FullName,
|
||||
Cfg_HTTPS_URL_SWAD_PUBLIC,Cfg_FOLDER_BANNER,
|
||||
Cfg_URL_SWAD_PUBLIC,Cfg_FOLDER_BANNER,
|
||||
Gbl.Banners.Lst[NumBan].Img,
|
||||
Gbl.Banners.Lst[NumBan].ShortName,
|
||||
Gbl.Banners.Lst[NumBan].FullName);
|
||||
|
@ -923,7 +923,7 @@ void Ban_WriteMenuWithBanners (void)
|
|||
" alt=\"%s\" title=\"%s\""
|
||||
" class=\"BANNER\" />"
|
||||
"</a>",
|
||||
Cfg_HTTPS_URL_SWAD_PUBLIC,Cfg_FOLDER_BANNER,
|
||||
Cfg_URL_SWAD_PUBLIC,Cfg_FOLDER_BANNER,
|
||||
Gbl.Banners.Lst[NumBan].Img,
|
||||
Gbl.Banners.Lst[NumBan].ShortName,
|
||||
Gbl.Banners.Lst[NumBan].FullName);
|
||||
|
|
|
@ -195,7 +195,7 @@ void Cal_DrawCurrentMonth (void)
|
|||
Gbl.Prefs.FirstDayOfWeek,
|
||||
(long) Gbl.StartExecutionTimeUTC,
|
||||
Gbl.CurrentCtr.Ctr.PlcCod,
|
||||
Cfg_HTTPS_URL_SWAD_CGI,
|
||||
Cfg_URL_SWAD_CGI,
|
||||
Txt_STR_LANG_ID[Gbl.Prefs.Language]);
|
||||
Act_SetParamsForm (ParamsStr,ActSeeCal,true);
|
||||
fprintf (Gbl.F.Out,"'%s',",ParamsStr);
|
||||
|
@ -264,7 +264,7 @@ void Cal_DrawCalendar (void)
|
|||
Gbl.CurrentCtr.Ctr.PlcCod,
|
||||
(Gbl.Action.Act == ActPrnCal) ? "true" :
|
||||
"false",
|
||||
Cfg_HTTPS_URL_SWAD_CGI,
|
||||
Cfg_URL_SWAD_CGI,
|
||||
Txt_STR_LANG_ID[Gbl.Prefs.Language]);
|
||||
Act_SetParamsForm (ParamsStr,ActSeeCal,true);
|
||||
fprintf (Gbl.F.Out,"'%s',",
|
||||
|
|
|
@ -316,7 +316,7 @@ static void Ctr_Configuration (bool PrintView)
|
|||
fprintf (Gbl.F.Out,"<img src=\"%s/%s/%02u/%u/%u.jpg\""
|
||||
" alt=\"%s\" title=\"%s\""
|
||||
" class=\"%s\" />",
|
||||
Cfg_HTTPS_URL_SWAD_PUBLIC,Cfg_FOLDER_CTR,
|
||||
Cfg_URL_SWAD_PUBLIC,Cfg_FOLDER_CTR,
|
||||
(unsigned) (Gbl.CurrentCtr.Ctr.CtrCod % 100),
|
||||
(unsigned) Gbl.CurrentCtr.Ctr.CtrCod,
|
||||
(unsigned) Gbl.CurrentCtr.Ctr.CtrCod,
|
||||
|
@ -419,10 +419,10 @@ static void Ctr_Configuration (bool PrintView)
|
|||
"</tr>",
|
||||
The_ClassForm[Gbl.Prefs.Theme],
|
||||
Txt_Shortcut,
|
||||
Cfg_HTTPS_URL_SWAD_CGI,
|
||||
Cfg_URL_SWAD_CGI,
|
||||
Txt_STR_LANG_ID[Gbl.Prefs.Language],
|
||||
Gbl.CurrentCtr.Ctr.CtrCod,
|
||||
Cfg_HTTPS_URL_SWAD_CGI,
|
||||
Cfg_URL_SWAD_CGI,
|
||||
Txt_STR_LANG_ID[Gbl.Prefs.Language],
|
||||
Gbl.CurrentCtr.Ctr.CtrCod);
|
||||
|
||||
|
|
|
@ -133,13 +133,14 @@
|
|||
/****************************** Public constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 15.242.1 (2016-07-08)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 15.242.2 (2016-07-08)"
|
||||
#define CSS_FILE "swad15.229.css"
|
||||
#define JS_FILE "swad15.238.1.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.242.2: Jul 08, 2016 Code refactoring related to users' photos. (203777 lines)
|
||||
Version 15.242.1: Jul 08, 2016 URLs for users' photos in web service are sent with https instead of http. (203782 lines)
|
||||
Version 15.242: Jul 07, 2016 New option Profile > Agenda. Not implemented. (203781 lines)
|
||||
Version 15.241.7: Jul 06, 2016 Removed cookies in swad.ugr.es.
|
||||
|
|
|
@ -527,9 +527,9 @@ void Cht_OpenChatWindow (void)
|
|||
Cfg_PLATFORM_SERVER);
|
||||
fprintf (Gbl.F.Out,"\n<param name=\"port\" value=\"5000\">");
|
||||
fprintf (Gbl.F.Out,"\n<param name=\"image_bl\" value=\"%s/%s/usr_bl.jpg\">",
|
||||
Cfg_HTTP_URL_SWAD_PUBLIC,Cfg_FOLDER_PUBLIC_ICON);
|
||||
Cfg_URL_SWAD_PUBLIC,Cfg_FOLDER_PUBLIC_ICON);
|
||||
fprintf (Gbl.F.Out,"\n<param name=\"image_url\" value=\"%s/%s/%s.jpg\">",
|
||||
Cfg_HTTP_URL_SWAD_PUBLIC,Cfg_FOLDER_PHOTO,Gbl.Usrs.Me.UsrDat.Photo);
|
||||
Cfg_URL_SWAD_PUBLIC,Cfg_FOLDER_PHOTO,Gbl.Usrs.Me.UsrDat.Photo);
|
||||
fprintf (Gbl.F.Out,"\n<param name=\"channel_name\" value=\"%s\">",
|
||||
ListRoomCodes);
|
||||
fprintf (Gbl.F.Out,"\n<param name=\"tab\" value=\"%s\">",
|
||||
|
|
|
@ -28,9 +28,9 @@
|
|||
/** Uncomment one of the following installations of SWAD or create your own **/
|
||||
/*****************************************************************************/
|
||||
|
||||
//#define LOCALHOST_UBUNTU // Comment this line if not applicable
|
||||
#define LOCALHOST_UBUNTU // Comment this line if not applicable
|
||||
//#define OPENSWAD_ORG // Comment this line if not applicable
|
||||
#define SWAD_UGR_ES // Comment this line if not applicable
|
||||
//#define SWAD_UGR_ES // Comment this line if not applicable
|
||||
//#define SWADBERRY_UGR_ES // Comment this line if not applicable
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -51,9 +51,8 @@
|
|||
#define Cfg_PLATFORM_SHORT_NAME "SWAD local"
|
||||
#define Cfg_PLATFORM_FULL_NAME "SWAD (Shared Workspace At a Distance)"
|
||||
#define Cfg_PLATFORM_SERVER "localhost" // Server name (main part of the URL)
|
||||
#define Cfg_HTTPS_URL_SWAD_CGI "https://localhost/swad" // Without ending slash
|
||||
#define Cfg_HTTPS_URL_SWAD_PUBLIC "https://localhost/swad" // Without ending slash
|
||||
#define Cfg_HTTP_URL_SWAD_PUBLIC "http://localhost/swad" // Without ending slash
|
||||
#define Cfg_URL_SWAD_CGI "https://localhost/swad" // Without ending slash
|
||||
#define Cfg_URL_SWAD_PUBLIC "https://localhost/swad" // Without ending slash
|
||||
#define Cfg_PATH_CGI_BIN "/usr/lib/cgi-bin/swad" // Directory for this CGI and other commands called by it
|
||||
#define Cfg_PATH_SWAD_PUBLIC "/var/www/html/swad" // Main public directory for public SWAD pages, icons, etc.
|
||||
#define Cfg_PATH_SWAD_PRIVATE "/var/www/swad" // Main private directory for SWAD private data
|
||||
|
@ -100,9 +99,8 @@
|
|||
#define Cfg_PLATFORM_SHORT_NAME "OpenSWAD"
|
||||
#define Cfg_PLATFORM_FULL_NAME "OpenSWAD (Open Shared Workspace At a Distance)"
|
||||
#define Cfg_PLATFORM_SERVER "openswad.org" // Server name (main part of the URL)
|
||||
#define Cfg_HTTPS_URL_SWAD_CGI "https://openswad.org" // Without ending slash
|
||||
#define Cfg_HTTPS_URL_SWAD_PUBLIC "https://openswad.org/swad" // Without ending slash
|
||||
#define Cfg_HTTP_URL_SWAD_PUBLIC "http://openswad.org/swad" // Without ending slash
|
||||
#define Cfg_URL_SWAD_CGI "https://openswad.org" // Without ending slash
|
||||
#define Cfg_URL_SWAD_PUBLIC "https://openswad.org/swad" // Without ending slash
|
||||
#define Cfg_PATH_CGI_BIN "/var/www/cgi-bin/swad" // Directory for this CGI and other commands called by it
|
||||
#define Cfg_PATH_SWAD_PUBLIC "/var/www/html/swad" // Main public directory for public SWAD pages, icons, etc.
|
||||
#define Cfg_PATH_SWAD_PRIVATE "/var/www/swad" // Main private directory for SWAD private data
|
||||
|
@ -166,9 +164,8 @@
|
|||
#define Cfg_PLATFORM_SHORT_NAME "SWAD"
|
||||
#define Cfg_PLATFORM_FULL_NAME "SWAD (Shared Workspace At a Distance)"
|
||||
#define Cfg_PLATFORM_SERVER "swad.ugr.es" // Server name (main part of the URL)
|
||||
#define Cfg_HTTPS_URL_SWAD_CGI "https://swad.ugr.es" // Without ending slash
|
||||
#define Cfg_HTTPS_URL_SWAD_PUBLIC "https://swad.ugr.es/swad" // Without ending slash
|
||||
#define Cfg_HTTP_URL_SWAD_PUBLIC "http://swad.ugr.es/swad" // Without ending slash
|
||||
#define Cfg_URL_SWAD_CGI "https://swad.ugr.es" // Without ending slash
|
||||
#define Cfg_URL_SWAD_PUBLIC "https://swad.ugr.es/swad" // Without ending slash
|
||||
#define Cfg_PATH_CGI_BIN "/var/www/cgi-bin" // Directory for this CGI and other commands called by it
|
||||
#define Cfg_PATH_SWAD_PUBLIC "/var/www/html/swad" // Main public directory for public SWAD pages, icons, etc.
|
||||
#define Cfg_PATH_SWAD_PRIVATE "/var/www/swad" // Main private directory for SWAD private data
|
||||
|
@ -228,10 +225,9 @@
|
|||
|
||||
#define Cfg_PLATFORM_SHORT_NAME "SWADberry"
|
||||
#define Cfg_PLATFORM_FULL_NAME "SWADberry (Shared Workspace At a Distance on a Raspberry Pi)"
|
||||
#define Cfg_PLATFORM_SERVER "150.214.190.151" // Server name (main part of the URL)
|
||||
#define Cfg_HTTPS_URL_SWAD_CGI "https://150.214.190.151/swad" // Without ending slash
|
||||
#define Cfg_HTTPS_URL_SWAD_PUBLIC "https://150.214.190.151/swad" // Without ending slash
|
||||
#define Cfg_HTTP_URL_SWAD_PUBLIC "http://150.214.190.151/swad" // Without ending slash
|
||||
#define Cfg_PLATFORM_SERVER "swadberry.ugr.es" // Server name (main part of the URL)
|
||||
#define Cfg_URL_SWAD_CGI "https://swadberry.ugr.es/swad" // Without ending slash
|
||||
#define Cfg_URL_SWAD_PUBLIC "https://swadberry.ugr.es/swad" // Without ending slash
|
||||
#define Cfg_PATH_CGI_BIN "/usr/lib/cgi-bin/swad" // Directory for this CGI and other commands called by it
|
||||
#define Cfg_PATH_SWAD_PUBLIC "/var/www/html/swad" // Main public directory for public SWAD pages, icons, etc.
|
||||
#define Cfg_PATH_SWAD_PRIVATE "/var/www/swad" // Main private directory for SWAD private data
|
||||
|
|
|
@ -309,10 +309,10 @@ static void Cty_Configuration (bool PrintView)
|
|||
"</tr>",
|
||||
The_ClassForm[Gbl.Prefs.Theme],
|
||||
Txt_Shortcut,
|
||||
Cfg_HTTPS_URL_SWAD_CGI,
|
||||
Cfg_URL_SWAD_CGI,
|
||||
Txt_STR_LANG_ID[Gbl.Prefs.Language],
|
||||
Gbl.CurrentCty.Cty.CtyCod,
|
||||
Cfg_HTTPS_URL_SWAD_CGI,
|
||||
Cfg_URL_SWAD_CGI,
|
||||
Txt_STR_LANG_ID[Gbl.Prefs.Language],
|
||||
Gbl.CurrentCty.Cty.CtyCod);
|
||||
|
||||
|
|
|
@ -313,10 +313,10 @@ static void Crs_Configuration (bool PrintView)
|
|||
"</tr>",
|
||||
The_ClassForm[Gbl.Prefs.Theme],
|
||||
Txt_Shortcut,
|
||||
Cfg_HTTPS_URL_SWAD_CGI,
|
||||
Cfg_URL_SWAD_CGI,
|
||||
Txt_STR_LANG_ID[Gbl.Prefs.Language],
|
||||
Gbl.CurrentCrs.Crs.CrsCod,
|
||||
Cfg_HTTPS_URL_SWAD_CGI,
|
||||
Cfg_URL_SWAD_CGI,
|
||||
Txt_STR_LANG_ID[Gbl.Prefs.Language],
|
||||
Gbl.CurrentCrs.Crs.CrsCod);
|
||||
|
||||
|
|
|
@ -388,10 +388,10 @@ static void Deg_Configuration (bool PrintView)
|
|||
"</tr>",
|
||||
The_ClassForm[Gbl.Prefs.Theme],
|
||||
Txt_Shortcut,
|
||||
Cfg_HTTPS_URL_SWAD_CGI,
|
||||
Cfg_URL_SWAD_CGI,
|
||||
Txt_STR_LANG_ID[Gbl.Prefs.Language],
|
||||
Gbl.CurrentDeg.Deg.DegCod,
|
||||
Cfg_HTTPS_URL_SWAD_CGI,
|
||||
Cfg_URL_SWAD_CGI,
|
||||
Txt_STR_LANG_ID[Gbl.Prefs.Language],
|
||||
Gbl.CurrentDeg.Deg.DegCod);
|
||||
|
||||
|
@ -987,7 +987,7 @@ void Deg_InitCurrentCourse (void)
|
|||
sprintf (Gbl.CurrentCrs.PathRelPubl,"%s/%s/%ld",
|
||||
Cfg_PATH_SWAD_PUBLIC ,Cfg_FOLDER_CRS,Gbl.CurrentCrs.Crs.CrsCod);
|
||||
sprintf (Gbl.CurrentCrs.PathURLPubl,"%s/%s/%ld",
|
||||
Cfg_HTTPS_URL_SWAD_PUBLIC,Cfg_FOLDER_CRS,Gbl.CurrentCrs.Crs.CrsCod);
|
||||
Cfg_URL_SWAD_PUBLIC,Cfg_FOLDER_CRS,Gbl.CurrentCrs.Crs.CrsCod);
|
||||
|
||||
/***** If any of the course directories does not exist, create it *****/
|
||||
if (!Fil_CheckIfPathExists (Gbl.CurrentCrs.PathPriv))
|
||||
|
|
|
@ -8146,7 +8146,7 @@ static void Brw_PutFormToUploadFilesUsingDropzone (const char *FileNameToShow)
|
|||
" id=\"my-awesome-dropzone\""
|
||||
" style=\"display:inline-block; width:100%%;"
|
||||
" background:url('%s/upload320x320.gif') no-repeat center;\">",
|
||||
Cfg_HTTPS_URL_SWAD_CGI,
|
||||
Cfg_URL_SWAD_CGI,
|
||||
Txt_STR_LANG_ID[Gbl.Prefs.Language],
|
||||
Gbl.Prefs.IconsURL);
|
||||
Par_PutHiddenParamLong ("act",Act_Actions[Brw_ActUploadFileDropzone[Gbl.FileBrowser.Type]].ActCod);
|
||||
|
@ -9968,7 +9968,7 @@ void Brw_GetLinkToDownloadFile (const char *PathInTree,const char *FileName,char
|
|||
|
||||
/***** Create URL pointing to symbolic link *****/
|
||||
sprintf (URLWithSpaces,"%s/%s/%s/%s",
|
||||
Cfg_HTTPS_URL_SWAD_PUBLIC,Cfg_FOLDER_FILE_BROWSER_TMP,
|
||||
Cfg_URL_SWAD_PUBLIC,Cfg_FOLDER_FILE_BROWSER_TMP,
|
||||
Gbl.FileBrowser.TmpPubDir,
|
||||
FileName);
|
||||
}
|
||||
|
|
|
@ -133,7 +133,7 @@ void Gbl_InitializeGlobals (void)
|
|||
Gbl.Prefs.Theme = The_THEME_DEFAULT; // Default theme
|
||||
Gbl.Prefs.IconSet = Ico_ICON_SET_DEFAULT; // Default icon set
|
||||
sprintf (Gbl.Prefs.IconsURL,"%s/%s",
|
||||
Cfg_HTTPS_URL_SWAD_PUBLIC,Cfg_FOLDER_PUBLIC_ICON);
|
||||
Cfg_URL_SWAD_PUBLIC,Cfg_FOLDER_PUBLIC_ICON);
|
||||
sprintf (Gbl.Prefs.PathTheme,"%s/%s/%s",
|
||||
Gbl.Prefs.IconsURL,
|
||||
Cfg_ICON_FOLDER_THEMES,
|
||||
|
|
|
@ -575,7 +575,7 @@ void Img_ShowImage (struct Image *Image,
|
|||
|
||||
/***** Create URL pointing to symbolic link *****/
|
||||
sprintf (URL,"%s/%s/%s/%s",
|
||||
Cfg_HTTPS_URL_SWAD_PUBLIC,Cfg_FOLDER_FILE_BROWSER_TMP,
|
||||
Cfg_URL_SWAD_PUBLIC,Cfg_FOLDER_FILE_BROWSER_TMP,
|
||||
Gbl.FileBrowser.TmpPubDir,
|
||||
FileNameImgPriv);
|
||||
|
||||
|
|
|
@ -1066,8 +1066,8 @@ static void Ind_ShowTableOfCoursesWithIndicators (Ind_IndicatorsLayout_t Indicat
|
|||
"DAT_SMALL_RED"),
|
||||
Gbl.RowEvenOdd,
|
||||
row[3],
|
||||
Gbl.RowEvenOdd,Cfg_HTTPS_URL_SWAD_CGI,CrsCod,Act_Actions[ActReqStaCrs].ActCod,
|
||||
Cfg_HTTPS_URL_SWAD_CGI,CrsCod,Act_Actions[ActReqStaCrs].ActCod,
|
||||
Gbl.RowEvenOdd,Cfg_URL_SWAD_CGI,CrsCod,Act_Actions[ActReqStaCrs].ActCod,
|
||||
Cfg_URL_SWAD_CGI,CrsCod,Act_Actions[ActReqStaCrs].ActCod,
|
||||
|
||||
Indicators.CourseAllOK ? "DAT_SMALL_GREEN" :
|
||||
(Indicators.CoursePartiallyOK ? "DAT_SMALL" :
|
||||
|
@ -1231,8 +1231,8 @@ static void Ind_ShowTableOfCoursesWithIndicators (Ind_IndicatorsLayout_t Indicat
|
|||
"DAT_SMALL_RED"),
|
||||
Gbl.RowEvenOdd,
|
||||
row[3],
|
||||
Gbl.RowEvenOdd,Cfg_HTTPS_URL_SWAD_CGI,CrsCod,Act_Actions[ActReqStaCrs].ActCod,
|
||||
Cfg_HTTPS_URL_SWAD_CGI,CrsCod,Act_Actions[ActReqStaCrs].ActCod,
|
||||
Gbl.RowEvenOdd,Cfg_URL_SWAD_CGI,CrsCod,Act_Actions[ActReqStaCrs].ActCod,
|
||||
Cfg_URL_SWAD_CGI,CrsCod,Act_Actions[ActReqStaCrs].ActCod,
|
||||
|
||||
NumTchs != 0 ? "DAT_SMALL_GREEN" :
|
||||
"DAT_SMALL_RED",
|
||||
|
|
|
@ -781,7 +781,7 @@ static bool Inf_CheckAndShowPage (void)
|
|||
if (Fil_CheckIfPathExists (PathRelFileHTML)) // TODO: Check if not empty?
|
||||
{
|
||||
sprintf (URL,"%s/%s/%ld/%s/index.html",
|
||||
Cfg_HTTPS_URL_SWAD_PUBLIC,Cfg_FOLDER_CRS,Gbl.CurrentCrs.Crs.CrsCod,
|
||||
Cfg_URL_SWAD_PUBLIC,Cfg_FOLDER_CRS,Gbl.CurrentCrs.Crs.CrsCod,
|
||||
Inf_FileNamesForInfoType[Gbl.CurrentCrs.Info.Type]);
|
||||
Inf_ShowPage (URL);
|
||||
|
||||
|
@ -793,7 +793,7 @@ static bool Inf_CheckAndShowPage (void)
|
|||
if (Fil_CheckIfPathExists (PathRelFileHTML)) // TODO: Check if not empty?
|
||||
{
|
||||
sprintf (URL,"%s/%s/%ld/%s/index.htm",
|
||||
Cfg_HTTPS_URL_SWAD_PUBLIC,Cfg_FOLDER_CRS,Gbl.CurrentCrs.Crs.CrsCod,
|
||||
Cfg_URL_SWAD_PUBLIC,Cfg_FOLDER_CRS,Gbl.CurrentCrs.Crs.CrsCod,
|
||||
Inf_FileNamesForInfoType[Gbl.CurrentCrs.Info.Type]);
|
||||
Inf_ShowPage (URL);
|
||||
|
||||
|
@ -1835,7 +1835,7 @@ static bool Inf_CheckAndShowRichTxt (void)
|
|||
#ifdef Cfg_MATHJAX_LOCAL
|
||||
// Use the local copy of MathJax
|
||||
sprintf (MathJaxURL,"=%s/MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML",
|
||||
Cfg_HTTPS_URL_SWAD_PUBLIC);
|
||||
Cfg_URL_SWAD_PUBLIC);
|
||||
#else
|
||||
// Use the MathJax Content Delivery Network (CDN)
|
||||
MathJaxURL[0] = '\0';
|
||||
|
|
|
@ -345,10 +345,10 @@ static void Ins_Configuration (bool PrintView)
|
|||
"</tr>",
|
||||
The_ClassForm[Gbl.Prefs.Theme],
|
||||
Txt_Shortcut,
|
||||
Cfg_HTTPS_URL_SWAD_CGI,
|
||||
Cfg_URL_SWAD_CGI,
|
||||
Txt_STR_LANG_ID[Gbl.Prefs.Language],
|
||||
Gbl.CurrentIns.Ins.InsCod,
|
||||
Cfg_HTTPS_URL_SWAD_CGI,
|
||||
Cfg_URL_SWAD_CGI,
|
||||
Txt_STR_LANG_ID[Gbl.Prefs.Language],
|
||||
Gbl.CurrentIns.Ins.InsCod);
|
||||
|
||||
|
|
|
@ -176,7 +176,7 @@ void Lay_WriteStartOfPage (void)
|
|||
/* Canonical URL */
|
||||
fprintf (Gbl.F.Out,"<link rel=\"canonical\""
|
||||
" href=\"%s\" />\n",
|
||||
Cfg_HTTPS_URL_SWAD_CGI);
|
||||
Cfg_URL_SWAD_CGI);
|
||||
|
||||
/* Favicon */
|
||||
fprintf (Gbl.F.Out,"<link type=\"image/x-icon\" href=\"%s/favicon.ico\" rel=\"icon\" />\n"
|
||||
|
@ -186,7 +186,7 @@ void Lay_WriteStartOfPage (void)
|
|||
|
||||
/* Style sheet for SWAD */
|
||||
fprintf (Gbl.F.Out,"<link rel=\"StyleSheet\" href=\"%s/%s\" type=\"text/css\" />\n",
|
||||
Cfg_HTTPS_URL_SWAD_PUBLIC,CSS_FILE);
|
||||
Cfg_URL_SWAD_PUBLIC,CSS_FILE);
|
||||
|
||||
/* Style sheet for Dropzone.js (http://www.dropzonejs.com/) */
|
||||
// The public directory dropzone must hold:
|
||||
|
@ -216,7 +216,7 @@ void Lay_WriteStartOfPage (void)
|
|||
fprintf (Gbl.F.Out,"<link rel=\"StyleSheet\""
|
||||
" href=\"%s/dropzone/css/dropzone.css\""
|
||||
" type=\"text/css\" />\n",
|
||||
Cfg_HTTPS_URL_SWAD_PUBLIC);
|
||||
Cfg_URL_SWAD_PUBLIC);
|
||||
|
||||
/* Redirect to correct language */
|
||||
if ((Gbl.Action.Act == ActAutUsrInt ||
|
||||
|
@ -401,7 +401,7 @@ static void Lay_WriteRedirectionToMyLanguage (void)
|
|||
|
||||
fprintf (Gbl.F.Out,"<meta http-equiv=\"refresh\""
|
||||
" content=\"0; url='%s/%s?act=%ld&ses=%s'\">",
|
||||
Cfg_HTTPS_URL_SWAD_CGI,
|
||||
Cfg_URL_SWAD_CGI,
|
||||
Txt_STR_LANG_ID[Gbl.Usrs.Me.UsrDat.Prefs.Language],
|
||||
Act_Actions[ActAutUsrChgLan].ActCod,
|
||||
Gbl.Session.Id);
|
||||
|
@ -425,7 +425,7 @@ static void Lay_WriteScripts (void)
|
|||
/***** General scripts for swad *****/
|
||||
fprintf (Gbl.F.Out,"<script type=\"text/javascript\" src=\"%s/%s\">"
|
||||
"</script>\n",
|
||||
Cfg_HTTPS_URL_SWAD_PUBLIC,JS_FILE);
|
||||
Cfg_URL_SWAD_PUBLIC,JS_FILE);
|
||||
|
||||
/***** Script for MathJax *****/
|
||||
// MathJax configuration
|
||||
|
@ -444,7 +444,7 @@ static void Lay_WriteScripts (void)
|
|||
fprintf (Gbl.F.Out,"<script type=\"text/javascript\""
|
||||
" src=\"%s/MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML\">"
|
||||
"</script>\n",
|
||||
Cfg_HTTPS_URL_SWAD_PUBLIC);
|
||||
Cfg_URL_SWAD_PUBLIC);
|
||||
#else
|
||||
// Use the MathJax Content Delivery Network (CDN)
|
||||
fprintf (Gbl.F.Out,"<script type=\"text/javascript\""
|
||||
|
@ -565,7 +565,7 @@ static void Lay_WriteScripts (void)
|
|||
" src=\"%s/dropzone/dropzone.js\""
|
||||
" charset=\"windows-1252\">"
|
||||
"</script>\n",
|
||||
Cfg_HTTPS_URL_SWAD_PUBLIC);
|
||||
Cfg_URL_SWAD_PUBLIC);
|
||||
Lay_WriteScriptCustomDropzone ();
|
||||
break;
|
||||
case ActReqAccGbl:
|
||||
|
@ -576,7 +576,7 @@ static void Lay_WriteScripts (void)
|
|||
fprintf (Gbl.F.Out,"<script type=\"text/javascript\""
|
||||
" src=\"%s/jstz/jstz.js\">"
|
||||
"</script>\n",
|
||||
Cfg_HTTPS_URL_SWAD_PUBLIC);
|
||||
Cfg_URL_SWAD_PUBLIC);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
@ -147,7 +147,7 @@ void Log_DrawLogo (Sco_Scope_t Scope,long Cod,const char *AltText,
|
|||
fprintf (Gbl.F.Out,"<img src=\"");
|
||||
if (LogoFound)
|
||||
fprintf (Gbl.F.Out,"%s/%s/%02u/%u/logo/%u.png",
|
||||
Cfg_HTTPS_URL_SWAD_PUBLIC,Folder,
|
||||
Cfg_URL_SWAD_PUBLIC,Folder,
|
||||
(unsigned) (Cod % 100),
|
||||
(unsigned) Cod,
|
||||
(unsigned) Cod);
|
||||
|
|
|
@ -1500,9 +1500,9 @@ bool Mai_SendMailMsgToConfirmEmail (void)
|
|||
/* Message body */
|
||||
fprintf (Gbl.Msg.FileMail,
|
||||
Txt_If_you_just_request_from_X_the_confirmation_of_your_email_Y_NO_HTML,
|
||||
Cfg_HTTPS_URL_SWAD_CGI,Gbl.Usrs.Me.UsrDat.Email,
|
||||
Cfg_HTTPS_URL_SWAD_CGI,Act_Actions[ActCnfMai].ActCod,Gbl.UniqueNameEncrypted,
|
||||
Cfg_HTTPS_URL_SWAD_CGI);
|
||||
Cfg_URL_SWAD_CGI,Gbl.Usrs.Me.UsrDat.Email,
|
||||
Cfg_URL_SWAD_CGI,Act_Actions[ActCnfMai].ActCod,Gbl.UniqueNameEncrypted,
|
||||
Cfg_URL_SWAD_CGI);
|
||||
|
||||
/* Footer note */
|
||||
Mai_WriteFootNoteEMail (Gbl.Prefs.Language);
|
||||
|
@ -1695,7 +1695,7 @@ void Mai_WriteFootNoteEMail (Txt_Language_t Language)
|
|||
"%s\n",
|
||||
Txt_Please_do_not_reply_to_this_automatically_generated_email_NO_HTML[Language],
|
||||
Cfg_PLATFORM_SHORT_NAME,
|
||||
Cfg_HTTPS_URL_SWAD_CGI);
|
||||
Cfg_URL_SWAD_CGI);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -1680,7 +1680,7 @@ static void Ntf_SendPendingNotifByEMailToOneUsr (struct UsrData *ToUsrDat,unsign
|
|||
/* Go to: */
|
||||
fprintf (Gbl.Msg.FileMail,"%s: %s/ > %s > %s\n",
|
||||
Txt_Go_to_NO_HTML[ToUsrLanguage],
|
||||
Cfg_HTTPS_URL_SWAD_CGI,
|
||||
Cfg_URL_SWAD_CGI,
|
||||
Txt_TAB_Messages_NO_HTML[ToUsrLanguage],
|
||||
Txt_Notifications_NO_HTML[ToUsrLanguage]);
|
||||
|
||||
|
|
|
@ -406,7 +406,7 @@ int Pwd_SendNewPasswordByEmail (char NewRandomPlainPassword[Pwd_MAX_LENGTH_PLAIN
|
|||
/* Message body */
|
||||
fprintf (Gbl.Msg.FileMail,Txt_The_following_password_has_been_assigned_to_you_to_log_in_X_NO_HTML,
|
||||
Cfg_PLATFORM_SHORT_NAME,NewRandomPlainPassword,
|
||||
Cfg_HTTPS_URL_SWAD_CGI,(unsigned) (Cfg_TIME_TO_DELETE_OLD_PENDING_PASSWORDS/(24L*60L*60L)),
|
||||
Cfg_URL_SWAD_CGI,(unsigned) (Cfg_TIME_TO_DELETE_OLD_PENDING_PASSWORDS/(24L*60L*60L)),
|
||||
Gbl.Usrs.Me.UsrDat.Email);
|
||||
|
||||
/* Footer note */
|
||||
|
|
28
swad_photo.c
28
swad_photo.c
|
@ -206,7 +206,7 @@ void Pho_PutLinkToChangeOtherUsrPhoto (void)
|
|||
else // Not me
|
||||
if (Pho_CheckIfICanChangeOtherUsrPhoto (&Gbl.Usrs.Other.UsrDat))
|
||||
{
|
||||
PhotoExists = Pho_BuildLinkToPhoto (&Gbl.Usrs.Other.UsrDat,PhotoURL,true);
|
||||
PhotoExists = Pho_BuildLinkToPhoto (&Gbl.Usrs.Other.UsrDat,PhotoURL);
|
||||
TitleText = PhotoExists ? Txt_Change_photo :
|
||||
Txt_Upload_photo;
|
||||
Lay_PutContextualLink ( Gbl.Usrs.Other.UsrDat.RoleInCurrentCrsDB == Rol_STUDENT ? ActReqStdPho :
|
||||
|
@ -246,7 +246,7 @@ static void Pho_PutIconToRequestRemoveOtherUsrPhoto (void)
|
|||
bool PhotoExists;
|
||||
|
||||
/***** Link to request the removal of another user's photo *****/
|
||||
PhotoExists = Pho_BuildLinkToPhoto (&Gbl.Usrs.Other.UsrDat,PhotoURL,true);
|
||||
PhotoExists = Pho_BuildLinkToPhoto (&Gbl.Usrs.Other.UsrDat,PhotoURL);
|
||||
if (PhotoExists)
|
||||
Lay_PutContextualLink ( Gbl.Usrs.Other.UsrDat.RoleInCurrentCrsDB == Rol_STUDENT ? ActReqRemStdPho :
|
||||
(Gbl.Usrs.Other.UsrDat.RoleInCurrentCrsDB == Rol_TEACHER ? ActReqRemTchPho :
|
||||
|
@ -290,7 +290,7 @@ static void Pho_ReqOtherUsrPhoto (void)
|
|||
char PhotoURL[PATH_MAX+1];
|
||||
|
||||
/***** Get photo URL *****/
|
||||
Pho_BuildLinkToPhoto (&Gbl.Usrs.Other.UsrDat,PhotoURL,true);
|
||||
Pho_BuildLinkToPhoto (&Gbl.Usrs.Other.UsrDat,PhotoURL);
|
||||
|
||||
/***** Show the form to send another user's photo *****/
|
||||
Pho_ReqPhoto (&Gbl.Usrs.Other.UsrDat,PhotoURL);
|
||||
|
@ -423,7 +423,7 @@ void Pho_ReqRemoveMyPhoto (void)
|
|||
extern const char *Txt_The_photo_no_longer_exists;
|
||||
|
||||
/***** Show current photo and help message *****/
|
||||
if (Pho_BuildLinkToPhoto (&Gbl.Usrs.Me.UsrDat,Gbl.Usrs.Me.PhotoURL,true))
|
||||
if (Pho_BuildLinkToPhoto (&Gbl.Usrs.Me.UsrDat,Gbl.Usrs.Me.PhotoURL))
|
||||
{
|
||||
/***** Start frame *****/
|
||||
Lay_StartRoundFrame (NULL,Txt_Photo,Pho_PutIconToRequestRemoveMyPhoto);
|
||||
|
@ -455,7 +455,7 @@ void Pho_RemoveMyPhoto1 (void)
|
|||
Gbl.Error = !Pho_RemovePhoto (&Gbl.Usrs.Me.UsrDat);
|
||||
|
||||
/***** The link to my photo is not valid now, so build it again before writing the web page *****/
|
||||
Gbl.Usrs.Me.MyPhotoExists = Pho_BuildLinkToPhoto (&Gbl.Usrs.Me.UsrDat,Gbl.Usrs.Me.PhotoURL,true);
|
||||
Gbl.Usrs.Me.MyPhotoExists = Pho_BuildLinkToPhoto (&Gbl.Usrs.Me.UsrDat,Gbl.Usrs.Me.PhotoURL);
|
||||
}
|
||||
|
||||
void Pho_RemoveMyPhoto2 (void)
|
||||
|
@ -488,7 +488,7 @@ void Pho_ReqRemoveUsrPhoto (void)
|
|||
if (Pho_CheckIfICanChangeOtherUsrPhoto (&Gbl.Usrs.Other.UsrDat))
|
||||
{
|
||||
/***** Show current photo and help message *****/
|
||||
if (Pho_BuildLinkToPhoto (&Gbl.Usrs.Other.UsrDat,PhotoURL,true))
|
||||
if (Pho_BuildLinkToPhoto (&Gbl.Usrs.Other.UsrDat,PhotoURL))
|
||||
{
|
||||
/***** Start frame *****/
|
||||
Lay_StartRoundFrame (NULL,Txt_Photo,Pho_PutIconToRequestRemoveOtherUsrPhoto);
|
||||
|
@ -764,7 +764,7 @@ static bool Pho_ReceivePhotoAndDetectFaces (bool ItsMe,const struct UsrData *Usr
|
|||
" usemap=\"#faces_map\""
|
||||
" alt=\"%s\" title=\"%s\" />"
|
||||
"</div>",
|
||||
Cfg_HTTPS_URL_SWAD_PUBLIC,Cfg_FOLDER_PHOTO,Cfg_FOLDER_PHOTO_TMP,
|
||||
Cfg_URL_SWAD_PUBLIC,Cfg_FOLDER_PHOTO,Cfg_FOLDER_PHOTO_TMP,
|
||||
Gbl.UniqueNameEncrypted,
|
||||
Txt_Faces_detected,Txt_Faces_detected);
|
||||
|
||||
|
@ -781,7 +781,7 @@ void Pho_UpdateMyPhoto1 (void)
|
|||
Pho_UpdatePhoto1 (&Gbl.Usrs.Me.UsrDat);
|
||||
|
||||
/***** The link to my photo is not valid now, so build it again before writing the web page *****/
|
||||
Gbl.Usrs.Me.MyPhotoExists = Pho_BuildLinkToPhoto (&Gbl.Usrs.Me.UsrDat,Gbl.Usrs.Me.PhotoURL,true);
|
||||
Gbl.Usrs.Me.MyPhotoExists = Pho_BuildLinkToPhoto (&Gbl.Usrs.Me.UsrDat,Gbl.Usrs.Me.PhotoURL);
|
||||
}
|
||||
|
||||
void Pho_UpdateMyPhoto2 (void)
|
||||
|
@ -862,7 +862,7 @@ static void Pho_UpdatePhoto2 (void)
|
|||
" style=\"width:%upx; height:%upx;\" />"
|
||||
"<br />%s"
|
||||
"</td>",
|
||||
Cfg_HTTPS_URL_SWAD_PUBLIC,Cfg_FOLDER_PHOTO,Cfg_FOLDER_PHOTO_TMP,
|
||||
Cfg_URL_SWAD_PUBLIC,Cfg_FOLDER_PHOTO,Cfg_FOLDER_PHOTO_TMP,
|
||||
Gbl.Usrs.FileNamePhoto,NumPhoto + 1,
|
||||
Txt_PHOTO_PROCESSING_CAPTIONS[NumPhoto],
|
||||
Txt_PHOTO_PROCESSING_CAPTIONS[NumPhoto],
|
||||
|
@ -954,7 +954,7 @@ bool Pho_ShowUsrPhotoIsAllowed (const struct UsrData *UsrDat,char *PhotoURL)
|
|||
ICanSeePhoto = Pri_ShowIsAllowed (UsrDat->PhotoVisibility,UsrDat->UsrCod);
|
||||
|
||||
/***** Photo is shown if I can see it, and it exists *****/
|
||||
return ICanSeePhoto ? Pho_BuildLinkToPhoto (UsrDat,PhotoURL,true) :
|
||||
return ICanSeePhoto ? Pho_BuildLinkToPhoto (UsrDat,PhotoURL) :
|
||||
false;
|
||||
}
|
||||
|
||||
|
@ -964,7 +964,7 @@ bool Pho_ShowUsrPhotoIsAllowed (const struct UsrData *UsrDat,char *PhotoURL)
|
|||
// Returns false if photo does not exist
|
||||
// Returns true if link is created successfully
|
||||
|
||||
bool Pho_BuildLinkToPhoto (const struct UsrData *UsrDat,char *PhotoURL,bool HTTPS)
|
||||
bool Pho_BuildLinkToPhoto (const struct UsrData *UsrDat,char *PhotoURL)
|
||||
{
|
||||
char PathPublPhoto[PATH_MAX+1];
|
||||
char PathPrivPhoto[PATH_MAX+1];
|
||||
|
@ -993,9 +993,7 @@ bool Pho_BuildLinkToPhoto (const struct UsrData *UsrDat,char *PhotoURL,bool HTTP
|
|||
|
||||
/***** Create the public URL of the photo *****/
|
||||
sprintf (PhotoURL,"%s/%s/%s.jpg",
|
||||
HTTPS ? Cfg_HTTPS_URL_SWAD_PUBLIC :
|
||||
Cfg_HTTP_URL_SWAD_PUBLIC,
|
||||
Cfg_FOLDER_PHOTO,UsrDat->Photo);
|
||||
Cfg_URL_SWAD_PUBLIC,Cfg_FOLDER_PHOTO,UsrDat->Photo);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -2397,7 +2395,7 @@ static void Pho_ShowDegreeAvgPhotoAndStat (struct Degree *Deg,
|
|||
if (Fil_CheckIfPathExists (PathRelAvgPhoto))
|
||||
{
|
||||
sprintf (PhotoURL,"%s/%s/%s/%ld_%s.jpg",
|
||||
Cfg_HTTPS_URL_SWAD_PUBLIC,Cfg_FOLDER_PHOTO,
|
||||
Cfg_URL_SWAD_PUBLIC,Cfg_FOLDER_PHOTO,
|
||||
Pho_StrAvgPhotoDirs[Gbl.Stat.DegPhotos.TypeOfAverage],
|
||||
Deg->DegCod,Usr_StringsSexDB[Sex]);
|
||||
if (SeeOrPrint == Pho_DEGREES_SEE)
|
||||
|
|
|
@ -104,7 +104,7 @@ unsigned Pho_UpdateMyClicksWithoutPhoto (void);
|
|||
void Pho_RemoveUsrFromTableClicksWithoutPhoto (long UsrCod);
|
||||
|
||||
bool Pho_ShowUsrPhotoIsAllowed (const struct UsrData *UsrDat,char *PhotoURL);
|
||||
bool Pho_BuildLinkToPhoto (const struct UsrData *UsrDat,char *PhotoURL,bool HTTPS);
|
||||
bool Pho_BuildLinkToPhoto (const struct UsrData *UsrDat,char *PhotoURL);
|
||||
bool Pho_CheckIfPrivPhotoExists (long UsrCod,char *PathPrivRelPhoto);
|
||||
bool Pho_RemovePhoto (struct UsrData *UsrDat);
|
||||
void Pho_UpdatePhotoName (struct UsrData *UsrDat);
|
||||
|
|
|
@ -125,7 +125,7 @@ char *Prf_GetURLPublicProfile (char *URL,const char *NicknameWithoutArroba)
|
|||
|
||||
/***** Build URL using nickname *****/
|
||||
sprintf (URL,"%s/%s?usr=@%s",
|
||||
Cfg_HTTPS_URL_SWAD_CGI,
|
||||
Cfg_URL_SWAD_CGI,
|
||||
Txt_STR_LANG_ID[Gbl.Prefs.Language],
|
||||
NicknameWithoutArroba);
|
||||
|
||||
|
|
|
@ -3334,7 +3334,7 @@ static void Rec_WriteLinkToDataProtectionClause (void)
|
|||
sprintf (Title,"<div class=\"CENTER_MIDDLE\">"
|
||||
"<a href=\"%s/%s/\" target=\"_blank\">%s</a>"
|
||||
"</div>",
|
||||
Cfg_HTTPS_URL_SWAD_PUBLIC,Cfg_DATA_PROTECTION_FOLDER,
|
||||
Cfg_URL_SWAD_PUBLIC,Cfg_DATA_PROTECTION_FOLDER,
|
||||
Txt_DATA_PROTECTION_CLAUSE);
|
||||
Lay_WriteTitle (Title);
|
||||
}
|
||||
|
|
|
@ -3202,7 +3202,7 @@ static void Sta_ShowNumHitsPerBanner (unsigned long NumRows,
|
|||
"</a>",
|
||||
Ban.WWW,
|
||||
Ban.FullName,
|
||||
Cfg_HTTPS_URL_SWAD_PUBLIC,Cfg_FOLDER_BANNER,
|
||||
Cfg_URL_SWAD_PUBLIC,Cfg_FOLDER_BANNER,
|
||||
Ban.Img,
|
||||
Ban.ShortName,
|
||||
Ban.FullName);
|
||||
|
|
|
@ -307,7 +307,7 @@ void Str_InsertLinks (char *Txt,unsigned long MaxLength,size_t MaxCharsURLOnScre
|
|||
sprintf (Anchor1Nick,"<form method=\"post\" action=\"%s/%s\" id=\"%s\">"
|
||||
"%s"
|
||||
"<input type=\"hidden\" name=\"usr\" value=\"",
|
||||
Cfg_HTTPS_URL_SWAD_CGI,
|
||||
Cfg_URL_SWAD_CGI,
|
||||
Txt_STR_LANG_ID[Gbl.Prefs.Language],
|
||||
Gbl.Usrs.Me.Logged ? Gbl.Form.UniqueId :
|
||||
Gbl.Form.Id,
|
||||
|
|
|
@ -259,7 +259,7 @@ void TsI_CreateXML (unsigned long NumRows,MYSQL_RES *mysql_res)
|
|||
|
||||
/***** Write the link to XML file *****/
|
||||
fprintf (Gbl.F.Out,"<a href=\"%s/%s/%s/test.xml\" class=\"%s\" target=\"_blank\">",
|
||||
Cfg_HTTPS_URL_SWAD_PUBLIC,Cfg_FOLDER_FILE_BROWSER_TMP,
|
||||
Cfg_URL_SWAD_PUBLIC,Cfg_FOLDER_FILE_BROWSER_TMP,
|
||||
Gbl.FileBrowser.TmpPubDir,
|
||||
The_ClassFormBold[Gbl.Prefs.Theme]);
|
||||
Lay_PutIconWithText ("file64x64.gif",
|
||||
|
|
|
@ -2550,7 +2550,7 @@ static void Usr_SetUsrRoleAndPrefs (void)
|
|||
Usr_ConstructPathUsr (Gbl.Usrs.Me.UsrDat.UsrCod,Gbl.Usrs.Me.PathDir);
|
||||
|
||||
/***** Check if my photo exists and create a link to it ****/
|
||||
Gbl.Usrs.Me.MyPhotoExists = Pho_BuildLinkToPhoto (&Gbl.Usrs.Me.UsrDat,Gbl.Usrs.Me.PhotoURL,true);
|
||||
Gbl.Usrs.Me.MyPhotoExists = Pho_BuildLinkToPhoto (&Gbl.Usrs.Me.UsrDat,Gbl.Usrs.Me.PhotoURL);
|
||||
|
||||
/***** Check if I am administrator of current institution/centre/degree *****/
|
||||
if (Gbl.CurrentIns.Ins.InsCod > 0)
|
||||
|
|
|
@ -880,7 +880,7 @@ int swad__loginByUserPasswordKey (struct soap *soap,
|
|||
strncpy (loginByUserPasswordKeyOut->userFirstname,Gbl.Usrs.Me.UsrDat.FirstName,255);
|
||||
loginByUserPasswordKeyOut->userFirstname[255] = '\0';
|
||||
|
||||
Pho_BuildLinkToPhoto (&Gbl.Usrs.Me.UsrDat,PhotoURL,true);
|
||||
Pho_BuildLinkToPhoto (&Gbl.Usrs.Me.UsrDat,PhotoURL);
|
||||
strncpy (loginByUserPasswordKeyOut->userPhoto,PhotoURL,PATH_MAX);
|
||||
loginByUserPasswordKeyOut->userPhoto[PATH_MAX] = '\0';
|
||||
|
||||
|
@ -1015,7 +1015,7 @@ int swad__loginBySessionKey (struct soap *soap,
|
|||
strncpy (loginBySessionKeyOut->userFirstname,Gbl.Usrs.Me.UsrDat.FirstName,255);
|
||||
loginBySessionKeyOut->userFirstname[255] = '\0';
|
||||
|
||||
Pho_BuildLinkToPhoto (&Gbl.Usrs.Me.UsrDat,PhotoURL,true);
|
||||
Pho_BuildLinkToPhoto (&Gbl.Usrs.Me.UsrDat,PhotoURL);
|
||||
strncpy (loginBySessionKeyOut->userPhoto,PhotoURL,PATH_MAX);
|
||||
loginBySessionKeyOut->userPhoto[PATH_MAX] = '\0';
|
||||
|
||||
|
@ -2008,7 +2008,7 @@ static void Svc_CopyUsrData (struct swad__user *Usr,struct UsrData *UsrDat,bool
|
|||
Usr->userFirstname[255] = '\0';
|
||||
|
||||
/* User's photo URL */
|
||||
Pho_BuildLinkToPhoto (UsrDat,PhotoURL,true);
|
||||
Pho_BuildLinkToPhoto (UsrDat,PhotoURL);
|
||||
Usr->userPhoto = (char *) soap_malloc (Gbl.soap,PATH_MAX+1);
|
||||
strncpy (Usr->userPhoto,PhotoURL,PATH_MAX);
|
||||
Usr->userPhoto[PATH_MAX] = '\0';
|
||||
|
@ -2110,7 +2110,7 @@ int swad__getAttendanceEvents (struct soap *soap,
|
|||
strcpy (getAttendanceEventsOut->eventsArray.__ptr[NumAttEvent].userFirstname,
|
||||
Gbl.Usrs.Other.UsrDat.FirstName);
|
||||
|
||||
Pho_BuildLinkToPhoto (&Gbl.Usrs.Other.UsrDat,PhotoURL,true);
|
||||
Pho_BuildLinkToPhoto (&Gbl.Usrs.Other.UsrDat,PhotoURL);
|
||||
Length = strlen (PhotoURL);
|
||||
getAttendanceEventsOut->eventsArray.__ptr[NumAttEvent].userPhoto = (char *) soap_malloc (Gbl.soap,Length + 1);
|
||||
strcpy (getAttendanceEventsOut->eventsArray.__ptr[NumAttEvent].userPhoto,
|
||||
|
@ -2480,7 +2480,7 @@ int swad__getAttendanceUsers (struct soap *soap,
|
|||
getAttendanceUsersOut->usersArray.__ptr[NumRow].userFirstname = (char *) soap_malloc (Gbl.soap,Length + 1);
|
||||
strcpy (getAttendanceUsersOut->usersArray.__ptr[NumRow].userFirstname,Gbl.Usrs.Other.UsrDat.FirstName);
|
||||
|
||||
Pho_BuildLinkToPhoto (&Gbl.Usrs.Other.UsrDat,PhotoURL,true);
|
||||
Pho_BuildLinkToPhoto (&Gbl.Usrs.Other.UsrDat,PhotoURL);
|
||||
Length = strlen (PhotoURL);
|
||||
getAttendanceUsersOut->usersArray.__ptr[NumRow].userPhoto = (char *) soap_malloc (Gbl.soap,Length + 1);
|
||||
strcpy (getAttendanceUsersOut->usersArray.__ptr[NumRow].userPhoto,PhotoURL);
|
||||
|
@ -2751,7 +2751,7 @@ int swad__getNotifications (struct soap *soap,
|
|||
strncpy (getNotificationsOut->notificationsArray.__ptr[NumRow].userFirstname,Gbl.Usrs.Other.UsrDat.FirstName,255);
|
||||
getNotificationsOut->notificationsArray.__ptr[NumRow].userFirstname[255] = '\0';
|
||||
|
||||
Pho_BuildLinkToPhoto (&Gbl.Usrs.Other.UsrDat,PhotoURL,true);
|
||||
Pho_BuildLinkToPhoto (&Gbl.Usrs.Other.UsrDat,PhotoURL);
|
||||
getNotificationsOut->notificationsArray.__ptr[NumRow].userPhoto = (char *) soap_malloc (Gbl.soap,PATH_MAX+1);
|
||||
strncpy (getNotificationsOut->notificationsArray.__ptr[NumRow].userPhoto,PhotoURL,PATH_MAX);
|
||||
getNotificationsOut->notificationsArray.__ptr[NumRow].userPhoto[PATH_MAX] = '\0';
|
||||
|
@ -4273,7 +4273,7 @@ static bool Svc_WriteRowFileBrowser (unsigned Level,Brw_FileType_t FileType,cons
|
|||
|
||||
Gbl.Usrs.Other.UsrDat.UsrCod = FileMetadata.PublisherUsrCod;
|
||||
Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&Gbl.Usrs.Other.UsrDat);
|
||||
Pho_BuildLinkToPhoto (&Gbl.Usrs.Me.UsrDat,PhotoURL,true);
|
||||
Pho_BuildLinkToPhoto (&Gbl.Usrs.Me.UsrDat,PhotoURL);
|
||||
|
||||
fprintf (Gbl.F.XML,"<file name=\"%s\">"
|
||||
"<code>%ld</code>"
|
||||
|
@ -4455,7 +4455,7 @@ int swad__getFile (struct soap *soap,
|
|||
strncpy (getFileOut->publisherName,Gbl.Usrs.Other.UsrDat.FullName,255+1+255+1+255);
|
||||
getFileOut->publisherName[255+1+255+1+255] = '\0';
|
||||
|
||||
Pho_BuildLinkToPhoto (&Gbl.Usrs.Other.UsrDat,PhotoURL,true);
|
||||
Pho_BuildLinkToPhoto (&Gbl.Usrs.Other.UsrDat,PhotoURL);
|
||||
strncpy (getFileOut->publisherPhoto,PhotoURL,PATH_MAX);
|
||||
getFileOut->publisherPhoto[PATH_MAX] = '\0';
|
||||
}
|
||||
|
|
|
@ -200,7 +200,7 @@ void ZIP_CreateZIPAsgWrk (void)
|
|||
|
||||
/***** Create URL pointing to ZIP file *****/
|
||||
sprintf (URLWithSpaces,"%s/%s/%s/%s",
|
||||
Cfg_HTTPS_URL_SWAD_PUBLIC,
|
||||
Cfg_URL_SWAD_PUBLIC,
|
||||
Cfg_FOLDER_FILE_BROWSER_TMP,
|
||||
Gbl.FileBrowser.TmpPubDir,
|
||||
FileNameZIP);
|
||||
|
@ -443,7 +443,7 @@ static void ZIP_CompressFolderIntoZIP (void)
|
|||
|
||||
/***** Create URL pointing to ZIP file *****/
|
||||
sprintf (URLWithSpaces,"%s/%s/%s/%s",
|
||||
Cfg_HTTPS_URL_SWAD_PUBLIC,
|
||||
Cfg_URL_SWAD_PUBLIC,
|
||||
Cfg_FOLDER_FILE_BROWSER_TMP,
|
||||
Gbl.FileBrowser.TmpPubDir,
|
||||
FileNameZIP);
|
||||
|
|
Loading…
Reference in New Issue