mirror of https://github.com/acanas/swad-core.git
Version 23.78: Apr 23, 2024 Code refactoring in list of actions.
This commit is contained in:
parent
a4d4e9c470
commit
85f0f2a1e9
45
swad_API.c
45
swad_API.c
|
@ -143,6 +143,7 @@ cp -f /home/acanas/swad/swad/swad /var/www/cgi-bin/
|
|||
#include "swad_test_visibility.h"
|
||||
#include "swad_user.h"
|
||||
#include "swad_user_database.h"
|
||||
#include "swad_www.h"
|
||||
#include "swad_xml.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -723,7 +724,7 @@ int swad__loginByUserPasswordKey (struct soap *soap,
|
|||
{
|
||||
char UsrIDNickOrEmail[Cns_MAX_BYTES_USR_LOGIN + 1];
|
||||
int ReturnCode;
|
||||
char PhotoURL[Cns_MAX_BYTES_WWW + 1];
|
||||
char PhotoURL[WWW_MAX_BYTES_WWW + 1];
|
||||
bool UsrFound;
|
||||
|
||||
/***** Initializations *****/
|
||||
|
@ -737,7 +738,7 @@ int swad__loginByUserPasswordKey (struct soap *soap,
|
|||
loginByUserPasswordKeyOut->userFirstname = soap_malloc (soap,Usr_MAX_BYTES_FIRSTNAME_OR_SURNAME + 1);
|
||||
loginByUserPasswordKeyOut->userSurname1 = soap_malloc (soap,Usr_MAX_BYTES_FIRSTNAME_OR_SURNAME + 1);
|
||||
loginByUserPasswordKeyOut->userSurname2 = soap_malloc (soap,Usr_MAX_BYTES_FIRSTNAME_OR_SURNAME + 1);
|
||||
loginByUserPasswordKeyOut->userPhoto = soap_malloc (soap,Cns_MAX_BYTES_WWW + 1);
|
||||
loginByUserPasswordKeyOut->userPhoto = soap_malloc (soap,WWW_MAX_BYTES_WWW + 1);
|
||||
loginByUserPasswordKeyOut->userBirthday = soap_malloc (soap,Dat_LENGTH_YYYYMMDD + 1);
|
||||
|
||||
/***** Default values returned on error *****/
|
||||
|
@ -816,7 +817,7 @@ int swad__loginByUserPasswordKey (struct soap *soap,
|
|||
Gbl.Usrs.Me.UsrDat.FrstName,Usr_MAX_BYTES_FIRSTNAME_OR_SURNAME);
|
||||
|
||||
Pho_BuildLinkToPhoto (&Gbl.Usrs.Me.UsrDat,PhotoURL);
|
||||
Str_Copy (loginByUserPasswordKeyOut->userPhoto,PhotoURL,Cns_MAX_BYTES_WWW);
|
||||
Str_Copy (loginByUserPasswordKeyOut->userPhoto,PhotoURL,WWW_MAX_BYTES_WWW);
|
||||
|
||||
Str_Copy (loginByUserPasswordKeyOut->userBirthday,
|
||||
Gbl.Usrs.Me.UsrDat.Birthday.YYYYMMDD,Dat_LENGTH_YYYYMMDD);
|
||||
|
@ -857,7 +858,7 @@ int swad__loginBySessionKey (struct soap *soap,
|
|||
int ReturnCode;
|
||||
MYSQL_RES *mysql_res;
|
||||
MYSQL_ROW row;
|
||||
char PhotoURL[Cns_MAX_BYTES_WWW + 1];
|
||||
char PhotoURL[WWW_MAX_BYTES_WWW + 1];
|
||||
bool UsrFound;
|
||||
|
||||
/***** Initializations *****/
|
||||
|
@ -871,7 +872,7 @@ int swad__loginBySessionKey (struct soap *soap,
|
|||
loginBySessionKeyOut->userFirstname = soap_malloc (soap,Usr_MAX_BYTES_FIRSTNAME_OR_SURNAME + 1);
|
||||
loginBySessionKeyOut->userSurname1 = soap_malloc (soap,Usr_MAX_BYTES_FIRSTNAME_OR_SURNAME + 1);
|
||||
loginBySessionKeyOut->userSurname2 = soap_malloc (soap,Usr_MAX_BYTES_FIRSTNAME_OR_SURNAME + 1);
|
||||
loginBySessionKeyOut->userPhoto = soap_malloc (soap,Cns_MAX_BYTES_WWW + 1);
|
||||
loginBySessionKeyOut->userPhoto = soap_malloc (soap,WWW_MAX_BYTES_WWW + 1);
|
||||
loginBySessionKeyOut->userBirthday = soap_malloc (soap,Dat_LENGTH_YYYYMMDD + 1);
|
||||
loginBySessionKeyOut->degreeName = soap_malloc (soap,Nam_MAX_BYTES_FULL_NAME + 1);
|
||||
loginBySessionKeyOut->courseName = soap_malloc (soap,Nam_MAX_BYTES_FULL_NAME + 1);
|
||||
|
@ -963,7 +964,7 @@ int swad__loginBySessionKey (struct soap *soap,
|
|||
Gbl.Usrs.Me.UsrDat.FrstName,Usr_MAX_BYTES_FIRSTNAME_OR_SURNAME);
|
||||
|
||||
Pho_BuildLinkToPhoto (&Gbl.Usrs.Me.UsrDat,PhotoURL);
|
||||
Str_Copy (loginBySessionKeyOut->userPhoto,PhotoURL,Cns_MAX_BYTES_WWW);
|
||||
Str_Copy (loginBySessionKeyOut->userPhoto,PhotoURL,WWW_MAX_BYTES_WWW);
|
||||
|
||||
Str_Copy (loginBySessionKeyOut->userBirthday,
|
||||
Gbl.Usrs.Me.UsrDat.Birthday.YYYYMMDD,Dat_LENGTH_YYYYMMDD);
|
||||
|
@ -1299,7 +1300,7 @@ int swad__getCourseInfo (struct soap *soap,
|
|||
Result = API_WritePageIntoHTMLBuffer (soap,&(getCourseInfo->infoTxt));
|
||||
break;
|
||||
case Inf_URL: // Link to a web page
|
||||
getCourseInfo->infoTxt = soap_malloc (soap,Cns_MAX_BYTES_WWW + 1);
|
||||
getCourseInfo->infoTxt = soap_malloc (soap,WWW_MAX_BYTES_WWW + 1);
|
||||
Inf_WriteURLIntoTxtBuffer (getCourseInfo->infoTxt);
|
||||
break;
|
||||
}
|
||||
|
@ -2193,7 +2194,7 @@ static void API_CopyUsrData (struct soap *soap,
|
|||
struct swad__user *Usr,struct Usr_Data *UsrDat,
|
||||
Usr_Can_t ICanSeeUsrID)
|
||||
{
|
||||
char PhotoURL[Cns_MAX_BYTES_WWW + 1];
|
||||
char PhotoURL[WWW_MAX_BYTES_WWW + 1];
|
||||
const char *FirstID;
|
||||
size_t Length;
|
||||
|
||||
|
@ -2250,7 +2251,7 @@ int swad__getAttendanceEvents (struct soap *soap,
|
|||
unsigned NumAttEvents;
|
||||
unsigned NumAttEvent;
|
||||
struct Att_Event Event;
|
||||
char PhotoURL[Cns_MAX_BYTES_WWW + 1];
|
||||
char PhotoURL[WWW_MAX_BYTES_WWW + 1];
|
||||
size_t Length;
|
||||
|
||||
/***** Initializations *****/
|
||||
|
@ -2647,7 +2648,7 @@ int swad__getAttendanceUsers (struct soap *soap,
|
|||
MYSQL_ROW row;
|
||||
unsigned NumUsrs;
|
||||
unsigned NumUsr;
|
||||
char PhotoURL[Cns_MAX_BYTES_WWW + 1];
|
||||
char PhotoURL[WWW_MAX_BYTES_WWW + 1];
|
||||
size_t Length;
|
||||
|
||||
/***** Initializations *****/
|
||||
|
@ -2861,7 +2862,7 @@ int swad__getNotifications (struct soap *soap,
|
|||
long NtfCod;
|
||||
Ntf_NotifyEvent_t NotifyEvent;
|
||||
long EventTime;
|
||||
char PhotoURL[Cns_MAX_BYTES_WWW + 1];
|
||||
char PhotoURL[WWW_MAX_BYTES_WWW + 1];
|
||||
struct Hie_Node Hie[Hie_NUM_LEVELS];
|
||||
long Cod;
|
||||
struct For_Forum ForumSelected;
|
||||
|
@ -2971,9 +2972,9 @@ int swad__getNotifications (struct soap *soap,
|
|||
|
||||
Pho_BuildLinkToPhoto (&Gbl.Usrs.Other.UsrDat,PhotoURL);
|
||||
getNotificationsOut->notificationsArray.__ptr[NumNotif].userPhoto =
|
||||
soap_malloc (soap,Cns_MAX_BYTES_WWW + 1);
|
||||
soap_malloc (soap,WWW_MAX_BYTES_WWW + 1);
|
||||
Str_Copy (getNotificationsOut->notificationsArray.__ptr[NumNotif].userPhoto,
|
||||
PhotoURL,Cns_MAX_BYTES_WWW);
|
||||
PhotoURL,WWW_MAX_BYTES_WWW);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -4017,7 +4018,7 @@ int swad__getGames (struct soap *soap,
|
|||
unsigned NumGames;
|
||||
int NumGame;
|
||||
long GamCod;
|
||||
char PhotoURL[Cns_MAX_BYTES_WWW + 1];
|
||||
char PhotoURL[WWW_MAX_BYTES_WWW + 1];
|
||||
long StartTime;
|
||||
long EndTime;
|
||||
size_t Length;
|
||||
|
@ -4171,7 +4172,7 @@ int swad__getMatches (struct soap *soap,
|
|||
unsigned NumMatches;
|
||||
int NumMatch;
|
||||
long MchCod;
|
||||
char PhotoURL[Cns_MAX_BYTES_WWW + 1];
|
||||
char PhotoURL[WWW_MAX_BYTES_WWW + 1];
|
||||
long StartTime;
|
||||
long EndTime;
|
||||
size_t Length;
|
||||
|
@ -4806,7 +4807,7 @@ static bool API_WriteRowFileBrowser (FILE *XML,unsigned Level,
|
|||
extern const char *Txt_NEW_LINE;
|
||||
extern const char *Txt_LICENSES[Brw_NUM_LICENSES];
|
||||
struct Brw_FileMetadata FileMetadata;
|
||||
char PhotoURL[Cns_MAX_BYTES_WWW + 1];
|
||||
char PhotoURL[WWW_MAX_BYTES_WWW + 1];
|
||||
|
||||
/***** Is this row hidden or visible? *****/
|
||||
if (Gbl.FileBrowser.Type == Brw_SHOW_DOC_CRS ||
|
||||
|
@ -4884,8 +4885,8 @@ int swad__getFile (struct soap *soap,
|
|||
extern const char *Txt_LICENSES[Brw_NUM_LICENSES];
|
||||
int ReturnCode;
|
||||
struct Brw_FileMetadata FileMetadata;
|
||||
char URL[Cns_MAX_BYTES_WWW + 1];
|
||||
char PhotoURL[Cns_MAX_BYTES_WWW + 1];
|
||||
char URL[WWW_MAX_BYTES_WWW + 1];
|
||||
char PhotoURL[WWW_MAX_BYTES_WWW + 1];
|
||||
|
||||
/***** Initializations *****/
|
||||
API_Set_gSOAP_RuntimeEnv (soap);
|
||||
|
@ -4893,10 +4894,10 @@ int swad__getFile (struct soap *soap,
|
|||
|
||||
/***** Allocate space for strings *****/
|
||||
getFileOut->fileName = soap_malloc (soap,NAME_MAX + 1);
|
||||
getFileOut->URL = soap_malloc (soap,Cns_MAX_BYTES_WWW + 1);
|
||||
getFileOut->URL = soap_malloc (soap,WWW_MAX_BYTES_WWW + 1);
|
||||
getFileOut->license = soap_malloc (soap,Brw_MAX_BYTES_LICENSE + 1);
|
||||
getFileOut->publisherName = soap_malloc (soap,Usr_MAX_BYTES_FULL_NAME + 1);
|
||||
getFileOut->publisherPhoto = soap_malloc (soap,Cns_MAX_BYTES_WWW + 1);
|
||||
getFileOut->publisherPhoto = soap_malloc (soap,WWW_MAX_BYTES_WWW + 1);
|
||||
|
||||
/***** Default values returned on error *****/
|
||||
getFileOut->fileName[0] = '\0';
|
||||
|
@ -5011,7 +5012,7 @@ int swad__getFile (struct soap *soap,
|
|||
/***** Copy data into output structure *****/
|
||||
Str_Copy (getFileOut->fileName,FileMetadata.FilFolLnk.Name,NAME_MAX);
|
||||
|
||||
Str_Copy (getFileOut->URL,URL,Cns_MAX_BYTES_WWW);
|
||||
Str_Copy (getFileOut->URL,URL,WWW_MAX_BYTES_WWW);
|
||||
|
||||
getFileOut->size = (int) FileMetadata.Size;
|
||||
|
||||
|
@ -5031,7 +5032,7 @@ int swad__getFile (struct soap *soap,
|
|||
Usr_MAX_BYTES_FULL_NAME);
|
||||
|
||||
Pho_BuildLinkToPhoto (&Gbl.Usrs.Other.UsrDat,PhotoURL);
|
||||
Str_Copy (getFileOut->publisherPhoto,PhotoURL,Cns_MAX_BYTES_WWW);
|
||||
Str_Copy (getFileOut->publisherPhoto,PhotoURL,WWW_MAX_BYTES_WWW);
|
||||
}
|
||||
|
||||
return SOAP_OK;
|
||||
|
|
|
@ -1230,7 +1230,7 @@ void HTM_INPUT_URL (const char *Name,const char *Value,
|
|||
char *Attr;
|
||||
|
||||
HTM_TxtF ("<input type=\"url\" name=\"%s\" maxlength=\"%u\" value=\"%s\"",
|
||||
Name,Cns_MAX_CHARS_WWW,Value);
|
||||
Name,WWW_MAX_CHARS_WWW,Value);
|
||||
|
||||
if (fmt)
|
||||
{
|
||||
|
|
|
@ -312,7 +312,7 @@ void ID_WriteUsrIDs (struct Usr_Data *UsrDat,const char *Anchor)
|
|||
Usr_Can_t ICanConfirmUsrID = (ICanSeeUsrID == Usr_CAN &&
|
||||
Usr_ItsMe (UsrDat->UsrCod) == Usr_OTHER && // Not me
|
||||
!Frm_CheckIfInside () && // Not inside another form
|
||||
Act_GetBrowserTab (Gbl.Action.Act) == Act_1ST_TAB) ? Usr_CAN : // Only in main browser tab
|
||||
Act_GetBrowserTab (Gbl.Action.Act) == Act_1ST) ? Usr_CAN : // Only in main browser tab
|
||||
Usr_CAN_NOT;
|
||||
|
||||
for (NumID = 0;
|
||||
|
|
|
@ -80,10 +80,10 @@ void QR_PutParQRString (void *QRString)
|
|||
|
||||
void QR_PrintQRCode (void)
|
||||
{
|
||||
char QRString[Cns_MAX_BYTES_WWW + 1];
|
||||
char QRString[WWW_MAX_BYTES_WWW + 1];
|
||||
|
||||
/***** Get QR string *****/
|
||||
Par_GetParText ("QRString",QRString,Cns_MAX_BYTES_WWW);
|
||||
Par_GetParText ("QRString",QRString,WWW_MAX_BYTES_WWW);
|
||||
|
||||
/***** Show QR code *****/
|
||||
QR_ImageQRCode (QRString);
|
||||
|
|
|
@ -55,7 +55,7 @@ void RSS_UpdateRSSFileForACrs (struct Hie_Node *Crs)
|
|||
char PathRelPublRSSDir[PATH_MAX + 1];
|
||||
char PathRelPublRSSFile[PATH_MAX + 1 + NAME_MAX + 1];
|
||||
FILE *FileRSS;
|
||||
char RSSLink[Cns_MAX_BYTES_WWW + 1];
|
||||
char RSSLink[WWW_MAX_BYTES_WWW + 1];
|
||||
struct tm *tm;
|
||||
time_t t = Dat_GetStartExecutionTimeUTC ();
|
||||
|
||||
|
@ -300,8 +300,8 @@ static void RSS_WriteCallsForExams (FILE *FileRSS,struct Hie_Node *Crs)
|
|||
/********* Write URL to RSS archive with active notices in a course **********/
|
||||
/*****************************************************************************/
|
||||
|
||||
void RSS_BuildRSSLink (char RSSLink[Cns_MAX_BYTES_WWW + 1],long CrsCod)
|
||||
void RSS_BuildRSSLink (char RSSLink[WWW_MAX_BYTES_WWW + 1],long CrsCod)
|
||||
{
|
||||
snprintf (RSSLink,Cns_MAX_BYTES_WWW + 1,"%s/%ld/%s/%s",
|
||||
snprintf (RSSLink,WWW_MAX_BYTES_WWW + 1,"%s/%ld/%s/%s",
|
||||
Cfg_URL_CRS_PUBLIC,CrsCod,Cfg_RSS_FOLDER,Cfg_RSS_FILE);
|
||||
}
|
||||
|
|
|
@ -28,6 +28,6 @@
|
|||
/*****************************************************************************/
|
||||
|
||||
void RSS_UpdateRSSFileForACrs (struct Hie_Node *Crs);
|
||||
void RSS_BuildRSSLink (char RSSLink[Cns_MAX_BYTES_WWW + 1],long CrsCod);
|
||||
void RSS_BuildRSSLink (char RSSLink[WWW_MAX_BYTES_WWW + 1],long CrsCod);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -101,37 +101,15 @@ Act_Action_t Act_GetSuperAction (Act_Action_t Action)
|
|||
|
||||
Usr_Can_t Act_CheckIfICanExecuteAction (Act_Action_t Action)
|
||||
{
|
||||
unsigned Permission;
|
||||
|
||||
if ((unsigned) Action >= ActLst_NUM_ACTIONS)
|
||||
return Usr_CAN_NOT;
|
||||
|
||||
switch (Gbl.Hierarchy.Level)
|
||||
{
|
||||
case Hie_SYS: // System
|
||||
Permission = ActLst_Actions[Action].PermissionSys;
|
||||
break;
|
||||
case Hie_CTY: // Country selected
|
||||
Permission = ActLst_Actions[Action].PermissionCty;
|
||||
break;
|
||||
case Hie_INS: // Institution selected
|
||||
Permission = ActLst_Actions[Action].PermissionIns;
|
||||
break;
|
||||
case Hie_CTR: // Center selected
|
||||
Permission = ActLst_Actions[Action].PermissionCtr;
|
||||
break;
|
||||
case Hie_DEG: // Degree selected
|
||||
Permission = ActLst_Actions[Action].PermissionDeg;
|
||||
break;
|
||||
case Hie_CRS: // Course selected
|
||||
Permission = ActLst_Actions[Action].PermissionCrs[Gbl.Usrs.Me.IBelongToCurrent[Hie_CRS]];
|
||||
break;
|
||||
default:
|
||||
return Usr_CAN_NOT;
|
||||
}
|
||||
if (Gbl.Hierarchy.Level == Hie_UNK)
|
||||
return Usr_CAN_NOT;
|
||||
|
||||
return ((Permission & (1 << Gbl.Usrs.Me.Role.Logged)) != 0) ? Usr_CAN :
|
||||
Usr_CAN_NOT;
|
||||
return ((ActLst_Actions[Action].Permission[Gbl.Hierarchy.Level][Gbl.Usrs.Me.IBelongToCurrent[Gbl.Hierarchy.Level]]
|
||||
& (1 << Gbl.Usrs.Me.Role.Logged)) != 0) ? Usr_CAN :
|
||||
Usr_CAN_NOT;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -141,7 +119,7 @@ Usr_Can_t Act_CheckIfICanExecuteAction (Act_Action_t Action)
|
|||
Act_Content_t Act_GetContentType (Act_Action_t Action)
|
||||
{
|
||||
if ((unsigned) Action >= ActLst_NUM_ACTIONS)
|
||||
return Act_CONT_NORM;
|
||||
return Act_NORM;
|
||||
|
||||
return ActLst_Actions[Action].ContentType;
|
||||
}
|
||||
|
@ -153,7 +131,7 @@ Act_Content_t Act_GetContentType (Act_Action_t Action)
|
|||
Act_BrowserTab_t Act_GetBrowserTab (Act_Action_t Action)
|
||||
{
|
||||
if ((unsigned) Action >= ActLst_NUM_ACTIONS)
|
||||
return Act_UNK_TAB;
|
||||
return Act_UNK;
|
||||
|
||||
return ActLst_Actions[Action].BrowserTab;
|
||||
}
|
||||
|
@ -422,7 +400,7 @@ void Act_AdjustCurrentAction (void)
|
|||
the only action possible
|
||||
is to show a form to send my photo *****/
|
||||
if (!Gbl.Usrs.Me.MyPhotoExists)
|
||||
if (!(ActLst_Actions[Gbl.Action.Act].PermissionCrs[Usr_BELONG] & (1 << Rol_UNK)))
|
||||
if (!(ActLst_Actions[Gbl.Action.Act].Permission[Hie_CRS][Usr_BELONG] & (1 << Rol_UNK)))
|
||||
if ((Gbl.Usrs.Me.NumAccWithoutPhoto =
|
||||
Pho_UpdateMyClicksWithoutPhoto ()) > Pho_MAX_CLICKS_WITHOUT_PHOTO)
|
||||
{
|
||||
|
|
|
@ -30,10 +30,7 @@
|
|||
#include <stdbool.h> // For boolean type
|
||||
|
||||
#include "swad_action_list.h"
|
||||
#include "swad_constant.h"
|
||||
#include "swad_cryptography.h"
|
||||
#include "swad_language.h"
|
||||
#include "swad_string.h"
|
||||
#include "swad_hierarchy_type.h"
|
||||
#include "swad_tab.h"
|
||||
#include "swad_user_type.h"
|
||||
|
||||
|
@ -53,22 +50,22 @@
|
|||
#define Act_NUM_CONTENTS 2
|
||||
typedef enum
|
||||
{
|
||||
Act_CONT_NORM,
|
||||
Act_CONT_DATA,
|
||||
Act_NORM,
|
||||
Act_DATA,
|
||||
} Act_Content_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
Act_UNK_TAB, // Unknown tab
|
||||
Act_1ST_TAB, // The main (original, first) tab in the browser
|
||||
Act_NEW_TAB, // A new (second) blank tab in the browser
|
||||
Act_2ND_TAB, // The second tab in the browser
|
||||
Act_AJAX_NR, // Update a zone of the page using AJAX
|
||||
Act_AJAX_RF, // Update a zone of the page using AJAX, with auto-refresh
|
||||
Act_UPL_FIL, // Upload a file. Do not write HTML content. Write Status code instead for Dropzone.js
|
||||
Act_DWN_FIL, // Download a file in a new tab. Do not write HTML content.
|
||||
Act_204_NOC, // Do not write HTML content. HTTP will return Status 204 No Content
|
||||
Act_WEB_SVC, // Web service. Send output to client using SOAP.
|
||||
Act_UNK, // Unknown tab
|
||||
Act_1ST, // The main (original, first) tab in the browser
|
||||
Act_NEW, // A new (second) blank tab in the browser
|
||||
Act_2ND, // The second tab in the browser
|
||||
Act_AJA, // Update a zone of the page using AJAX
|
||||
Act_REF, // Update a zone of the page using AJAX, with auto-refresh
|
||||
Act_UPL, // Upload a file. Do not write HTML content. Write Status code instead for Dropzone.js
|
||||
Act_DWN, // Download a file in a new tab. Do not write HTML content.
|
||||
Act_204, // Do not write HTML content. HTTP will return Status 204 No Content
|
||||
Act_SVC, // Web service. Send output to client using SOAP.
|
||||
} Act_BrowserTab_t;
|
||||
|
||||
struct Act_Actions
|
||||
|
@ -77,16 +74,11 @@ struct Act_Actions
|
|||
signed int IndexInMenu;
|
||||
Tab_Tab_t Tab;
|
||||
Act_Action_t SuperAction;
|
||||
unsigned PermissionCrs[Usr_NUM_BELONG];
|
||||
unsigned PermissionDeg;
|
||||
unsigned PermissionCtr;
|
||||
unsigned PermissionIns;
|
||||
unsigned PermissionCty;
|
||||
unsigned PermissionSys;
|
||||
void (*FunctionPriori) (void);
|
||||
void (*FunctionPosteriori) (void);
|
||||
unsigned Permission[Hie_NUM_LEVELS][Usr_NUM_BELONG];
|
||||
Act_Content_t ContentType;
|
||||
Act_BrowserTab_t BrowserTab;
|
||||
void (*FunctionPriori) ();
|
||||
void (*FunctionPosteriori) ();
|
||||
};
|
||||
|
||||
struct Act_ActionFunc
|
||||
|
|
2996
swad_action_list.c
2996
swad_action_list.c
File diff suppressed because it is too large
Load Diff
|
@ -54,6 +54,7 @@
|
|||
#include "swad_QR.h"
|
||||
#include "swad_setting.h"
|
||||
#include "swad_string.h"
|
||||
#include "swad_www.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
/************** External global variables from others modules ****************/
|
||||
|
@ -725,7 +726,7 @@ static void Agd_PutIconToViewEditMyFullAgenda (void *EncryptedUsrCod)
|
|||
|
||||
static void Agd_PutIconToShowQR (void)
|
||||
{
|
||||
char URL[Cns_MAX_BYTES_WWW + 1];
|
||||
char URL[WWW_MAX_BYTES_WWW + 1];
|
||||
extern const char *Lan_STR_LANG_ID[1 + Lan_NUM_LANGUAGES];
|
||||
|
||||
snprintf (URL,sizeof (URL),"%s/%s?agd=@%s",
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
#include "swad_photo.h"
|
||||
#include "swad_string.h"
|
||||
#include "swad_user.h"
|
||||
#include "swad_www.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
/******************************* Private types *******************************/
|
||||
|
@ -479,7 +480,7 @@ static ALn_LinkType_t ALn_CheckNickname (char **PtrSrc,char PrevCh,
|
|||
char ParsStr[Frm_MAX_BYTES_PARAMS_STR + 1];
|
||||
struct Usr_Data UsrDat;
|
||||
bool ShowPhoto = false;
|
||||
char PhotoURL[Cns_MAX_BYTES_WWW + 1];
|
||||
char PhotoURL[WWW_MAX_BYTES_WWW + 1];
|
||||
char *CaptionStr;
|
||||
char *ImgStr;
|
||||
char NickWithoutArr[Nck_MAX_BYTES_NICK_WITHOUT_ARROBA + 1];
|
||||
|
|
|
@ -707,7 +707,7 @@ void Ban_ChangeBannerWWW (void)
|
|||
{
|
||||
extern const char *Txt_The_new_web_address_is_X;
|
||||
struct Ban_Banner *Ban = Ban_GetEditingBanner ();
|
||||
char NewWWW[Cns_MAX_BYTES_WWW + 1];
|
||||
char NewWWW[WWW_MAX_BYTES_WWW + 1];
|
||||
|
||||
/***** Reset banner *****/
|
||||
Ban_ResetBanner (Ban);
|
||||
|
@ -717,7 +717,7 @@ void Ban_ChangeBannerWWW (void)
|
|||
Ban->BanCod = ParCod_GetAndCheckPar (ParCod_Ban);
|
||||
|
||||
/* Get the new WWW for the banner */
|
||||
Par_GetParText ("WWW",NewWWW,Cns_MAX_BYTES_WWW);
|
||||
Par_GetParText ("WWW",NewWWW,WWW_MAX_BYTES_WWW);
|
||||
|
||||
/***** Get banner data from the database *****/
|
||||
Ban_GetBannerDataByCod (Ban);
|
||||
|
@ -867,7 +867,7 @@ void Ban_ReceiveNewBanner (void)
|
|||
Names[Nam_FULL_NAME] = Ban->FullName;
|
||||
Nam_GetParsShrtAndFullName (Names);
|
||||
Par_GetParText ("Img",Ban->Img,Ban_MAX_BYTES_IMAGE);
|
||||
Par_GetParText ("WWW",Ban->WWW,Cns_MAX_BYTES_WWW);
|
||||
Par_GetParText ("WWW",Ban->WWW,WWW_MAX_BYTES_WWW);
|
||||
|
||||
if (Ban->ShrtName[0] &&
|
||||
Ban->FullName[0]) // If there's a banner name
|
||||
|
|
|
@ -27,10 +27,10 @@
|
|||
/********************************* Headers ***********************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#include "swad_constant.h"
|
||||
#include "swad_hidden_visible.h"
|
||||
#include "swad_name.h"
|
||||
#include "swad_string.h"
|
||||
#include "swad_www.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
/************************** Public types and constants ***********************/
|
||||
|
@ -46,7 +46,7 @@ struct Ban_Banner
|
|||
char ShrtName[Nam_MAX_BYTES_SHRT_NAME + 1];
|
||||
char FullName[Nam_MAX_BYTES_FULL_NAME + 1];
|
||||
char Img[Ban_MAX_BYTES_IMAGE + 1];
|
||||
char WWW[Cns_MAX_BYTES_WWW + 1];
|
||||
char WWW[WWW_MAX_BYTES_WWW + 1];
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -25,10 +25,10 @@
|
|||
/********************************* Headers ***********************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#include "swad_banner.h"
|
||||
#include "swad_banner_database.h"
|
||||
#include "swad_config.h"
|
||||
#include "swad_database.h"
|
||||
#include "swad_www.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
/************************** Get list of all banners **************************/
|
||||
|
@ -198,7 +198,7 @@ void Ban_DB_UpdateBanImg (long BanCod,
|
|||
/*****************************************************************************/
|
||||
|
||||
void Ban_DB_UpdateBanWWW (long BanCod,
|
||||
const char NewWWW[Cns_MAX_BYTES_WWW + 1])
|
||||
const char NewWWW[WWW_MAX_BYTES_WWW + 1])
|
||||
{
|
||||
DB_QueryUPDATE ("can not update the web of a banner",
|
||||
"UPDATE ban_banners"
|
||||
|
|
|
@ -30,6 +30,8 @@
|
|||
#include <mysql/mysql.h> // To access MySQL databases
|
||||
|
||||
#include "swad_banner.h"
|
||||
#include "swad_hidden_visible.h"
|
||||
#include "swad_www.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
/***************************** Public prototypes *****************************/
|
||||
|
@ -50,7 +52,7 @@ void Ban_DB_UpdateBanName (long BanCod,
|
|||
void Ban_DB_UpdateBanImg (long BanCod,
|
||||
const char NewImg[Ban_MAX_BYTES_IMAGE + 1]);
|
||||
void Ban_DB_UpdateBanWWW (long BanCod,
|
||||
const char NewWWW[Cns_MAX_BYTES_WWW + 1]);
|
||||
const char NewWWW[WWW_MAX_BYTES_WWW + 1]);
|
||||
|
||||
void Ban_DB_RemoveBanner (long BanCod);
|
||||
|
||||
|
|
|
@ -4924,7 +4924,7 @@ static void Brw_WriteFileOrFolderPublisher (unsigned Level,long UsrCod)
|
|||
/************** Ask for confirmation of removing a file or link **************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Brw_AskRemFileFromTree (void)
|
||||
void Brw_ReqRemFile (void)
|
||||
{
|
||||
extern const char *Txt_Do_you_really_want_to_remove_FILE_OR_LINK_X;
|
||||
extern const char *Txt_You_can_not_remove_this_file_or_link;
|
||||
|
@ -4962,7 +4962,7 @@ void Brw_AskRemFileFromTree (void)
|
|||
/************************ Remove a file of a file browser ********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Brw_RemFileFromTree (void)
|
||||
void Brw_RemFile (void)
|
||||
{
|
||||
extern const char *Txt_FILE_X_removed;
|
||||
extern const char *Txt_You_can_not_remove_this_file_or_link;
|
||||
|
@ -5020,7 +5020,7 @@ void Brw_RemFileFromTree (void)
|
|||
/******************* Remove a folder of a file browser ***********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Brw_RemFolderFromTree (void)
|
||||
void Brw_RemFolder (void)
|
||||
{
|
||||
extern const char *Txt_Folder_X_removed;
|
||||
extern const char *Txt_You_can_not_remove_this_folder;
|
||||
|
@ -5092,7 +5092,7 @@ static void Brw_AskConfirmRemoveFolderNotEmpty (void)
|
|||
/********* Complete removing of a not empty folder in a file browser *********/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Brw_RemSubtreeInFileBrowser (void)
|
||||
void Brw_RemSubtree (void)
|
||||
{
|
||||
extern const char *Txt_Folder_X_and_all_its_contents_removed;
|
||||
char Path[PATH_MAX + 1 + PATH_MAX + 1];
|
||||
|
@ -5164,7 +5164,7 @@ void Brw_ContractFileTree (void)
|
|||
/****** Copy the path of a file/folder of a file browser in clipboard ********/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Brw_CopyFromFileBrowser (void)
|
||||
void Brw_Copy (void)
|
||||
{
|
||||
/***** Get parameters related to file browser *****/
|
||||
Brw_GetParAndInitFileBrowser ();
|
||||
|
@ -5698,7 +5698,7 @@ static void Brw_RemThisFolderAndUpdOtherFoldersFromExpandedFolders (const char P
|
|||
/**** Paste the arch/carp indicado in the portapapelesde in file browser *****/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Brw_PasteIntoFileBrowser (void)
|
||||
void Brw_Paste (void)
|
||||
{
|
||||
extern const char *Txt_Nothing_has_been_pasted_because_the_clipboard_is_empty_;
|
||||
struct GroupData GrpDat;
|
||||
|
@ -6490,7 +6490,7 @@ static void Brw_PutFormToCreateALink (const char *FileNameToShow)
|
|||
/*********** Receive the name of a new folder in a file browser **************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Brw_RecFolderFileBrowser (void)
|
||||
void Brw_CreateFolder (void)
|
||||
{
|
||||
extern const char *Txt_Can_not_create_the_folder_X_because_it_would_exceed_the_disk_quota;
|
||||
extern const char *Txt_Can_not_create_the_folder_X_because_there_is_already_a_folder_or_a_file_with_that_name;
|
||||
|
@ -6596,7 +6596,7 @@ void Brw_RecFolderFileBrowser (void)
|
|||
/**************** Rename an existing folder in a file browser ****************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Brw_RenFolderFileBrowser (void)
|
||||
void Brw_RenFolder (void)
|
||||
{
|
||||
extern const char *Txt_The_folder_X_has_been_renamed_as_Y;
|
||||
extern const char *Txt_The_name_X_has_not_changed;
|
||||
|
@ -6712,7 +6712,7 @@ void Brw_RenFolderFileBrowser (void)
|
|||
/****** Receive a new file in a file browser unsigned Dropzone.js ************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Brw_RcvFileInFileBrwDZ (void)
|
||||
void Brw_RcvFileDZ (void)
|
||||
{
|
||||
bool UploadSucessful;
|
||||
struct BrwSiz_BrowserSize *Size = BrwSiz_GetSize ();
|
||||
|
@ -6743,7 +6743,7 @@ void Brw_RcvFileInFileBrwDZ (void)
|
|||
/******** Receive a new file in a file browser using the classic way *********/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Brw_RcvFileInFileBrwClassic (void)
|
||||
void Brw_RcvFileClassic (void)
|
||||
{
|
||||
struct BrwSiz_BrowserSize *Size = BrwSiz_GetSize ();
|
||||
|
||||
|
@ -6949,7 +6949,7 @@ static bool Brw_RcvFileInFileBrw (struct BrwSiz_BrowserSize *Size,
|
|||
/******************* Receive a new link in a file browser ********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Brw_RecLinkFileBrowser (void)
|
||||
void Brw_CreateLink (void)
|
||||
{
|
||||
extern const char *Txt_Can_not_create_the_link_X_because_there_is_already_a_folder_or_a_link_with_that_name;
|
||||
extern const char *Txt_Can_not_create_the_link_X_because_it_would_exceed_the_disk_quota;
|
||||
|
|
|
@ -197,20 +197,20 @@ void Brw_ShowFileBrowserProject (long PrjCod);
|
|||
|
||||
void Brw_PutLegalNotice (void);
|
||||
|
||||
void Brw_AskRemFileFromTree (void);
|
||||
void Brw_RemFileFromTree (void);
|
||||
void Brw_RemFolderFromTree (void);
|
||||
void Brw_ReqRemFile (void);
|
||||
void Brw_RemFile (void);
|
||||
void Brw_RemFolder (void);
|
||||
void Brw_ExpandFileTree (void);
|
||||
void Brw_ContractFileTree (void);
|
||||
void Brw_CopyFromFileBrowser (void);
|
||||
void Brw_PasteIntoFileBrowser (void);
|
||||
void Brw_RemSubtreeInFileBrowser (void);
|
||||
void Brw_Copy (void);
|
||||
void Brw_Paste (void);
|
||||
void Brw_RemSubtree (void);
|
||||
void Brw_ShowFormFileBrowser (void);
|
||||
void Brw_RecFolderFileBrowser (void);
|
||||
void Brw_RenFolderFileBrowser (void);
|
||||
void Brw_RcvFileInFileBrwDZ (void);
|
||||
void Brw_RcvFileInFileBrwClassic (void);
|
||||
void Brw_RecLinkFileBrowser (void);
|
||||
void Brw_CreateFolder (void);
|
||||
void Brw_RenFolder (void);
|
||||
void Brw_RcvFileDZ (void);
|
||||
void Brw_RcvFileClassic (void);
|
||||
void Brw_CreateLink (void);
|
||||
void Brw_SetDocumentAsVisible (void);
|
||||
void Brw_SetDocumentAsHidden (void);
|
||||
HidVis_HiddenOrVisible_t Brw_CheckIfFileOrFolderIsHiddenOrVisible (Brw_FileType_t FileType,
|
||||
|
|
|
@ -497,7 +497,7 @@ void Bld_RemoveBuilding (void)
|
|||
/******************** Change the short name of a building ********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Bld_RenameBuildingShort (void)
|
||||
void Bld_RenameBuildingShrt (void)
|
||||
{
|
||||
/***** Building constructor *****/
|
||||
Bld_EditingBuildingConstructor ();
|
||||
|
@ -588,7 +588,7 @@ static void Bld_RenameBuilding (Nam_ShrtOrFullName_t ShrtOrFull)
|
|||
/******************** Change the location of a building **********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Bld_ChangeBuildingLocation (void)
|
||||
void Bld_ChangeBuildingLoc (void)
|
||||
{
|
||||
extern const char *Txt_The_location_of_the_building_X_has_changed_to_Y;
|
||||
extern const char *Txt_The_location_of_the_building_X_has_not_changed;
|
||||
|
|
|
@ -87,9 +87,9 @@ void Bld_GetListBuildingsInThisCtr (void);
|
|||
void Bld_GetBuildingDataByCod (struct Bld_Building *Roo);
|
||||
|
||||
void Bld_RemoveBuilding (void);
|
||||
void Bld_RenameBuildingShort (void);
|
||||
void Bld_RenameBuildingShrt (void);
|
||||
void Bld_RenameBuildingFull (void);
|
||||
void Bld_ChangeBuildingLocation (void);
|
||||
void Bld_ChangeBuildingLoc (void);
|
||||
void Bld_ContEditAfterChgBuilding (void);
|
||||
|
||||
void Bld_ReceiveNewBuilding (void);
|
||||
|
|
|
@ -149,7 +149,7 @@ void Cal_ShowFormToSelFirstDayOfWeek (Act_Action_t Action,
|
|||
/************************* Change first day of week **************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Cal_ChangeFirstDayOfWeek (void)
|
||||
void Cal_Change1stDayOfWeek (void)
|
||||
{
|
||||
/***** Get param with icon set *****/
|
||||
Gbl.Prefs.FirstDayOfWeek = Cal_GetParFirstDayOfWeek ();
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
void Cal_PutIconsToSelectFirstDayOfWeek (void);
|
||||
void Cal_ShowFormToSelFirstDayOfWeek (Act_Action_t Action,
|
||||
void (*FuncPars) (void *Args),void *Args);
|
||||
void Cal_ChangeFirstDayOfWeek (void);
|
||||
void Cal_Change1stDayOfWeek (void);
|
||||
unsigned Cal_GetFirstDayOfWeekFromStr (const char *Str);
|
||||
|
||||
void Cal_DrawCurrentMonth (void);
|
||||
|
|
|
@ -57,6 +57,7 @@
|
|||
#include "swad_place.h"
|
||||
#include "swad_room_database.h"
|
||||
#include "swad_survey.h"
|
||||
#include "swad_www.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
/************** External global variables from others modules ****************/
|
||||
|
@ -733,7 +734,7 @@ static void Ctr_ListCentersForEdition (const struct Plc_Places *Places)
|
|||
struct Hie_Node *Ctr;
|
||||
unsigned NumPlc;
|
||||
const struct Plc_Place *Plc;
|
||||
char WWW[Cns_MAX_BYTES_WWW + 1];
|
||||
char WWW[WWW_MAX_BYTES_WWW + 1];
|
||||
struct Usr_Data UsrDat;
|
||||
Usr_Can_t ICanEdit;
|
||||
unsigned NumDegs;
|
||||
|
@ -1027,7 +1028,7 @@ void Ctr_ChangeCtrPlc (void)
|
|||
/************************ Change the name of a center ************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Ctr_RenameCenterShort (void)
|
||||
void Ctr_RenameCenterShrt (void)
|
||||
{
|
||||
/***** Center constructor *****/
|
||||
Ctr_EditingCenterConstructor ();
|
||||
|
@ -1119,7 +1120,7 @@ void Ctr_ChangeCtrWWW (void)
|
|||
{
|
||||
extern bool (*Hie_GetDataByCod[Hie_NUM_LEVELS]) (struct Hie_Node *Node);
|
||||
extern const char *Txt_The_new_web_address_is_X;
|
||||
char NewWWW[Cns_MAX_BYTES_WWW + 1];
|
||||
char NewWWW[WWW_MAX_BYTES_WWW + 1];
|
||||
|
||||
/***** Center constructor *****/
|
||||
Ctr_EditingCenterConstructor ();
|
||||
|
@ -1128,7 +1129,7 @@ void Ctr_ChangeCtrWWW (void)
|
|||
Ctr_EditingCtr->HieCod = ParCod_GetAndCheckPar (ParCod_OthHie);
|
||||
|
||||
/***** Get the new WWW for the center *****/
|
||||
Par_GetParText ("WWW",NewWWW,Cns_MAX_BYTES_WWW);
|
||||
Par_GetParText ("WWW",NewWWW,WWW_MAX_BYTES_WWW);
|
||||
|
||||
/***** Get data of center *****/
|
||||
Hie_GetDataByCod[Hie_CTR] (Ctr_EditingCtr);
|
||||
|
@ -1473,7 +1474,7 @@ static void Ctr_ReceiveRequestOrCreateCtr (Hie_Status_t Status)
|
|||
Nam_GetParsShrtAndFullName (Names);
|
||||
|
||||
/* Get center WWW */
|
||||
Par_GetParText ("WWW",Ctr_EditingCtr->WWW,Cns_MAX_BYTES_WWW);
|
||||
Par_GetParText ("WWW",Ctr_EditingCtr->WWW,WWW_MAX_BYTES_WWW);
|
||||
|
||||
if (Ctr_EditingCtr->ShrtName[0] &&
|
||||
Ctr_EditingCtr->FullName[0]) // If there's a center name
|
||||
|
|
|
@ -56,7 +56,7 @@ void Ctr_GetCoordByCod (long CtrCod,struct Map_Coordinates *Coord);
|
|||
void Ctr_WriteSelectorOfCenter (void);
|
||||
void Ctr_RemoveCenter (void);
|
||||
void Ctr_ChangeCtrPlc (void);
|
||||
void Ctr_RenameCenterShort (void);
|
||||
void Ctr_RenameCenterShrt (void);
|
||||
void Ctr_RenameCenterFull (void);
|
||||
void Ctr_RenameCenter (struct Hie_Node *Ctr,Nam_ShrtOrFullName_t ShrtOrFull);
|
||||
void Ctr_ChangeCtrWWW (void);
|
||||
|
|
|
@ -51,6 +51,7 @@
|
|||
#include "swad_logo.h"
|
||||
#include "swad_parameter.h"
|
||||
#include "swad_place.h"
|
||||
#include "swad_www.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
/************** External global variables from others modules ****************/
|
||||
|
@ -1050,7 +1051,7 @@ void CtrCfg_ChangeCtrPlc (void)
|
|||
/*************** Change the name of a center in configuration ****************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void CtrCfg_RenameCenterShort (void)
|
||||
void CtrCfg_RenameCenterShrt (void)
|
||||
{
|
||||
Ctr_RenameCenter (&Gbl.Hierarchy.Node[Hie_CTR],Nam_SHRT_NAME);
|
||||
}
|
||||
|
@ -1130,11 +1131,11 @@ void CtrCfg_ChangeCtrAltitude (void)
|
|||
void CtrCfg_ChangeCtrWWW (void)
|
||||
{
|
||||
extern const char *Txt_The_new_web_address_is_X;
|
||||
char NewWWW[Cns_MAX_BYTES_WWW + 1];
|
||||
char NewWWW[WWW_MAX_BYTES_WWW + 1];
|
||||
|
||||
/***** Get parameters from form *****/
|
||||
/* Get the new WWW for the center */
|
||||
Par_GetParText ("WWW",NewWWW,Cns_MAX_BYTES_WWW);
|
||||
Par_GetParText ("WWW",NewWWW,WWW_MAX_BYTES_WWW);
|
||||
|
||||
/***** Check if new WWW is empty *****/
|
||||
if (NewWWW[0])
|
||||
|
|
|
@ -37,7 +37,7 @@ void CtrCfg_ReqPhoto (void);
|
|||
void CtrCfg_ReceivePhoto (void);
|
||||
void CtrCfg_ChangeCtrPhotoAttr (void);
|
||||
void CtrCfg_ChangeCtrIns (void);
|
||||
void CtrCfg_RenameCenterShort (void);
|
||||
void CtrCfg_RenameCenterShrt (void);
|
||||
void CtrCfg_RenameCenterFull (void);
|
||||
void CtrCfg_ChangeCtrPlc (void);
|
||||
void CtrCfg_ChangeCtrLatitude (void);
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
#include "swad_hierarchy_database.h"
|
||||
#include "swad_media.h"
|
||||
#include "swad_search.h"
|
||||
#include "swad_www.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
/************** External global variables from others modules ****************/
|
||||
|
@ -564,7 +565,7 @@ void Ctr_DB_UpdateCtrName (long HieCod,
|
|||
/**************** Update database changing old WWW by new WWW ****************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Ctr_DB_UpdateCtrWWW (long CtrCod,const char NewWWW[Cns_MAX_BYTES_WWW + 1])
|
||||
void Ctr_DB_UpdateCtrWWW (long CtrCod,const char NewWWW[WWW_MAX_BYTES_WWW + 1])
|
||||
{
|
||||
DB_QueryUPDATE ("can not update the web of a center",
|
||||
"UPDATE ctr_centers"
|
||||
|
|
|
@ -74,7 +74,7 @@ void Ctr_DB_UpdateCtrIns (long HieCod,long NewInsCod);
|
|||
void Ctr_DB_UpdateCtrPlc (long HieCod,long NewPlcCod);
|
||||
void Ctr_DB_UpdateCtrName (long HieCod,
|
||||
const char *FldName,const char *NewCtrName);
|
||||
void Ctr_DB_UpdateCtrWWW (long HieCod,const char NewWWW[Cns_MAX_BYTES_WWW + 1]);
|
||||
void Ctr_DB_UpdateCtrWWW (long HieCod,const char NewWWW[WWW_MAX_BYTES_WWW + 1]);
|
||||
void Ctr_DB_UpdateCtrPhotoAttribution (long HieCod,const char NewPhotoAttribution[Med_MAX_BYTES_ATTRIBUTION + 1]);
|
||||
void Ctr_DB_UpdateCtrCoordinate (long HieCod,
|
||||
const char *CoordField,double NewCoord);
|
||||
|
|
|
@ -633,10 +633,11 @@ Me sale este error, no s
|
|||
"can npt create received message (duplicated entry '243218-2160773' for key 'UsrCod_MsgCod')
|
||||
*/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 23.77 (2024-04-19)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 23.78 (2024-04-23)"
|
||||
#define CSS_FILE "swad23.67.2.css"
|
||||
#define JS_FILE "swad23.53.6.js"
|
||||
/*
|
||||
Version 23.78: Apr 23, 2024 Code refactoring in list of actions. (335577 lines)
|
||||
Version 23.77: Apr 19, 2024 Code refactoring in list of actions. (335567 lines)
|
||||
Version 23.76.1: Apr 19, 2024 Code refactoring related to don't belong/belong. (335570 lines)
|
||||
Version 23.76: Apr 19, 2024 Code refactoring related to don't belong/belong. (335550 lines)
|
||||
|
|
|
@ -33,9 +33,6 @@
|
|||
/***************************** Public constants ******************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define Cns_MAX_CHARS_WWW (256 - 1) // 255: max. number of chars of a URL
|
||||
#define Cns_MAX_BYTES_WWW Cns_MAX_CHARS_WWW // 255
|
||||
|
||||
#define Cns_MAX_CHARS_IP (3 + 1 + 3 + 1 + 3 + 1 + 3) // 15: max. number of chars of an IP address
|
||||
// Example: 255.255.255.255
|
||||
// 3+1+3+1+3+1+3
|
||||
|
|
|
@ -49,6 +49,7 @@
|
|||
#include "swad_parameter.h"
|
||||
#include "swad_parameter_code.h"
|
||||
#include "swad_survey.h"
|
||||
#include "swad_www.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
/************** External global variables from others modules ****************/
|
||||
|
@ -863,9 +864,9 @@ void Cty_WriteSelectorOfCountry (void)
|
|||
void Cty_WriteCountryName (long CtyCod)
|
||||
{
|
||||
char CtyName[Cty_MAX_BYTES_NAME + 1];
|
||||
Frm_PutForm_t PutForm = (!Frm_CheckIfInside () && // Only if not inside another form
|
||||
Act_GetBrowserTab (Gbl.Action.Act) == Act_1ST_TAB) ? Frm_PUT_FORM : // Only in main browser tab
|
||||
Frm_DONT_PUT_FORM;
|
||||
Frm_PutForm_t PutForm = (!Frm_CheckIfInside () && // Only if not inside another form
|
||||
Act_GetBrowserTab (Gbl.Action.Act) == Act_1ST) ? Frm_PUT_FORM : // Only in main browser tab
|
||||
Frm_DONT_PUT_FORM;
|
||||
|
||||
/***** Get country name *****/
|
||||
Cty_GetCountryNameInLanguage (CtyCod,Gbl.Prefs.Language,CtyName);
|
||||
|
@ -945,7 +946,7 @@ bool Cty_GetCountrDataByCod (struct Hie_Node *Node)
|
|||
|
||||
void Cty_GetNamesAndWWWsByCod (struct Hie_Node *Cty,
|
||||
char NameInSeveralLanguages[1 + Lan_NUM_LANGUAGES][Cty_MAX_BYTES_NAME + 1],
|
||||
char WWWInSeveralLanguages [1 + Lan_NUM_LANGUAGES][Cns_MAX_BYTES_WWW + 1])
|
||||
char WWWInSeveralLanguages [1 + Lan_NUM_LANGUAGES][WWW_MAX_BYTES_WWW + 1])
|
||||
{
|
||||
MYSQL_RES *mysql_res;
|
||||
MYSQL_ROW row;
|
||||
|
@ -965,7 +966,7 @@ void Cty_GetNamesAndWWWsByCod (struct Hie_Node *Cty,
|
|||
Str_Copy (NameInSeveralLanguages[Lan],row[Lan - 1],
|
||||
Cty_MAX_BYTES_NAME);
|
||||
Str_Copy (WWWInSeveralLanguages[Lan],row[Lan_NUM_LANGUAGES + Lan - 1],
|
||||
Cns_MAX_BYTES_WWW - 1);
|
||||
WWW_MAX_BYTES_WWW - 1);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -1030,7 +1031,7 @@ static void Cty_ListCountriesForEdition (void)
|
|||
unsigned NumUsrsCty;
|
||||
Lan_Language_t Lan;
|
||||
char NameInSeveralLanguages[1 + Lan_NUM_LANGUAGES][Cty_MAX_BYTES_NAME + 1];
|
||||
char WWWInSeveralLanguages [1 + Lan_NUM_LANGUAGES][Cns_MAX_BYTES_WWW + 1];
|
||||
char WWWInSeveralLanguages [1 + Lan_NUM_LANGUAGES][WWW_MAX_BYTES_WWW + 1];
|
||||
|
||||
/***** Begin table *****/
|
||||
HTM_TABLE_Begin ("TBL_SCROLL");
|
||||
|
@ -1300,7 +1301,7 @@ void Cty_ChangeCtyWWW (void)
|
|||
extern bool (*Hie_GetDataByCod[Hie_NUM_LEVELS]) (struct Hie_Node *Node);
|
||||
extern const char *Lan_STR_LANG_ID[1 + Lan_NUM_LANGUAGES];
|
||||
extern const char *Txt_The_new_web_address_is_X;
|
||||
char NewWWW[Cns_MAX_BYTES_WWW + 1];
|
||||
char NewWWW[WWW_MAX_BYTES_WWW + 1];
|
||||
Lan_Language_t Language;
|
||||
char FldName[3 + 1 + 2 + 1]; // Example: "WWW_en"
|
||||
|
||||
|
@ -1314,7 +1315,7 @@ void Cty_ChangeCtyWWW (void)
|
|||
Language = Lan_GetParLanguage ();
|
||||
|
||||
/***** Get the new WWW for the country *****/
|
||||
Par_GetParText ("WWW",NewWWW,Cns_MAX_BYTES_WWW);
|
||||
Par_GetParText ("WWW",NewWWW,WWW_MAX_BYTES_WWW);
|
||||
|
||||
/***** Get from the database the data of the country *****/
|
||||
Hie_GetDataByCod[Hie_CTY] (Cty_EditingCty);
|
||||
|
@ -1519,7 +1520,7 @@ void Cty_ReceiveNewCountry (void)
|
|||
bool CreateCountry = true;
|
||||
Lan_Language_t Lan;
|
||||
char NameInSeveralLanguages[1 + Lan_NUM_LANGUAGES][Cty_MAX_BYTES_NAME + 1];
|
||||
char WWWInSeveralLanguages [1 + Lan_NUM_LANGUAGES][Cns_MAX_BYTES_WWW + 1];
|
||||
char WWWInSeveralLanguages [1 + Lan_NUM_LANGUAGES][WWW_MAX_BYTES_WWW + 1];
|
||||
unsigned i;
|
||||
|
||||
/***** Country constructoor *****/
|
||||
|
@ -1603,7 +1604,7 @@ void Cty_ReceiveNewCountry (void)
|
|||
}
|
||||
|
||||
snprintf (ParName,sizeof (ParName),"WWW_%s",Lan_STR_LANG_ID[Lan]);
|
||||
Par_GetParText (ParName,WWWInSeveralLanguages[Lan],Cns_MAX_BYTES_WWW);
|
||||
Par_GetParText (ParName,WWWInSeveralLanguages[Lan],WWW_MAX_BYTES_WWW);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -71,7 +71,7 @@ void Cty_WriteCountryName (long CtyCod);
|
|||
bool Cty_GetCountrDataByCod (struct Hie_Node *Node);
|
||||
void Cty_GetNamesAndWWWsByCod (struct Hie_Node *Cty,
|
||||
char NameInSeveralLanguages[1 + Lan_NUM_LANGUAGES][Cty_MAX_BYTES_NAME + 1],
|
||||
char WWWInSeveralLanguages [1 + Lan_NUM_LANGUAGES][Cns_MAX_BYTES_WWW + 1]);
|
||||
char WWWInSeveralLanguages [1 + Lan_NUM_LANGUAGES][WWW_MAX_BYTES_WWW + 1]);
|
||||
void Cty_FlushCacheCountryName (void);
|
||||
void Cty_GetCountryNameInLanguage (long CtyCod,Lan_Language_t Language,
|
||||
char CtyName[Cty_MAX_BYTES_NAME + 1]);
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#include "swad_hierarchy.h"
|
||||
#include "swad_hierarchy_database.h"
|
||||
#include "swad_search.h"
|
||||
#include "swad_www.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
/************** External global variables from others modules ****************/
|
||||
|
@ -49,7 +50,7 @@ extern struct Globals Gbl;
|
|||
|
||||
#define Cty_DB_MAX_BYTES_SUBQUERY_CTYS ((1 + Lan_NUM_LANGUAGES) * 32)
|
||||
#define Cty_DB_MAX_BYTES_SUBQUERY_CTYS_NAME ((1 + Lan_NUM_LANGUAGES) * Cty_MAX_BYTES_NAME)
|
||||
#define Cty_DB_MAX_BYTES_SUBQUERY_CTYS_WWW ((1 + Lan_NUM_LANGUAGES) * Cns_MAX_BYTES_WWW)
|
||||
#define Cty_DB_MAX_BYTES_SUBQUERY_CTYS_WWW ((1 + Lan_NUM_LANGUAGES) * WWW_MAX_BYTES_WWW)
|
||||
|
||||
/*****************************************************************************/
|
||||
/**************************** Create a new country ***************************/
|
||||
|
@ -57,7 +58,7 @@ extern struct Globals Gbl;
|
|||
|
||||
void Cty_DB_CreateCountry (const struct Hie_Node *Cty,
|
||||
char NameInSeveralLanguages[1 + Lan_NUM_LANGUAGES][Cty_MAX_BYTES_NAME + 1],
|
||||
char WWWInSeveralLanguages [1 + Lan_NUM_LANGUAGES][Cns_MAX_BYTES_WWW + 1])
|
||||
char WWWInSeveralLanguages [1 + Lan_NUM_LANGUAGES][WWW_MAX_BYTES_WWW + 1])
|
||||
{
|
||||
extern const char *Lan_STR_LANG_ID[1 + Lan_NUM_LANGUAGES];
|
||||
Lan_Language_t Lan;
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
|
||||
void Cty_DB_CreateCountry (const struct Hie_Node *Cty,
|
||||
char NameInSeveralLanguages[1 + Lan_NUM_LANGUAGES][Cty_MAX_BYTES_NAME + 1],
|
||||
char WWWInSeveralLanguages [1 + Lan_NUM_LANGUAGES][Cns_MAX_BYTES_WWW + 1]);
|
||||
char WWWInSeveralLanguages [1 + Lan_NUM_LANGUAGES][WWW_MAX_BYTES_WWW + 1]);
|
||||
|
||||
unsigned Cty_DB_GetCtysBasic (MYSQL_RES **mysql_res);
|
||||
unsigned Cty_DB_GetCtysWithPendingInss (MYSQL_RES **mysql_res);
|
||||
|
|
|
@ -1409,7 +1409,7 @@ void Crs_UpdateCrsYear (struct Hie_Node *Crs,unsigned NewYear)
|
|||
/************************ Change the name of a course ************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Crs_RenameCourseShort (void)
|
||||
void Crs_RenameCourseShrt (void)
|
||||
{
|
||||
/***** Course constructor *****/
|
||||
Crs_EditingCourseConstructor ();
|
||||
|
|
|
@ -72,7 +72,7 @@ void Crs_UpdateInstitutionalCrsCod (struct Hie_Node *Crs,
|
|||
const char *NewInstitutionalCrsCod);
|
||||
void Crs_UpdateCrsYear (struct Hie_Node *Crs,unsigned NewYear);
|
||||
|
||||
void Crs_RenameCourseShort (void);
|
||||
void Crs_RenameCourseShrt (void);
|
||||
void Crs_RenameCourseFull (void);
|
||||
void Crs_RenameCourse (struct Hie_Node *Crs,Nam_ShrtOrFullName_t ShrtOrFull);
|
||||
|
||||
|
|
|
@ -486,7 +486,7 @@ void CrsCfg_ChangeCrsDeg (void)
|
|||
/*************** Change the name of a course in configuration ****************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void CrsCfg_RenameCourseShort (void)
|
||||
void CrsCfg_RenameCourseShrt (void)
|
||||
{
|
||||
Crs_RenameCourse (&Gbl.Hierarchy.Node[Hie_CRS],Nam_SHRT_NAME);
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ void CrsCfg_Configuration (Vie_ViewType_t ViewType);
|
|||
void CrsCfg_PrintConfiguration (void);
|
||||
|
||||
void CrsCfg_ChangeCrsDeg (void);
|
||||
void CrsCfg_RenameCourseShort (void);
|
||||
void CrsCfg_RenameCourseShrt (void);
|
||||
void CrsCfg_RenameCourseFull (void);
|
||||
void CrsCfg_ChangeCrsYear (void);
|
||||
void CrsCfg_ChangeInsCrsCod (void);
|
||||
|
|
|
@ -1098,7 +1098,7 @@ void Dat_GetDateFromForm (const char *ParNameDay,const char *ParNameMonth,const
|
|||
/******* Set initial date to distant past and end date to current date *******/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Dat_SetDatesToPastAndNow (void)
|
||||
void Dat_SetDatesToPastNow (void)
|
||||
{
|
||||
Dat_Time.Range.TimeUTC[Dat_STR_TIME] = (time_t) 0;
|
||||
Dat_Time.Range.TimeUTC[Dat_END_TIME] = Dat_GetStartExecutionTimeUTC ();
|
||||
|
@ -1109,7 +1109,7 @@ void Dat_SetDatesToPastAndNow (void)
|
|||
/************ and set initial date to end date minus several days ************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Dat_SetDatesToRecentWeeks (void)
|
||||
void Dat_SetDatesToRecWeeks (void)
|
||||
{
|
||||
Dat_Time.Range.TimeUTC[Dat_END_TIME] = Dat_GetStartExecutionTimeUTC ();
|
||||
Dat_Time.Range.TimeUTC[Dat_STR_TIME] = Dat_Time.Range.TimeUTC[Dat_END_TIME] -
|
||||
|
|
|
@ -190,8 +190,8 @@ void Dat_WriteFormDate (unsigned FirstYear,unsigned LastYear,
|
|||
void Dat_GetDateFromForm (const char *ParNameDay,const char *ParNameMonth,const char *ParNameYear,
|
||||
unsigned *Day,unsigned *Month,unsigned *Year);
|
||||
|
||||
void Dat_SetDatesToPastAndNow (void);
|
||||
void Dat_SetDatesToRecentWeeks (void);
|
||||
void Dat_SetDatesToPastNow (void);
|
||||
void Dat_SetDatesToRecWeeks (void);
|
||||
void Dat_WriteParsIniEndDates (void);
|
||||
void Dat_GetIniEndDatesFromForm (void);
|
||||
|
||||
|
|
|
@ -322,8 +322,8 @@ static void Deg_ListDegreesForEdition (const struct DegTyp_DegTypes *DegTypes)
|
|||
unsigned NumDeg;
|
||||
struct Hie_Node *Deg;
|
||||
unsigned NumDegTyp;
|
||||
struct DegTyp_DegreeType *DegTyp;
|
||||
char WWW[Cns_MAX_BYTES_WWW + 1];
|
||||
struct DegTyp_DegType *DegTyp;
|
||||
char WWW[WWW_MAX_BYTES_WWW + 1];
|
||||
struct Usr_Data UsrDat;
|
||||
Usr_Can_t ICanEdit;
|
||||
unsigned NumCrss;
|
||||
|
@ -507,7 +507,7 @@ static void Deg_PutFormToCreateDegree (const struct DegTyp_DegTypes *DegTypes)
|
|||
{
|
||||
Act_Action_t NextAction = ActUnk;
|
||||
unsigned NumDegTyp;
|
||||
struct DegTyp_DegreeType *DegTyp;
|
||||
struct DegTyp_DegType *DegTyp;
|
||||
struct Hie_Node Deg;
|
||||
const char *Names[Nam_NUM_SHRT_FULL_NAMES];
|
||||
|
||||
|
@ -732,7 +732,7 @@ static void Deg_PutIconsListingDegrees (__attribute__((unused)) void *Args)
|
|||
Deg_PutIconToEditDegrees ();
|
||||
|
||||
/***** Put icon to view degree types *****/
|
||||
DegTyp_PutIconToViewDegreeTypes ();
|
||||
DegTyp_PutIconToViewDegTypes ();
|
||||
|
||||
/***** Put icon to show a figure *****/
|
||||
Fig_PutIconToShowFigure (Fig_HIERARCHY);
|
||||
|
@ -756,7 +756,7 @@ static void Deg_ListOneDegreeForSeeing (struct Hie_Node *Deg,unsigned NumDeg)
|
|||
extern const char *Txt_DEGREE_With_courses;
|
||||
extern const char *Txt_DEGREE_Without_courses;
|
||||
extern const char *Txt_DEGREE_STATUS[Hie_NUM_STATUS_TXT];
|
||||
struct DegTyp_DegreeType DegTyp;
|
||||
struct DegTyp_DegType DegTyp;
|
||||
const char *TxtClassNormal;
|
||||
const char *TxtClassStrong;
|
||||
const char *BgColor;
|
||||
|
@ -766,7 +766,7 @@ static void Deg_ListOneDegreeForSeeing (struct Hie_Node *Deg,unsigned NumDeg)
|
|||
|
||||
/***** Get data of type of degree of this degree *****/
|
||||
DegTyp.DegTypCod = Deg->Specific.TypCod;
|
||||
if (!DegTyp_GetDegreeTypeDataByCod (&DegTyp))
|
||||
if (!DegTyp_GetDegTypeDataByCod (&DegTyp))
|
||||
Err_WrongDegTypExit ();
|
||||
|
||||
if (Deg->Status & Hie_STATUS_BIT_PENDING)
|
||||
|
@ -859,7 +859,7 @@ static void Deg_EditDegreesInternal (void)
|
|||
char *Title;
|
||||
|
||||
/***** Get list of degree types *****/
|
||||
DegTyp_GetListDegreeTypes (&DegTypes,Hie_SYS,DegTyp_ORDER_BY_DEGREE_TYPE);
|
||||
DegTyp_GetListDegTypes (&DegTypes,Hie_SYS,DegTyp_ORDER_BY_DEG_TYPE);
|
||||
|
||||
/***** Get list of degrees in the current center *****/
|
||||
Deg_GetListDegsInCurrentCtr ();
|
||||
|
@ -890,15 +890,15 @@ static void Deg_EditDegreesInternal (void)
|
|||
Ale_ShowAlert (Ale_WARNING,Txt_No_types_of_degree);
|
||||
|
||||
/***** Form to create the first degree type *****/
|
||||
if (DegTyp_CheckIfICanCreateDegreeTypes () == Usr_CAN)
|
||||
DegTyp_EditDegreeTypes (&DegTypes);
|
||||
if (DegTyp_CheckIfICanCreateDegTypes () == Usr_CAN)
|
||||
DegTyp_EditDegTypes (&DegTypes);
|
||||
}
|
||||
|
||||
/***** End box *****/
|
||||
Box_BoxEnd ();
|
||||
|
||||
/***** Free list of degree types *****/
|
||||
DegTyp_FreeListDegreeTypes (&DegTypes);
|
||||
DegTyp_FreeListDegTypes (&DegTypes);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -911,7 +911,7 @@ static void Deg_PutIconsEditingDegrees (__attribute__((unused)) void *Args)
|
|||
Ico_PutContextualIconToView (ActSeeDeg,NULL,NULL,NULL);
|
||||
|
||||
/***** Put icon to view types of degree *****/
|
||||
DegTyp_PutIconToViewDegreeTypes ();
|
||||
DegTyp_PutIconToViewDegTypes ();
|
||||
|
||||
/***** Put icon to show a figure *****/
|
||||
Fig_PutIconToShowFigure (Fig_HIERARCHY);
|
||||
|
@ -1049,7 +1049,7 @@ static void Deg_ReceiveRequestOrCreateDeg (Hie_Status_t Status)
|
|||
Deg_EditingDeg->Specific.TypCod = ParCod_GetAndCheckPar (ParCod_OthDegTyp);
|
||||
|
||||
/* Get degree WWW */
|
||||
Par_GetParText ("WWW",Deg_EditingDeg->WWW,Cns_MAX_BYTES_WWW);
|
||||
Par_GetParText ("WWW",Deg_EditingDeg->WWW,WWW_MAX_BYTES_WWW);
|
||||
|
||||
if (Deg_EditingDeg->ShrtName[0] &&
|
||||
Deg_EditingDeg->FullName[0]) // If there's a degree name
|
||||
|
@ -1079,7 +1079,7 @@ static void Deg_ReceiveRequestOrCreateDeg (Hie_Status_t Status)
|
|||
/************************ Request removing of a degree ***********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Deg_RemoveDegree (void)
|
||||
void Deg_RemoveDeg (void)
|
||||
{
|
||||
extern bool (*Hie_GetDataByCod[Hie_NUM_LEVELS]) (struct Hie_Node *Node);
|
||||
extern const char *Txt_To_remove_a_degree_you_must_first_remove_all_courses_in_the_degree;
|
||||
|
@ -1248,7 +1248,7 @@ void Deg_RemoveDegreeCompletely (long DegCod)
|
|||
/************************ Change the name of a degree ************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Deg_RenameDegreeShort (void)
|
||||
void Deg_RenameDegShrt (void)
|
||||
{
|
||||
/***** Degree constructor *****/
|
||||
Deg_EditingDegreeConstructor ();
|
||||
|
@ -1258,7 +1258,7 @@ void Deg_RenameDegreeShort (void)
|
|||
Deg_RenameDegree (Deg_EditingDeg,Nam_SHRT_NAME);
|
||||
}
|
||||
|
||||
void Deg_RenameDegreeFull (void)
|
||||
void Deg_RenameDegFull (void)
|
||||
{
|
||||
/***** Degree constructor *****/
|
||||
Deg_EditingDegreeConstructor ();
|
||||
|
@ -1335,7 +1335,7 @@ void Deg_RenameDegree (struct Hie_Node *Deg,Nam_ShrtOrFullName_t ShrtOrFull)
|
|||
/************************ Change the type of a degree ************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Deg_ChangeDegreeType (void)
|
||||
void Deg_ChangeDegTyp (void)
|
||||
{
|
||||
extern bool (*Hie_GetDataByCod[Hie_NUM_LEVELS]) (struct Hie_Node *Node);
|
||||
extern const char *Txt_The_type_of_degree_of_the_degree_X_has_changed;
|
||||
|
@ -1373,7 +1373,7 @@ void Deg_ChangeDegWWW (void)
|
|||
{
|
||||
extern bool (*Hie_GetDataByCod[Hie_NUM_LEVELS]) (struct Hie_Node *Node);
|
||||
extern const char *Txt_The_new_web_address_is_X;
|
||||
char NewWWW[Cns_MAX_BYTES_WWW + 1];
|
||||
char NewWWW[WWW_MAX_BYTES_WWW + 1];
|
||||
|
||||
/***** Degree constructor *****/
|
||||
Deg_EditingDegreeConstructor ();
|
||||
|
@ -1383,7 +1383,7 @@ void Deg_ChangeDegWWW (void)
|
|||
Deg_EditingDeg->HieCod = ParCod_GetAndCheckPar (ParCod_OthHie);
|
||||
|
||||
/* Get the new WWW for the degree */
|
||||
Par_GetParText ("WWW",NewWWW,Cns_MAX_BYTES_WWW);
|
||||
Par_GetParText ("WWW",NewWWW,WWW_MAX_BYTES_WWW);
|
||||
|
||||
/***** Get data of degree *****/
|
||||
Hie_GetDataByCod[Hie_DEG] (Deg_EditingDeg);
|
||||
|
|
|
@ -68,14 +68,14 @@ void Deg_FreeListAllDegsWithStds (struct Hie_List *Degs);
|
|||
|
||||
void Deg_ReceiveReqDeg (void);
|
||||
void Deg_ReceiveNewDeg (void);
|
||||
void Deg_RemoveDegree (void);
|
||||
void Deg_RemoveDeg (void);
|
||||
|
||||
bool Deg_GetDegreeDataByCod (struct Hie_Node *Node);
|
||||
void Deg_RemoveDegreeCompletely (long DegCod);
|
||||
void Deg_RenameDegreeShort (void);
|
||||
void Deg_RenameDegreeFull (void);
|
||||
void Deg_RenameDegShrt (void);
|
||||
void Deg_RenameDegFull (void);
|
||||
void Deg_RenameDegree (struct Hie_Node *Deg,Nam_ShrtOrFullName_t ShrtOrFull);
|
||||
void Deg_ChangeDegreeType (void);
|
||||
void Deg_ChangeDegTyp (void);
|
||||
void Deg_ChangeDegWWW (void);
|
||||
void Deg_ChangeDegStatus (void);
|
||||
void Deg_ContEditAfterChgDeg (void);
|
||||
|
|
|
@ -352,7 +352,7 @@ void DegCfg_ChangeDegCtr (void)
|
|||
/*************** Change the name of a degree in configuration ****************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void DegCfg_RenameDegreeShort (void)
|
||||
void DegCfg_RenameDegreeShrt (void)
|
||||
{
|
||||
Deg_RenameDegree (&Gbl.Hierarchy.Node[Hie_DEG],Nam_SHRT_NAME);
|
||||
}
|
||||
|
@ -369,11 +369,11 @@ void DegCfg_RenameDegreeFull (void)
|
|||
void DegCfg_ChangeDegWWW (void)
|
||||
{
|
||||
extern const char *Txt_The_new_web_address_is_X;
|
||||
char NewWWW[Cns_MAX_BYTES_WWW + 1];
|
||||
char NewWWW[WWW_MAX_BYTES_WWW + 1];
|
||||
|
||||
/***** Get parameters from form *****/
|
||||
/* Get the new WWW for the degree */
|
||||
Par_GetParText ("WWW",NewWWW,Cns_MAX_BYTES_WWW);
|
||||
Par_GetParText ("WWW",NewWWW,WWW_MAX_BYTES_WWW);
|
||||
|
||||
/***** Check if new WWW is empty *****/
|
||||
if (NewWWW[0])
|
||||
|
|
|
@ -31,7 +31,7 @@ void DegCfg_ShowConfiguration (void);
|
|||
void DegCfg_PrintConfiguration (void);
|
||||
|
||||
void DegCfg_ChangeDegCtr (void);
|
||||
void DegCfg_RenameDegreeShort (void);
|
||||
void DegCfg_RenameDegreeShrt (void);
|
||||
void DegCfg_RenameDegreeFull (void);
|
||||
void DegCfg_ChangeDegWWW (void);
|
||||
void DegCfg_ReqLogo (void);
|
||||
|
|
|
@ -154,8 +154,8 @@ unsigned Deg_DB_GetDegreeTypes (MYSQL_RES **mysql_res,
|
|||
{
|
||||
static const char *OrderBySubQuery[DegTyp_NUM_ORDERS] =
|
||||
{
|
||||
[DegTyp_ORDER_BY_DEGREE_TYPE] = "DegTypName",
|
||||
[DegTyp_ORDER_BY_NUM_DEGREES] = "NumDegs DESC,"
|
||||
[DegTyp_ORDER_BY_DEG_TYPE] = "DegTypName",
|
||||
[DegTyp_ORDER_BY_NUM_DEGS] = "NumDegs DESC,"
|
||||
"DegTypName",
|
||||
};
|
||||
|
||||
|
@ -266,7 +266,7 @@ unsigned Deg_DB_GetDegreeTypes (MYSQL_RES **mysql_res,
|
|||
/************** Get the name of a type of degree from database ***************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Deg_DB_GetDegTypeNameByCod (struct DegTyp_DegreeType *DegTyp)
|
||||
void Deg_DB_GetDegTypeNameByCod (struct DegTyp_DegType *DegTyp)
|
||||
{
|
||||
DB_QuerySELECTString (DegTyp->DegTypName,sizeof (DegTyp->DegTypName) - 1,
|
||||
"can not get the name of a type of degree",
|
||||
|
@ -732,7 +732,7 @@ void Deg_DB_UpdateDegTyp (long DegCod,long NewDegTypCod)
|
|||
/************************ Update the WWW of a degree *************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Deg_DB_UpdateDegWWW (long HieCod,const char NewWWW[Cns_MAX_BYTES_WWW + 1])
|
||||
void Deg_DB_UpdateDegWWW (long HieCod,const char NewWWW[WWW_MAX_BYTES_WWW + 1])
|
||||
{
|
||||
DB_QueryUPDATE ("can not update the web of a degree",
|
||||
"UPDATE deg_degrees"
|
||||
|
|
|
@ -43,7 +43,7 @@ void Deg_DB_CreateDegree (struct Hie_Node *Deg,Hie_Status_t Status);
|
|||
unsigned Deg_DB_GetNumDegreeTypes (Hie_Level_t Level);
|
||||
unsigned Deg_DB_GetDegreeTypes (MYSQL_RES **mysql_res,
|
||||
Hie_Level_t Level,DegTyp_Order_t Order);
|
||||
void Deg_DB_GetDegTypeNameByCod (struct DegTyp_DegreeType *DegTyp);
|
||||
void Deg_DB_GetDegTypeNameByCod (struct DegTyp_DegType *DegTyp);
|
||||
unsigned Deg_DB_GetDegreeDataByCod (MYSQL_RES **mysql_res,long HieCod);
|
||||
long Deg_DB_GetInsCodOfDegreeByCod (long HieCod);
|
||||
long Deg_DB_GetCtrCodOfDegreeByCod (long HieCod);
|
||||
|
@ -78,7 +78,7 @@ void Deg_DB_UpdateDegNameDB (long HieCod,
|
|||
const char *FldName,const char *NewDegName);
|
||||
void Deg_DB_UpdateDegCtr (long HieCod,long NewCtrCod);
|
||||
void Deg_DB_UpdateDegTyp (long HieCod,long NewDegTypCod);
|
||||
void Deg_DB_UpdateDegWWW (long HieCod,const char NewWWW[Cns_MAX_BYTES_WWW + 1]);
|
||||
void Deg_DB_UpdateDegWWW (long HieCod,const char NewWWW[WWW_MAX_BYTES_WWW + 1]);
|
||||
void Deg_DB_UpdateDegStatus (long DegCod,Hie_Status_t NewStatus);
|
||||
|
||||
unsigned Deg_DB_GetMyDegs (MYSQL_RES **mysql_res,long HieCod);
|
||||
|
|
|
@ -59,57 +59,57 @@ extern struct Globals Gbl;
|
|||
/**************************** Private variables ******************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static struct DegTyp_DegreeType *DegTyp_EditingDegTyp = NULL; // Static variable to keep the degree type being edited
|
||||
static struct DegTyp_DegType *DegTyp_EditingDegTyp = NULL; // Static variable to keep the degree type being edited
|
||||
|
||||
/*****************************************************************************/
|
||||
/*************************** Private prototypes ******************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void DegTyp_SeeDegreeTypes (Act_Action_t NextAction,Hie_Level_t Level,
|
||||
DegTyp_Order_t DefaultOrder);
|
||||
static void DegTyp_SeeDegTypes (Act_Action_t NextAction,Hie_Level_t Level,
|
||||
DegTyp_Order_t DefaultOrder);
|
||||
static DegTyp_Order_t DegTyp_GetParDegTypOrder (DegTyp_Order_t DefaultOrder);
|
||||
|
||||
static void DegTyp_ListDegreeTypes (const struct DegTyp_DegTypes *DegTypes,
|
||||
Act_Action_t NextAction,
|
||||
Hie_Level_t Level,
|
||||
DegTyp_Order_t SelectedOrder);
|
||||
static void DegTyp_ListDegTypes (const struct DegTyp_DegTypes *DegTypes,
|
||||
Act_Action_t NextAction,
|
||||
Hie_Level_t Level,
|
||||
DegTyp_Order_t SelectedOrder);
|
||||
|
||||
static void DegTyp_EditDegreeTypesInternal (const struct DegTyp_DegTypes *DegTypes);
|
||||
static void DegTyp_PutIconsEditingDegreeTypes (__attribute__((unused)) void *Args);
|
||||
static void DegTyp_EditDegTypesInternal (const struct DegTyp_DegTypes *DegTypes);
|
||||
static void DegTyp_PutIconsEditingDegTypes (__attribute__((unused)) void *Args);
|
||||
|
||||
static void DegTyp_ListDegreeTypesForSeeing (const struct DegTyp_DegTypes *DegTypes);
|
||||
static void DegTyp_ListDegTypesForSeeing (const struct DegTyp_DegTypes *DegTypes);
|
||||
static void DegTyp_PutIconsListingDegTypes (__attribute__((unused)) void *Args);
|
||||
static void DegTyp_PutIconToEditDegTypes (__attribute__((unused)) void *Args);
|
||||
static void DegTyp_ListDegreeTypesForEdition (const struct DegTyp_DegTypes *DegTypes);
|
||||
static void DegTyp_ListDegTypesForEdition (const struct DegTyp_DegTypes *DegTypes);
|
||||
|
||||
static void DegTyp_PutFormToCreateDegreeType (void);
|
||||
|
||||
static void DegTyp_PutHeadDegreeTypesForSeeing (Act_Action_t NextAction,
|
||||
Hie_Level_t Level,
|
||||
DegTyp_Order_t SelectedOrder);
|
||||
static void DegTyp_PutHeadDegreeTypesForEdition (void);
|
||||
static void DegTyp_PutHeadDegTypesForSeeing (Act_Action_t NextAction,
|
||||
Hie_Level_t Level,
|
||||
DegTyp_Order_t SelectedOrder);
|
||||
static void DegTyp_PutHeadDegTypesForEdition (void);
|
||||
|
||||
static void DegTyp_PutParOtherDegTypCod (void *DegTypCod);
|
||||
|
||||
static void DegTyp_RemoveDegreeTypeCompletely (long DegTypCod);
|
||||
static void DegTyp_RemoveDegTypeCompletely (long DegTypCod);
|
||||
|
||||
static void DegTyp_EditingDegreeTypeConstructor (void);
|
||||
static void DegTyp_EditingDegreeTypeDestructor (void);
|
||||
static void DegTyp_EditingDegTypeConstructor (void);
|
||||
static void DegTyp_EditingDegTypeDestructor (void);
|
||||
|
||||
/*****************************************************************************/
|
||||
/************** Show selector of degree types for statistics *****************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void DegTyp_WriteSelectorDegreeTypes (long SelectedDegTypCod)
|
||||
void DegTyp_WriteSelectorDegTypes (long SelectedDegTypCod)
|
||||
{
|
||||
extern const char *Txt_Any_type_of_degree;
|
||||
struct DegTyp_DegTypes DegTypes;
|
||||
unsigned NumDegTyp;
|
||||
const struct DegTyp_DegreeType *DegTyp;
|
||||
const struct DegTyp_DegType *DegTyp;
|
||||
|
||||
/***** Form to select degree types *****/
|
||||
/* Get list of degree types */
|
||||
DegTyp_GetListDegreeTypes (&DegTypes,Hie_SYS,DegTyp_ORDER_BY_DEGREE_TYPE);
|
||||
DegTyp_GetListDegTypes (&DegTypes,Hie_SYS,DegTyp_ORDER_BY_DEG_TYPE);
|
||||
|
||||
/* List degree types */
|
||||
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,NULL,
|
||||
|
@ -135,27 +135,27 @@ void DegTyp_WriteSelectorDegreeTypes (long SelectedDegTypCod)
|
|||
HTM_SELECT_End ();
|
||||
|
||||
/***** Free list of degree types *****/
|
||||
DegTyp_FreeListDegreeTypes (&DegTypes);
|
||||
DegTyp_FreeListDegTypes (&DegTypes);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/***************************** Show degree types *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void DegTyp_SeeDegreeTypesInDegTab (void)
|
||||
void DegTyp_SeeDegTypesInDegTab (void)
|
||||
{
|
||||
DegTyp_SeeDegreeTypes (ActSeeDegTyp,Hie_SYS,
|
||||
DegTyp_ORDER_BY_DEGREE_TYPE); // Default order if not specified
|
||||
DegTyp_SeeDegTypes (ActSeeDegTyp,Hie_SYS,
|
||||
DegTyp_ORDER_BY_DEG_TYPE); // Default order if not specified
|
||||
}
|
||||
|
||||
void DegTyp_SeeDegreeTypesInStaTab (void)
|
||||
void DegTyp_SeeDegTypesInStaTab (void)
|
||||
{
|
||||
DegTyp_SeeDegreeTypes (ActSeeUseGbl,Gbl.Scope.Current,
|
||||
DegTyp_ORDER_BY_NUM_DEGREES); // Default order if not specified
|
||||
DegTyp_SeeDegTypes (ActSeeUseGbl,Gbl.Scope.Current,
|
||||
DegTyp_ORDER_BY_NUM_DEGS); // Default order if not specified
|
||||
}
|
||||
|
||||
static void DegTyp_SeeDegreeTypes (Act_Action_t NextAction,Hie_Level_t Level,
|
||||
DegTyp_Order_t DefaultOrder)
|
||||
static void DegTyp_SeeDegTypes (Act_Action_t NextAction,Hie_Level_t Level,
|
||||
DegTyp_Order_t DefaultOrder)
|
||||
{
|
||||
DegTyp_Order_t SelectedOrder;
|
||||
struct DegTyp_DegTypes DegTypes;
|
||||
|
@ -164,13 +164,13 @@ static void DegTyp_SeeDegreeTypes (Act_Action_t NextAction,Hie_Level_t Level,
|
|||
SelectedOrder = DegTyp_GetParDegTypOrder (DefaultOrder);
|
||||
|
||||
/***** Get list of degree types *****/
|
||||
DegTyp_GetListDegreeTypes (&DegTypes,Level,SelectedOrder);
|
||||
DegTyp_GetListDegTypes (&DegTypes,Level,SelectedOrder);
|
||||
|
||||
/***** List degree types *****/
|
||||
DegTyp_ListDegreeTypes (&DegTypes,NextAction,Level,SelectedOrder);
|
||||
DegTyp_ListDegTypes (&DegTypes,NextAction,Level,SelectedOrder);
|
||||
|
||||
/***** Free list of degree types *****/
|
||||
DegTyp_FreeListDegreeTypes (&DegTypes);
|
||||
DegTyp_FreeListDegTypes (&DegTypes);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -192,10 +192,10 @@ static DegTyp_Order_t DegTyp_GetParDegTypOrder (DegTyp_Order_t DefaultOrder)
|
|||
// - center tab => NextAction = ActSeeDegTyp
|
||||
// - statistic tab => NextAction = ActSeeUseGbl
|
||||
|
||||
static void DegTyp_ListDegreeTypes (const struct DegTyp_DegTypes *DegTypes,
|
||||
Act_Action_t NextAction,
|
||||
Hie_Level_t Level,
|
||||
DegTyp_Order_t SelectedOrder)
|
||||
static void DegTyp_ListDegTypes (const struct DegTyp_DegTypes *DegTypes,
|
||||
Act_Action_t NextAction,
|
||||
Hie_Level_t Level,
|
||||
DegTyp_Order_t SelectedOrder)
|
||||
{
|
||||
extern const char *Hlp_CENTER_DegreeTypes;
|
||||
extern const char *Hlp_ANALYTICS_Figures_types_of_degree;
|
||||
|
@ -225,10 +225,10 @@ static void DegTyp_ListDegreeTypes (const struct DegTyp_DegTypes *DegTypes,
|
|||
HTM_TABLE_BeginWideMarginPadding (2);
|
||||
|
||||
/***** Write heading *****/
|
||||
DegTyp_PutHeadDegreeTypesForSeeing (NextAction,Level,SelectedOrder);
|
||||
DegTyp_PutHeadDegTypesForSeeing (NextAction,Level,SelectedOrder);
|
||||
|
||||
/***** List current degree types for seeing *****/
|
||||
DegTyp_ListDegreeTypesForSeeing (DegTypes);
|
||||
DegTyp_ListDegTypesForSeeing (DegTypes);
|
||||
|
||||
/***** End table *****/
|
||||
HTM_TABLE_End ();
|
||||
|
@ -244,29 +244,29 @@ static void DegTyp_ListDegreeTypes (const struct DegTyp_DegTypes *DegTypes,
|
|||
/************************ Put forms to edit degree types *********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void DegTyp_GetAndEditDegreeTypes (void)
|
||||
void DegTyp_GetAndEditDegTypes (void)
|
||||
{
|
||||
struct DegTyp_DegTypes DegTypes;
|
||||
|
||||
DegTyp_GetListDegreeTypes (&DegTypes,Hie_SYS,DegTyp_ORDER_BY_DEGREE_TYPE);
|
||||
DegTyp_EditDegreeTypes (&DegTypes);
|
||||
DegTyp_FreeListDegreeTypes (&DegTypes);
|
||||
DegTyp_GetListDegTypes (&DegTypes,Hie_SYS,DegTyp_ORDER_BY_DEG_TYPE);
|
||||
DegTyp_EditDegTypes (&DegTypes);
|
||||
DegTyp_FreeListDegTypes (&DegTypes);
|
||||
}
|
||||
|
||||
void DegTyp_EditDegreeTypes (const struct DegTyp_DegTypes *DegTypes)
|
||||
void DegTyp_EditDegTypes (const struct DegTyp_DegTypes *DegTypes)
|
||||
{
|
||||
DegTyp_EditingDegreeTypeConstructor ();
|
||||
DegTyp_EditDegreeTypesInternal (DegTypes);
|
||||
DegTyp_EditingDegreeTypeDestructor ();
|
||||
DegTyp_EditingDegTypeConstructor ();
|
||||
DegTyp_EditDegTypesInternal (DegTypes);
|
||||
DegTyp_EditingDegTypeDestructor ();
|
||||
}
|
||||
|
||||
static void DegTyp_EditDegreeTypesInternal (const struct DegTyp_DegTypes *DegTypes)
|
||||
static void DegTyp_EditDegTypesInternal (const struct DegTyp_DegTypes *DegTypes)
|
||||
{
|
||||
extern const char *Hlp_CENTER_DegreeTypes_edit;
|
||||
extern const char *Txt_Types_of_degree;
|
||||
|
||||
/***** Begin box *****/
|
||||
Box_BoxBegin (Txt_Types_of_degree,DegTyp_PutIconsEditingDegreeTypes,NULL,
|
||||
Box_BoxBegin (Txt_Types_of_degree,DegTyp_PutIconsEditingDegTypes,NULL,
|
||||
Hlp_CENTER_DegreeTypes_edit,Box_NOT_CLOSABLE);
|
||||
|
||||
/***** Put a form to create a new degree type *****/
|
||||
|
@ -274,7 +274,7 @@ static void DegTyp_EditDegreeTypesInternal (const struct DegTyp_DegTypes *DegTyp
|
|||
|
||||
/***** Forms to edit current degree types *****/
|
||||
if (DegTypes->Num)
|
||||
DegTyp_ListDegreeTypesForEdition (DegTypes);
|
||||
DegTyp_ListDegTypesForEdition (DegTypes);
|
||||
|
||||
/***** End box *****/
|
||||
Box_BoxEnd ();
|
||||
|
@ -284,7 +284,7 @@ static void DegTyp_EditDegreeTypesInternal (const struct DegTyp_DegTypes *DegTyp
|
|||
/************ Put contextual icons when editing degree types *****************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void DegTyp_PutIconsEditingDegreeTypes (__attribute__((unused)) void *Args)
|
||||
static void DegTyp_PutIconsEditingDegTypes (__attribute__((unused)) void *Args)
|
||||
{
|
||||
/***** Put icon to view degree types *****/
|
||||
Ico_PutContextualIconToView (ActSeeDegTyp,NULL,NULL,NULL);
|
||||
|
@ -300,7 +300,7 @@ static void DegTyp_PutIconsEditingDegreeTypes (__attribute__((unused)) void *Arg
|
|||
/******************* Put link (form) to view degree types ********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void DegTyp_PutIconToViewDegreeTypes (void)
|
||||
void DegTyp_PutIconToViewDegTypes (void)
|
||||
{
|
||||
Lay_PutContextualLinkOnlyIcon (ActSeeDegTyp,NULL,NULL,NULL,
|
||||
"sitemap.svg",Ico_BLACK);
|
||||
|
@ -310,7 +310,7 @@ void DegTyp_PutIconToViewDegreeTypes (void)
|
|||
/******************* List current degree types for seeing ********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void DegTyp_ListDegreeTypesForSeeing (const struct DegTyp_DegTypes *DegTypes)
|
||||
static void DegTyp_ListDegTypesForSeeing (const struct DegTyp_DegTypes *DegTypes)
|
||||
{
|
||||
unsigned NumDegTyp;
|
||||
const char *BgColor;
|
||||
|
@ -373,7 +373,7 @@ static void DegTyp_PutIconsListingDegTypes (__attribute__((unused)) void *Args)
|
|||
static void DegTyp_PutIconToEditDegTypes (__attribute__((unused)) void *Args)
|
||||
{
|
||||
if (Gbl.Hierarchy.Level == Hie_CTR && // Only editable if center tab is visible
|
||||
DegTyp_CheckIfICanCreateDegreeTypes () == Usr_CAN)
|
||||
DegTyp_CheckIfICanCreateDegTypes () == Usr_CAN)
|
||||
Ico_PutContextualIconToEdit (ActEdiDegTyp,NULL,NULL,NULL);
|
||||
}
|
||||
|
||||
|
@ -381,7 +381,7 @@ static void DegTyp_PutIconToEditDegTypes (__attribute__((unused)) void *Args)
|
|||
/******************* List current degree types for edition *******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void DegTyp_ListDegreeTypesForEdition (const struct DegTyp_DegTypes *DegTypes)
|
||||
static void DegTyp_ListDegTypesForEdition (const struct DegTyp_DegTypes *DegTypes)
|
||||
{
|
||||
unsigned NumDegTyp;
|
||||
|
||||
|
@ -389,7 +389,7 @@ static void DegTyp_ListDegreeTypesForEdition (const struct DegTyp_DegTypes *DegT
|
|||
HTM_TABLE_Begin ("TBL_SCROLL");
|
||||
|
||||
/***** Write heading *****/
|
||||
DegTyp_PutHeadDegreeTypesForEdition ();
|
||||
DegTyp_PutHeadDegTypesForEdition ();
|
||||
|
||||
/***** List degree types with forms for edition *****/
|
||||
for (NumDegTyp = 0;
|
||||
|
@ -442,7 +442,7 @@ static void DegTyp_ListDegreeTypesForEdition (const struct DegTyp_DegTypes *DegT
|
|||
/******************** Check if I can create degree types *********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
Usr_Can_t DegTyp_CheckIfICanCreateDegreeTypes (void)
|
||||
Usr_Can_t DegTyp_CheckIfICanCreateDegTypes (void)
|
||||
{
|
||||
return (Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM) ? Usr_CAN :
|
||||
Usr_CAN_NOT;
|
||||
|
@ -458,7 +458,7 @@ static void DegTyp_PutFormToCreateDegreeType (void)
|
|||
Frm_BeginFormTable (ActNewDegTyp,NULL,NULL,NULL,"TBL_SCROLL");
|
||||
|
||||
/***** Write heading *****/
|
||||
DegTyp_PutHeadDegreeTypesForEdition ();
|
||||
DegTyp_PutHeadDegTypesForEdition ();
|
||||
|
||||
/***** Begin table row *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
|
@ -494,17 +494,17 @@ static void DegTyp_PutFormToCreateDegreeType (void)
|
|||
/***************** Write header with fields of a degree type *****************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void DegTyp_PutHeadDegreeTypesForSeeing (Act_Action_t NextAction,
|
||||
Hie_Level_t Level,
|
||||
DegTyp_Order_t SelectedOrder)
|
||||
static void DegTyp_PutHeadDegTypesForSeeing (Act_Action_t NextAction,
|
||||
Hie_Level_t Level,
|
||||
DegTyp_Order_t SelectedOrder)
|
||||
{
|
||||
extern const char *Txt_DEGREE_TYPES_HELP_ORDER[DegTyp_NUM_ORDERS];
|
||||
extern const char *Txt_DEGREE_TYPES_ORDER[DegTyp_NUM_ORDERS];
|
||||
DegTyp_Order_t Order;
|
||||
static HTM_HeadAlign Align[DegTyp_NUM_ORDERS] =
|
||||
{
|
||||
[DegTyp_ORDER_BY_DEGREE_TYPE] = HTM_HEAD_LEFT,
|
||||
[DegTyp_ORDER_BY_NUM_DEGREES] = HTM_HEAD_RIGHT
|
||||
[DegTyp_ORDER_BY_DEG_TYPE] = HTM_HEAD_LEFT,
|
||||
[DegTyp_ORDER_BY_NUM_DEGS] = HTM_HEAD_RIGHT
|
||||
};
|
||||
struct Fig_Figures Figures;
|
||||
|
||||
|
@ -551,7 +551,7 @@ static void DegTyp_PutHeadDegreeTypesForSeeing (Act_Action_t NextAction,
|
|||
/***************** Write header with fields of a degree type *****************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void DegTyp_PutHeadDegreeTypesForEdition (void)
|
||||
static void DegTyp_PutHeadDegTypesForEdition (void)
|
||||
{
|
||||
extern const char *Txt_Code;
|
||||
extern const char *Txt_Type_of_degree;
|
||||
|
@ -571,8 +571,8 @@ static void DegTyp_PutHeadDegreeTypesForEdition (void)
|
|||
/****************** Create a list with all degree types **********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void DegTyp_GetListDegreeTypes (struct DegTyp_DegTypes *DegTypes,
|
||||
Hie_Level_t Level,DegTyp_Order_t Order)
|
||||
void DegTyp_GetListDegTypes (struct DegTyp_DegTypes *DegTypes,
|
||||
Hie_Level_t Level,DegTyp_Order_t Order)
|
||||
{
|
||||
MYSQL_RES *mysql_res;
|
||||
MYSQL_ROW row;
|
||||
|
@ -587,7 +587,7 @@ void DegTyp_GetListDegreeTypes (struct DegTyp_DegTypes *DegTypes,
|
|||
{
|
||||
/***** Create a list of degree types *****/
|
||||
if ((DegTypes->Lst = calloc ((size_t) DegTypes->Num,
|
||||
sizeof (struct DegTyp_DegreeType))) == NULL)
|
||||
sizeof (struct DegTyp_DegType))) == NULL)
|
||||
Err_NotEnoughMemoryExit ();
|
||||
|
||||
/***** Get degree types *****/
|
||||
|
@ -620,7 +620,7 @@ void DegTyp_GetListDegreeTypes (struct DegTyp_DegTypes *DegTypes,
|
|||
/********* Free list of degree types and list of degrees of each type ********/
|
||||
/*****************************************************************************/
|
||||
|
||||
void DegTyp_FreeListDegreeTypes (struct DegTyp_DegTypes *DegTypes)
|
||||
void DegTyp_FreeListDegTypes (struct DegTyp_DegTypes *DegTypes)
|
||||
{
|
||||
/***** Free memory used by the list of degree types *****/
|
||||
if (DegTypes->Num && DegTypes->Lst)
|
||||
|
@ -635,14 +635,14 @@ void DegTyp_FreeListDegreeTypes (struct DegTyp_DegTypes *DegTypes)
|
|||
/***************** Receive form to create a new degree type ******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void DegTyp_ReceiveNewDegreeType (void)
|
||||
void DegTyp_ReceiveNewDegTyp (void)
|
||||
{
|
||||
extern const char *Txt_The_type_of_degree_X_already_exists;
|
||||
extern const char *Txt_Created_new_type_of_degree_X;
|
||||
extern const char *Txt_You_must_specify_the_name;
|
||||
|
||||
/***** Degree type constructor *****/
|
||||
DegTyp_EditingDegreeTypeConstructor ();
|
||||
DegTyp_EditingDegTypeConstructor ();
|
||||
|
||||
/***** Get parameters from form *****/
|
||||
/* Get the name of degree type */
|
||||
|
@ -672,19 +672,19 @@ void DegTyp_ReceiveNewDegreeType (void)
|
|||
/**************************** Remove a degree type ***************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void DegTyp_RemoveDegreeType (void)
|
||||
void DegTyp_RemoveDegTyp (void)
|
||||
{
|
||||
extern const char *Txt_To_remove_a_type_of_degree_you_must_first_remove_all_degrees_of_that_type;
|
||||
extern const char *Txt_Type_of_degree_X_removed;
|
||||
|
||||
/***** Degree type constructor *****/
|
||||
DegTyp_EditingDegreeTypeConstructor ();
|
||||
DegTyp_EditingDegTypeConstructor ();
|
||||
|
||||
/***** Get the code of the degree type *****/
|
||||
DegTyp_EditingDegTyp->DegTypCod = ParCod_GetAndCheckPar (ParCod_OthDegTyp);
|
||||
|
||||
/***** Get data of the degree type from database *****/
|
||||
if (!DegTyp_GetDegreeTypeDataByCod (DegTyp_EditingDegTyp))
|
||||
if (!DegTyp_GetDegTypeDataByCod (DegTyp_EditingDegTyp))
|
||||
Err_WrongDegTypExit ();
|
||||
|
||||
/***** Check if this degree type has degrees *****/
|
||||
|
@ -694,7 +694,7 @@ void DegTyp_RemoveDegreeType (void)
|
|||
else // Degree type has no degrees => remove it
|
||||
{
|
||||
/***** Remove degree type *****/
|
||||
DegTyp_RemoveDegreeTypeCompletely (DegTyp_EditingDegTyp->DegTypCod);
|
||||
DegTyp_RemoveDegTypeCompletely (DegTyp_EditingDegTyp->DegTypCod);
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
Ale_CreateAlert (Ale_SUCCESS,NULL,
|
||||
|
@ -717,7 +717,7 @@ static void DegTyp_PutParOtherDegTypCod (void *DegTypCod)
|
|||
/****************** Get data of a degree type from its code ******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
bool DegTyp_GetDegreeTypeDataByCod (struct DegTyp_DegreeType *DegTyp)
|
||||
bool DegTyp_GetDegTypeDataByCod (struct DegTyp_DegType *DegTyp)
|
||||
{
|
||||
/***** Trivial check: code of degree type should be >= 0 *****/
|
||||
if (DegTyp->DegTypCod <= 0)
|
||||
|
@ -745,7 +745,7 @@ bool DegTyp_GetDegreeTypeDataByCod (struct DegTyp_DegreeType *DegTyp)
|
|||
/******************** Remove a degree type and its degrees *******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void DegTyp_RemoveDegreeTypeCompletely (long DegTypCod)
|
||||
static void DegTyp_RemoveDegTypeCompletely (long DegTypCod)
|
||||
{
|
||||
MYSQL_RES *mysql_res;
|
||||
unsigned NumDegs;
|
||||
|
@ -779,7 +779,7 @@ static void DegTyp_RemoveDegreeTypeCompletely (long DegTypCod)
|
|||
/**************************** Rename a degree type ***************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void DegTyp_RenameDegreeType (void)
|
||||
void DegTyp_RenameDegTyp (void)
|
||||
{
|
||||
extern const char *Txt_The_type_of_degree_X_already_exists;
|
||||
extern const char *Txt_The_type_of_degree_X_has_been_renamed_as_Y;
|
||||
|
@ -787,7 +787,7 @@ void DegTyp_RenameDegreeType (void)
|
|||
char NewNameDegTyp[DegTyp_MAX_BYTES_DEGREE_TYPE_NAME + 1];
|
||||
|
||||
/***** Degree type constructor *****/
|
||||
DegTyp_EditingDegreeTypeConstructor ();
|
||||
DegTyp_EditingDegTypeConstructor ();
|
||||
|
||||
/***** Get parameters from form *****/
|
||||
/* Get the code of the degree type */
|
||||
|
@ -797,7 +797,7 @@ void DegTyp_RenameDegreeType (void)
|
|||
Par_GetParText ("DegTypName",NewNameDegTyp,DegTyp_MAX_BYTES_DEGREE_TYPE_NAME);
|
||||
|
||||
/***** Get from the database the old name of the degree type *****/
|
||||
if (!DegTyp_GetDegreeTypeDataByCod (DegTyp_EditingDegTyp))
|
||||
if (!DegTyp_GetDegTypeDataByCod (DegTyp_EditingDegTyp))
|
||||
Err_WrongDegTypExit ();
|
||||
|
||||
/***** Check if new name is empty *****/
|
||||
|
@ -849,19 +849,19 @@ void DegTyp_ContEditAfterChgDegTyp (void)
|
|||
Ale_ShowAlerts (NULL);
|
||||
|
||||
/***** Show the form again *****/
|
||||
DegTyp_GetListDegreeTypes (&DegTypes,Hie_SYS,DegTyp_ORDER_BY_DEGREE_TYPE);
|
||||
DegTyp_EditDegreeTypesInternal (&DegTypes);
|
||||
DegTyp_FreeListDegreeTypes (&DegTypes);
|
||||
DegTyp_GetListDegTypes (&DegTypes,Hie_SYS,DegTyp_ORDER_BY_DEG_TYPE);
|
||||
DegTyp_EditDegTypesInternal (&DegTypes);
|
||||
DegTyp_FreeListDegTypes (&DegTypes);
|
||||
|
||||
/***** Degree type destructor *****/
|
||||
DegTyp_EditingDegreeTypeDestructor ();
|
||||
DegTyp_EditingDegTypeDestructor ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/********************* Degree type constructor/destructor ********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void DegTyp_EditingDegreeTypeConstructor (void)
|
||||
static void DegTyp_EditingDegTypeConstructor (void)
|
||||
{
|
||||
/***** Pointer must be NULL *****/
|
||||
if (DegTyp_EditingDegTyp != NULL)
|
||||
|
@ -877,7 +877,7 @@ static void DegTyp_EditingDegreeTypeConstructor (void)
|
|||
DegTyp_EditingDegTyp->NumDegs = 0;
|
||||
}
|
||||
|
||||
static void DegTyp_EditingDegreeTypeDestructor (void)
|
||||
static void DegTyp_EditingDegTypeDestructor (void)
|
||||
{
|
||||
/***** Free memory used for degree type *****/
|
||||
if (DegTyp_EditingDegTyp != NULL)
|
||||
|
@ -891,8 +891,8 @@ static void DegTyp_EditingDegreeTypeDestructor (void)
|
|||
/****************** Get and show stats about institutions ********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void DegTyp_GetAndShowDegreeTypesStats (void)
|
||||
void DegTyp_GetAndShowDegTypesStats (void)
|
||||
{
|
||||
/***** Show statistic about number of degrees in each type of degree *****/
|
||||
DegTyp_SeeDegreeTypesInStaTab ();
|
||||
DegTyp_SeeDegTypesInStaTab ();
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
/******************************* Public types ********************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
struct DegTyp_DegreeType
|
||||
struct DegTyp_DegType
|
||||
{
|
||||
long DegTypCod; // Degree type code
|
||||
char DegTypName[DegTyp_MAX_BYTES_DEGREE_TYPE_NAME + 1]; // Degree type name
|
||||
|
@ -49,46 +49,46 @@ struct DegTyp_DegreeType
|
|||
|
||||
struct DegTyp_DegTypes
|
||||
{
|
||||
unsigned Num; // Number of degree types
|
||||
struct DegTyp_DegreeType *Lst; // List of degree types
|
||||
unsigned Num; // Number of degree types
|
||||
struct DegTyp_DegType *Lst; // List of degree types
|
||||
};
|
||||
|
||||
#define DegTyp_NUM_ORDERS 2
|
||||
typedef enum
|
||||
{
|
||||
DegTyp_ORDER_BY_DEGREE_TYPE = 0,
|
||||
DegTyp_ORDER_BY_NUM_DEGREES = 1,
|
||||
DegTyp_ORDER_BY_DEG_TYPE = 0,
|
||||
DegTyp_ORDER_BY_NUM_DEGS = 1,
|
||||
} DegTyp_Order_t;
|
||||
|
||||
/*****************************************************************************/
|
||||
/***************************** Public prototypes *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void DegTyp_WriteSelectorDegreeTypes (long SelectedDegTypCod);
|
||||
void DegTyp_WriteSelectorDegTypes (long SelectedDegTypCod);
|
||||
|
||||
void DegTyp_SeeDegreeTypesInDegTab (void);
|
||||
void DegTyp_SeeDegreeTypesInStaTab (void);
|
||||
void DegTyp_GetAndEditDegreeTypes (void);
|
||||
void DegTyp_EditDegreeTypes (const struct DegTyp_DegTypes *DegTypes);
|
||||
void DegTyp_SeeDegTypesInDegTab (void);
|
||||
void DegTyp_SeeDegTypesInStaTab (void);
|
||||
void DegTyp_GetAndEditDegTypes (void);
|
||||
void DegTyp_EditDegTypes (const struct DegTyp_DegTypes *DegTypes);
|
||||
|
||||
void DegTyp_PutIconToViewDegreeTypes (void);
|
||||
void DegTyp_PutIconToViewDegTypes (void);
|
||||
|
||||
Usr_Can_t DegTyp_CheckIfICanCreateDegreeTypes (void);
|
||||
Usr_Can_t DegTyp_CheckIfICanCreateDegTypes (void);
|
||||
|
||||
void DegTyp_GetListDegreeTypes (struct DegTyp_DegTypes *DegTypes,
|
||||
Hie_Level_t Level,DegTyp_Order_t Order);
|
||||
void DegTyp_FreeListDegreeTypes (struct DegTyp_DegTypes *DegTypes);
|
||||
void DegTyp_GetListDegTypes (struct DegTyp_DegTypes *DegTypes,
|
||||
Hie_Level_t Level,DegTyp_Order_t Order);
|
||||
void DegTyp_FreeListDegTypes (struct DegTyp_DegTypes *DegTypes);
|
||||
|
||||
void DegTyp_ReceiveNewDegreeType (void);
|
||||
void DegTyp_ReceiveNewDegTyp (void);
|
||||
|
||||
void DegTyp_RemoveDegreeType (void);
|
||||
void DegTyp_RemoveDegTyp (void);
|
||||
|
||||
bool DegTyp_GetDegreeTypeDataByCod (struct DegTyp_DegreeType *DegTyp);
|
||||
void DegTyp_RenameDegreeType (void);
|
||||
bool DegTyp_GetDegTypeDataByCod (struct DegTyp_DegType *DegTyp);
|
||||
void DegTyp_RenameDegTyp (void);
|
||||
|
||||
void DegTyp_ContEditAfterChgDegTyp (void);
|
||||
|
||||
//-------------------------------- Figures ------------------------------------
|
||||
void DegTyp_GetAndShowDegreeTypesStats (void);
|
||||
void DegTyp_GetAndShowDegTypesStats (void);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -614,7 +614,7 @@ void Dpt_ChangeDepartIns (void)
|
|||
/******************* Change the short name of a department *******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Dpt_RenameDepartShort (void)
|
||||
void Dpt_RenameDepartShrt (void)
|
||||
{
|
||||
/***** Department constructor *****/
|
||||
Dpt_EditingDepartmentConstructor ();
|
||||
|
@ -709,7 +709,7 @@ static void Dpt_RenameDepartment (Nam_ShrtOrFullName_t ShrtOrFull)
|
|||
void Dpt_ChangeDptWWW (void)
|
||||
{
|
||||
extern const char *Txt_The_new_web_address_is_X;
|
||||
char NewWWW[Cns_MAX_BYTES_WWW + 1];
|
||||
char NewWWW[WWW_MAX_BYTES_WWW + 1];
|
||||
|
||||
/***** Department constructor *****/
|
||||
Dpt_EditingDepartmentConstructor ();
|
||||
|
@ -719,7 +719,7 @@ void Dpt_ChangeDptWWW (void)
|
|||
Dpt_EditingDpt->DptCod = ParCod_GetAndCheckPar (ParCod_Dpt);
|
||||
|
||||
/* Get the new WWW for the department */
|
||||
Par_GetParText ("WWW",NewWWW,Cns_MAX_BYTES_WWW);
|
||||
Par_GetParText ("WWW",NewWWW,WWW_MAX_BYTES_WWW);
|
||||
|
||||
/***** Get data of the department from database *****/
|
||||
Dpt_GetDepartmentDataByCod (Dpt_EditingDpt);
|
||||
|
@ -878,7 +878,7 @@ void Dpt_ReceiveNewDpt (void)
|
|||
Nam_GetParsShrtAndFullName (Names);
|
||||
|
||||
/* Get department WWW */
|
||||
Par_GetParText ("WWW",Dpt_EditingDpt->WWW,Cns_MAX_BYTES_WWW);
|
||||
Par_GetParText ("WWW",Dpt_EditingDpt->WWW,WWW_MAX_BYTES_WWW);
|
||||
|
||||
if (Dpt_EditingDpt->ShrtName[0] &&
|
||||
Dpt_EditingDpt->FullName[0]) // If there's a department name
|
||||
|
|
|
@ -39,7 +39,7 @@ struct Dpt_Department
|
|||
long InsCod;
|
||||
char ShrtName[Nam_MAX_BYTES_SHRT_NAME + 1];
|
||||
char FullName[Nam_MAX_BYTES_FULL_NAME + 1];
|
||||
char WWW[Cns_MAX_BYTES_WWW + 1];
|
||||
char WWW[WWW_MAX_BYTES_WWW + 1];
|
||||
unsigned NumTchs; // Non-editing teachers and teachers
|
||||
};
|
||||
|
||||
|
@ -68,7 +68,7 @@ void Dpt_FreeListDepartments (struct Dpt_Departments *Departments);
|
|||
void Dpt_GetDepartmentDataByCod (struct Dpt_Department *Dpt);
|
||||
void Dpt_RemoveDepartment (void);
|
||||
void Dpt_ChangeDepartIns (void);
|
||||
void Dpt_RenameDepartShort (void);
|
||||
void Dpt_RenameDepartShrt (void);
|
||||
void Dpt_RenameDepartFull (void);
|
||||
void Dpt_ChangeDptWWW (void);
|
||||
void Dpt_ContEditAfterChgDpt (void);
|
||||
|
|
|
@ -242,7 +242,7 @@ void Dpt_DB_UpdateDptName (long DptCod,
|
|||
/**************** Update the table changing old WWW by new WWW ***************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Dpt_DB_UpdateDptWWW (long DptCod,char NewWWW[Cns_MAX_BYTES_WWW + 1])
|
||||
void Dpt_DB_UpdateDptWWW (long DptCod,char NewWWW[WWW_MAX_BYTES_WWW + 1])
|
||||
{
|
||||
DB_QueryUPDATE ("can not update the web of a department",
|
||||
"UPDATE dpt_departments"
|
||||
|
|
|
@ -50,7 +50,7 @@ unsigned Dpt_DB_GetNumTchsCurrentInsInDepartment (long DptCod);
|
|||
void Dpt_DB_UpdateDptIns (long DptCod,long NewInsCod);
|
||||
void Dpt_DB_UpdateDptName (long DptCod,
|
||||
const char *FldName,const char *NewDptName);
|
||||
void Dpt_DB_UpdateDptWWW (long DptCod,char NewWWW[Cns_MAX_BYTES_WWW + 1]);
|
||||
void Dpt_DB_UpdateDptWWW (long DptCod,char NewWWW[WWW_MAX_BYTES_WWW + 1]);
|
||||
|
||||
void Dpt_DB_RemoveDepartment (long DptCod);
|
||||
|
||||
|
|
|
@ -653,7 +653,7 @@ void Err_ShowErrorAndExit (const char *Txt)
|
|||
/***** End the output *****/
|
||||
if (!Gbl.Layout.HTMLEndWritten)
|
||||
{
|
||||
if (Act_GetBrowserTab (Gbl.Action.Act) == Act_1ST_TAB)
|
||||
if (Act_GetBrowserTab (Gbl.Action.Act) == Act_1ST)
|
||||
Lay_WriteAboutZone ();
|
||||
|
||||
HTM_Txt ("</body>\n"
|
||||
|
|
|
@ -220,7 +220,7 @@ void Fig_ShowFigures (void)
|
|||
[Fig_USERS_RANKING ] = Usr_GetAndShowUsersRanking,
|
||||
[Fig_HIERARCHY ] = Hie_GetAndShowHierarchyStats,
|
||||
[Fig_INSTITS ] = Ins_GetAndShowInstitutionsStats,
|
||||
[Fig_DEGREE_TYPES ] = DegTyp_GetAndShowDegreeTypesStats,
|
||||
[Fig_DEGREE_TYPES ] = DegTyp_GetAndShowDegTypesStats,
|
||||
[Fig_FOLDERS_AND_FILES] = Brw_GetAndShowFileBrowsersStats,
|
||||
[Fig_OER ] = Brw_GetAndShowOERsStats,
|
||||
[Fig_COURSE_PROGRAMS ] = Prg_GetAndShowCourseProgramStats,
|
||||
|
|
|
@ -135,14 +135,14 @@ static void Frm_BeginFormInternal (Act_Action_t NextAction,bool PutParLocationIf
|
|||
HTM_TxtF (" onsubmit=\"%s\"",OnSubmit);
|
||||
switch (Act_GetBrowserTab (NextAction))
|
||||
{
|
||||
case Act_NEW_TAB:
|
||||
case Act_DWN_FIL:
|
||||
case Act_NEW:
|
||||
case Act_DWN:
|
||||
HTM_Txt (" target=\"_blank\"");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (Act_GetContentType (NextAction) == Act_CONT_DATA)
|
||||
if (Act_GetContentType (NextAction) == Act_DATA)
|
||||
HTM_Txt (" enctype=\"multipart/form-data\"");
|
||||
HTM_Txt (" accept-charset=\"windows-1252\">");
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
/********************************** Headers **********************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#include "swad_action.h"
|
||||
#include "swad_action_list.h"
|
||||
#include "swad_button.h"
|
||||
#include "swad_constant.h"
|
||||
#include "swad_cryptography.h"
|
||||
|
|
|
@ -258,7 +258,7 @@ void Gbl_Cleanup (void)
|
|||
|
||||
if (!Gbl.Action.UsesAJAX &&
|
||||
!Gbl.WebService.IsWebService &&
|
||||
Act_GetBrowserTab (Gbl.Action.Act) == Act_1ST_TAB)
|
||||
Act_GetBrowserTab (Gbl.Action.Act) == Act_1ST)
|
||||
Ses_DB_RemovePar ();
|
||||
|
||||
Hie_FreeMyHierarchy ();
|
||||
|
|
|
@ -126,7 +126,7 @@ struct Globals
|
|||
bool Logged;
|
||||
bool MyPhotoExists;
|
||||
unsigned NumAccWithoutPhoto;
|
||||
char PhotoURL[Cns_MAX_BYTES_WWW + 1];
|
||||
char PhotoURL[WWW_MAX_BYTES_WWW + 1];
|
||||
time_t TimeLastAccToThisFileBrowser;
|
||||
bool ConfirmEmailJustSent; // An email to confirm my email address has just been sent
|
||||
struct
|
||||
|
|
|
@ -154,7 +154,7 @@ void HieCfg_Name (Frm_PutForm_t PutForm,Hie_Level_t Level,
|
|||
/*****************************************************************************/
|
||||
|
||||
void HieCfg_WWW (Vie_ViewType_t ViewType,Frm_PutForm_t PutForm,
|
||||
Act_Action_t NextAction,const char WWW[Cns_MAX_BYTES_WWW + 1])
|
||||
Act_Action_t NextAction,const char WWW[WWW_MAX_BYTES_WWW + 1])
|
||||
{
|
||||
extern const char *Txt_Web;
|
||||
static const char *Id[Frm_NUM_PUT_FORM] =
|
||||
|
|
|
@ -47,7 +47,7 @@ void HieCfg_Title (Hie_PutLink_t PutLink,Hie_Level_t Level);
|
|||
void HieCfg_Name (Frm_PutForm_t PutForm,Hie_Level_t Level,
|
||||
Nam_ShrtOrFullName_t ShrtOrFull);
|
||||
void HieCfg_WWW (Vie_ViewType_t ViewType,Frm_PutForm_t PutForm,
|
||||
Act_Action_t NextAction,const char WWW[Cns_MAX_BYTES_WWW + 1]);
|
||||
Act_Action_t NextAction,const char WWW[WWW_MAX_BYTES_WWW + 1]);
|
||||
void HieCfg_Shortcut (Vie_ViewType_t ViewType,ParCod_Param_t ParCode,long HieCod);
|
||||
void HieCfg_NumCtrs (unsigned NumCtrs,Frm_PutForm_t PutForm);
|
||||
void HieCfg_NumCtrsWithMap (unsigned NumCtrs,unsigned NumCtrsWithMap);
|
||||
|
|
|
@ -27,10 +27,10 @@
|
|||
/********************************* Headers ***********************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#include "swad_constant.h"
|
||||
#include "swad_name.h"
|
||||
#include "swad_role_type.h"
|
||||
#include "swad_string.h"
|
||||
#include "swad_www.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
/******************************* Public types ********************************/
|
||||
|
@ -95,7 +95,7 @@ struct Hie_Node
|
|||
char InstitutionalCod[Hie_MAX_BYTES_INSTITUTIONAL_COD + 1]; // Institutional code of the node
|
||||
char ShrtName[Nam_MAX_BYTES_SHRT_NAME + 1]; // Short name of the node
|
||||
char FullName[Nam_MAX_BYTES_FULL_NAME + 1]; // Full name of the node
|
||||
char WWW[Cns_MAX_BYTES_WWW + 1];
|
||||
char WWW[WWW_MAX_BYTES_WWW + 1];
|
||||
struct
|
||||
{
|
||||
bool Valid;
|
||||
|
|
|
@ -150,7 +150,7 @@ void Ind_ReqIndicatorsCourses (void)
|
|||
|
||||
/* Data */
|
||||
HTM_TD_Begin ("class=\"Frm_C2 LT DAT_%s\"",The_GetSuffix ());
|
||||
DegTyp_WriteSelectorDegreeTypes (Indicators.DegTypCod);
|
||||
DegTyp_WriteSelectorDegTypes (Indicators.DegTypCod);
|
||||
HTM_Txt (" (");
|
||||
HTM_TxtF (Txt_only_if_the_scope_is_X,Cfg_PLATFORM_SHORT_NAME);
|
||||
HTM_Txt (")");
|
||||
|
|
12
swad_info.c
12
swad_info.c
|
@ -680,7 +680,7 @@ static bool Inf_CheckURL (long CrsCod,Inf_Type_t InfoType)
|
|||
/***** Check if file with URL exists *****/
|
||||
if ((FileURL = fopen (PathFile,"rb")))
|
||||
{
|
||||
if (fgets (Gbl.Crs.Info.URL,Cns_MAX_BYTES_WWW,FileURL) == NULL)
|
||||
if (fgets (Gbl.Crs.Info.URL,WWW_MAX_BYTES_WWW,FileURL) == NULL)
|
||||
Gbl.Crs.Info.URL[0] = '\0';
|
||||
/* File is not longer needed ==> close it */
|
||||
fclose (FileURL);
|
||||
|
@ -709,7 +709,7 @@ static bool Inf_CheckAndShowURL (void)
|
|||
/***** Check if file with URL exists *****/
|
||||
if ((FileURL = fopen (PathFile,"rb")))
|
||||
{
|
||||
if (fgets (Gbl.Crs.Info.URL,Cns_MAX_BYTES_WWW,FileURL) == NULL)
|
||||
if (fgets (Gbl.Crs.Info.URL,WWW_MAX_BYTES_WWW,FileURL) == NULL)
|
||||
Gbl.Crs.Info.URL[0] = '\0';
|
||||
/* File is not longer needed ==> close it */
|
||||
fclose (FileURL);
|
||||
|
@ -740,7 +740,7 @@ static void Inf_BuildPathURL (long CrsCod,Inf_Type_t InfoType,
|
|||
/*****************************************************************************/
|
||||
// This function is called only from web service
|
||||
|
||||
void Inf_WriteURLIntoTxtBuffer (char TxtBuffer[Cns_MAX_BYTES_WWW + 1])
|
||||
void Inf_WriteURLIntoTxtBuffer (char TxtBuffer[WWW_MAX_BYTES_WWW + 1])
|
||||
{
|
||||
char PathFile[PATH_MAX + 1];
|
||||
FILE *FileURL;
|
||||
|
@ -755,7 +755,7 @@ void Inf_WriteURLIntoTxtBuffer (char TxtBuffer[Cns_MAX_BYTES_WWW + 1])
|
|||
/***** Check if file with URL exists *****/
|
||||
if ((FileURL = fopen (PathFile,"rb")))
|
||||
{
|
||||
if (fgets (TxtBuffer,Cns_MAX_BYTES_WWW,FileURL) == NULL)
|
||||
if (fgets (TxtBuffer,WWW_MAX_BYTES_WWW,FileURL) == NULL)
|
||||
TxtBuffer[0] = '\0';
|
||||
/* File is not longer needed ==> close it */
|
||||
fclose (FileURL);
|
||||
|
@ -1073,7 +1073,7 @@ void Inf_FormToSendURL (struct Syl_Syllabus *Syllabus,Inf_Src_t InfoSrc)
|
|||
/***** Link *****/
|
||||
if ((FileURL = fopen (PathFile,"rb")) != NULL)
|
||||
{
|
||||
if (fgets (Gbl.Crs.Info.URL,Cns_MAX_BYTES_WWW,FileURL) == NULL)
|
||||
if (fgets (Gbl.Crs.Info.URL,WWW_MAX_BYTES_WWW,FileURL) == NULL)
|
||||
Gbl.Crs.Info.URL[0] = '\0';
|
||||
/* File is not longer needed. Close it */
|
||||
fclose (FileURL);
|
||||
|
@ -1754,7 +1754,7 @@ void Inf_ReceiveURLInfo (void)
|
|||
Inf_AsignInfoType (&Gbl.Crs.Info,&Syllabus);
|
||||
|
||||
/***** Get parameter with URL *****/
|
||||
Par_GetParText ("InfoSrcURL",Gbl.Crs.Info.URL,Cns_MAX_BYTES_WWW);
|
||||
Par_GetParText ("InfoSrcURL",Gbl.Crs.Info.URL,WWW_MAX_BYTES_WWW);
|
||||
|
||||
/***** Build path to file containing URL *****/
|
||||
Inf_BuildPathURL (Gbl.Hierarchy.Node[Hie_CRS].HieCod,Gbl.Crs.Info.Type,
|
||||
|
|
|
@ -63,7 +63,7 @@ typedef enum
|
|||
struct Inf_Info
|
||||
{
|
||||
Inf_Type_t Type;
|
||||
char URL[Cns_MAX_BYTES_WWW + 1];
|
||||
char URL[WWW_MAX_BYTES_WWW + 1];
|
||||
bool MustBeRead[Inf_NUM_TYPES]; // Students must read info?
|
||||
bool ShowMsgMustBeRead;
|
||||
};
|
||||
|
@ -85,7 +85,7 @@ void Inf_ChangeForceReadInfo (void);
|
|||
void Inf_ChangeIHaveReadInfo (void);
|
||||
bool Inf_GetIfIMustReadAnyCrsInfoInThisCrs (void);
|
||||
void Inf_BuildPathPage (long CrsCod,Inf_Type_t InfoType,char PathDir[PATH_MAX + 1]);
|
||||
void Inf_WriteURLIntoTxtBuffer (char TxtBuffer[Cns_MAX_BYTES_WWW + 1]);
|
||||
void Inf_WriteURLIntoTxtBuffer (char TxtBuffer[WWW_MAX_BYTES_WWW + 1]);
|
||||
void Inf_SetInfoSrc (void);
|
||||
void Inf_FormsToSelSendInfo (void);
|
||||
void Inf_FormToEnterIntegratedEditor (struct Syl_Syllabus *Syllabus,Inf_Src_t InfoSrc);
|
||||
|
|
|
@ -880,7 +880,7 @@ static void Ins_ListInstitutionsForEdition (void)
|
|||
};
|
||||
unsigned NumIns;
|
||||
struct Hie_Node *Ins;
|
||||
char WWW[Cns_MAX_BYTES_WWW + 1];
|
||||
char WWW[WWW_MAX_BYTES_WWW + 1];
|
||||
struct Usr_Data UsrDat;
|
||||
Usr_Can_t ICanEdit;
|
||||
unsigned NumCtrs;
|
||||
|
@ -1215,7 +1215,7 @@ void Ins_ChangeInsWWW (void)
|
|||
{
|
||||
extern bool (*Hie_GetDataByCod[Hie_NUM_LEVELS]) (struct Hie_Node *Node);
|
||||
extern const char *Txt_The_new_web_address_is_X;
|
||||
char NewWWW[Cns_MAX_BYTES_WWW + 1];
|
||||
char NewWWW[WWW_MAX_BYTES_WWW + 1];
|
||||
|
||||
/***** Institution constructor *****/
|
||||
Ins_EditingInstitutionConstructor ();
|
||||
|
@ -1225,7 +1225,7 @@ void Ins_ChangeInsWWW (void)
|
|||
Ins_EditingIns->HieCod = ParCod_GetAndCheckPar (ParCod_OthHie);
|
||||
|
||||
/* Get the new WWW for the institution */
|
||||
Par_GetParText ("WWW",NewWWW,Cns_MAX_BYTES_WWW);
|
||||
Par_GetParText ("WWW",NewWWW,WWW_MAX_BYTES_WWW);
|
||||
|
||||
/***** Get data of institution *****/
|
||||
Hie_GetDataByCod[Hie_INS] (Ins_EditingIns);
|
||||
|
@ -1477,7 +1477,7 @@ static void Ins_ReceiveRequestOrCreateIns (Hie_Status_t Status)
|
|||
Nam_GetParsShrtAndFullName (Names);
|
||||
|
||||
/* Get institution URL */
|
||||
Par_GetParText ("WWW",Ins_EditingIns->WWW,Cns_MAX_BYTES_WWW);
|
||||
Par_GetParText ("WWW",Ins_EditingIns->WWW,WWW_MAX_BYTES_WWW);
|
||||
|
||||
if (Ins_EditingIns->ShrtName[0] &&
|
||||
Ins_EditingIns->FullName[0]) // If there's a institution name
|
||||
|
|
|
@ -557,11 +557,11 @@ void InsCfg_RenameInsFull (void)
|
|||
void InsCfg_ChangeInsWWW (void)
|
||||
{
|
||||
extern const char *Txt_The_new_web_address_is_X;
|
||||
char NewWWW[Cns_MAX_BYTES_WWW + 1];
|
||||
char NewWWW[WWW_MAX_BYTES_WWW + 1];
|
||||
|
||||
/***** Get parameters from form *****/
|
||||
/* Get the new WWW for the institution */
|
||||
Par_GetParText ("WWW",NewWWW,Cns_MAX_BYTES_WWW);
|
||||
Par_GetParText ("WWW",NewWWW,WWW_MAX_BYTES_WWW);
|
||||
|
||||
/***** Check if new WWW is empty *****/
|
||||
if (NewWWW[0])
|
||||
|
|
|
@ -112,7 +112,7 @@ void Ins_DB_UpdateInsName (long HieCod,const char *FldName,const char *NewName)
|
|||
/**************** Update database changing old WWW by new WWW ****************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Ins_DB_UpdateInsWWW (long HieCod,const char NewWWW[Cns_MAX_BYTES_WWW + 1])
|
||||
void Ins_DB_UpdateInsWWW (long HieCod,const char NewWWW[WWW_MAX_BYTES_WWW + 1])
|
||||
{
|
||||
/***** Update database changing old WWW by new WWW *****/
|
||||
DB_QueryUPDATE ("can not update the web of an institution",
|
||||
|
|
|
@ -41,7 +41,7 @@ long Ins_DB_CreateInstitution (const struct Hie_Node *Ins,Hie_Status_t Status);
|
|||
void Ins_DB_UpdateInsCty (long HieCod,long CtyCod);
|
||||
void Ins_DB_UpdateInsStatus (long HieCod,Hie_Status_t Status);
|
||||
void Ins_DB_UpdateInsName (long HieCod,const char *FldName,const char *NewName);
|
||||
void Ins_DB_UpdateInsWWW (long HieCod,const char NewWWW[Cns_MAX_BYTES_WWW + 1]);
|
||||
void Ins_DB_UpdateInsWWW (long HieCod,const char NewWWW[WWW_MAX_BYTES_WWW + 1]);
|
||||
|
||||
unsigned Ins_DB_GetInsDataByCod (MYSQL_RES **mysql_res,long HieCod);
|
||||
void Ins_DB_GetInsShrtName (long HieCod,char ShrtName[Nam_MAX_BYTES_SHRT_NAME + 1]);
|
||||
|
|
|
@ -158,8 +158,8 @@ void Lay_WriteStartOfPage (void)
|
|||
BrowserTab = Act_GetBrowserTab (Gbl.Action.Act);
|
||||
switch (BrowserTab)
|
||||
{
|
||||
case Act_NEW_TAB:
|
||||
case Act_2ND_TAB:
|
||||
case Act_NEW:
|
||||
case Act_2ND:
|
||||
Gbl.Prefs.Theme = The_THEME_WHITE; // In a new tab, use white background
|
||||
break;
|
||||
default:
|
||||
|
@ -281,7 +281,7 @@ void Lay_WriteStartOfPage (void)
|
|||
/***** HTML body *****/
|
||||
switch (BrowserTab)
|
||||
{
|
||||
case Act_1ST_TAB:
|
||||
case Act_1ST:
|
||||
HTM_TxtF ("<body class=\"BODY_%s\" onload=\"init();\">\n",
|
||||
The_GetSuffix ());
|
||||
HTM_DIV_Begin ("id=\"zoomLyr\" class=\"ZOOM ZOOM_%s\"",
|
||||
|
@ -292,8 +292,8 @@ void Lay_WriteStartOfPage (void)
|
|||
HTM_DIV_End ();
|
||||
HTM_DIV_End ();
|
||||
break;
|
||||
case Act_NEW_TAB:
|
||||
case Act_2ND_TAB:
|
||||
case Act_NEW:
|
||||
case Act_2ND:
|
||||
HTM_Txt ("<body onload=\"init();\"");
|
||||
switch (Gbl.Action.Act)
|
||||
{
|
||||
|
@ -430,7 +430,7 @@ void Lay_WriteEndOfPage (void)
|
|||
HTM_DIV_End (); // main_zone_central_container
|
||||
|
||||
/***** Write page footer *****/
|
||||
if (Act_GetBrowserTab (Gbl.Action.Act) == Act_1ST_TAB)
|
||||
if (Act_GetBrowserTab (Gbl.Action.Act) == Act_1ST)
|
||||
Lay_WriteFootFromHTMLFile ();
|
||||
|
||||
/***** End of main zone and page *****/
|
||||
|
@ -766,7 +766,7 @@ static void Lay_WriteScriptInit (void)
|
|||
bool RefreshMatchStd = false;
|
||||
bool RefreshMatchTch = false;
|
||||
|
||||
RefreshConnected = Act_GetBrowserTab (Gbl.Action.Act) == Act_1ST_TAB &&
|
||||
RefreshConnected = Act_GetBrowserTab (Gbl.Action.Act) == Act_1ST &&
|
||||
(Gbl.Prefs.SideCols & Lay_SHOW_RIGHT_COLUMN); // Right column visible
|
||||
|
||||
switch (Gbl.Action.Act)
|
||||
|
@ -881,7 +881,7 @@ static void Lay_WriteScriptParsAJAX (void)
|
|||
Gbl.Hierarchy.Node[Hie_CRS].HieCod);
|
||||
|
||||
/***** Parameter to refresh connected users *****/
|
||||
if (Act_GetBrowserTab (Gbl.Action.Act) == Act_1ST_TAB)
|
||||
if (Act_GetBrowserTab (Gbl.Action.Act) == Act_1ST)
|
||||
// Refresh parameter
|
||||
HTM_TxtF ("const refreshParamNxtActCon = \"act=%ld\";\n",
|
||||
Act_GetActCod (ActRefCon));
|
||||
|
|
|
@ -596,7 +596,7 @@ static void Lnk_RenameLink (Nam_ShrtOrFullName_t ShrtOrFull)
|
|||
void Lnk_ChangeLinkWWW (void)
|
||||
{
|
||||
extern const char *Txt_The_new_web_address_is_X;
|
||||
char NewWWW[Cns_MAX_BYTES_WWW + 1];
|
||||
char NewWWW[WWW_MAX_BYTES_WWW + 1];
|
||||
|
||||
/***** Link constructor *****/
|
||||
Lnk_EditingLinkConstructor ();
|
||||
|
@ -606,7 +606,7 @@ void Lnk_ChangeLinkWWW (void)
|
|||
Lnk_EditingLnk->LnkCod = ParCod_GetAndCheckPar (ParCod_Lnk);
|
||||
|
||||
/* Get the new WWW for the link */
|
||||
Par_GetParText ("WWW",NewWWW,Cns_MAX_BYTES_WWW);
|
||||
Par_GetParText ("WWW",NewWWW,WWW_MAX_BYTES_WWW);
|
||||
|
||||
/***** Get link data from the database *****/
|
||||
Lnk_GetLinkDataByCod (Lnk_EditingLnk);
|
||||
|
@ -728,7 +728,7 @@ void Lnk_ReceiveNewLink (void)
|
|||
Nam_GetParsShrtAndFullName (Names);
|
||||
|
||||
/* Get link URL */
|
||||
Par_GetParText ("WWW",Lnk_EditingLnk->WWW,Cns_MAX_BYTES_WWW);
|
||||
Par_GetParText ("WWW",Lnk_EditingLnk->WWW,WWW_MAX_BYTES_WWW);
|
||||
|
||||
if (Lnk_EditingLnk->ShrtName[0] &&
|
||||
Lnk_EditingLnk->FullName[0]) // If there's a link name
|
||||
|
|
|
@ -32,7 +32,7 @@ struct Lnk_Link
|
|||
long LnkCod;
|
||||
char ShrtName[Nam_MAX_BYTES_SHRT_NAME + 1];
|
||||
char FullName[Nam_MAX_BYTES_FULL_NAME + 1];
|
||||
char WWW[Cns_MAX_BYTES_WWW + 1];
|
||||
char WWW[WWW_MAX_BYTES_WWW + 1];
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -63,7 +63,7 @@ void Lnk_DB_UpdateLnkName (long LnkCod,const char *FldName,const char *NewLnkNam
|
|||
/****************** Update link changing old WWW by new WWW ******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Lnk_DB_UpdateLnkWWW (long LnkCod,const char NewWWW[Cns_MAX_BYTES_WWW + 1])
|
||||
void Lnk_DB_UpdateLnkWWW (long LnkCod,const char NewWWW[WWW_MAX_BYTES_WWW + 1])
|
||||
{
|
||||
DB_QueryUPDATE ("can not update the web of an institutional link",
|
||||
"UPDATE lnk_links"
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
void Lnk_DB_CreateLink (const struct Lnk_Link *Lnk);
|
||||
void Lnk_DB_UpdateLnkName (long LnkCod,const char *FldName,const char *NewLnkName);
|
||||
void Lnk_DB_UpdateLnkWWW (long LnkCod,const char NewWWW[Cns_MAX_BYTES_WWW + 1]);
|
||||
void Lnk_DB_UpdateLnkWWW (long LnkCod,const char NewWWW[WWW_MAX_BYTES_WWW + 1]);
|
||||
|
||||
unsigned Lnk_DB_GetLinks (MYSQL_RES **mysql_res);
|
||||
unsigned Lnk_DB_GetLinkDataByCod (MYSQL_RES **mysql_res,long LnkCod);
|
||||
|
|
|
@ -232,7 +232,7 @@ void Log_GetAndShowLastClicks (void)
|
|||
Action = Act_GetActionFromActCod (ActCod);
|
||||
|
||||
/* Use a special color for this row depending on the action */
|
||||
ClassRow = (Act_GetBrowserTab (Action) == Act_DWN_FIL) ? "DAT_SMALL_YELLOW" :
|
||||
ClassRow = (Act_GetBrowserTab (Action) == Act_DWN) ? "DAT_SMALL_YELLOW" :
|
||||
(ActCod == Act_GetActCod (ActLogIn ) ||
|
||||
ActCod == Act_GetActCod (ActLogInNew)) ? "DAT_SMALL_GREEN" :
|
||||
(ActCod == Act_GetActCod (ActLogOut )) ? "DAT_SMALL_RED" :
|
||||
|
|
|
@ -519,7 +519,7 @@ static void Mai_PutParMaiCod (void *MaiCod)
|
|||
/******************************* Remove a mail *******************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Mai_RemoveMailDomain (void)
|
||||
void Mai_RemoveMailDom (void)
|
||||
{
|
||||
extern const char *Txt_Email_domain_X_removed;
|
||||
|
||||
|
@ -545,7 +545,7 @@ void Mai_RemoveMailDomain (void)
|
|||
/********************* Change the short name of a mail ***********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Mai_RenameMailDomainShort (void)
|
||||
void Mai_RenameMailDomShrt (void)
|
||||
{
|
||||
/***** Mail domain constructor *****/
|
||||
Mai_EditingMailDomainConstructor ();
|
||||
|
@ -558,7 +558,7 @@ void Mai_RenameMailDomainShort (void)
|
|||
/********************* Change the full name of a mail ************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Mai_RenameMailDomainFull (void)
|
||||
void Mai_RenameMailDomFull (void)
|
||||
{
|
||||
/***** Mail domain constructor *****/
|
||||
Mai_EditingMailDomainConstructor ();
|
||||
|
@ -732,7 +732,7 @@ static void Mai_PutHeadMailDomains (void)
|
|||
/******************* Receive form to create a new mail ***********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Mai_ReceiveNewMailDomain (void)
|
||||
void Mai_ReceiveNewMailDom (void)
|
||||
{
|
||||
extern const char *Txt_The_email_domain_X_already_exists;
|
||||
extern const char *Txt_Created_new_email_domain_X;
|
||||
|
|
|
@ -67,11 +67,11 @@ bool Mai_CheckIfUsrCanReceiveEmailNotif (const struct Usr_Data *UsrDat);
|
|||
void Mai_WriteWarningEmailNotifications (void);
|
||||
|
||||
void Mai_GetMailDomainDataByCod (struct Mail *Plc);
|
||||
void Mai_RemoveMailDomain (void);
|
||||
void Mai_RenameMailDomainShort (void);
|
||||
void Mai_RenameMailDomainFull (void);
|
||||
void Mai_RemoveMailDom (void);
|
||||
void Mai_RenameMailDomShrt (void);
|
||||
void Mai_RenameMailDomFull (void);
|
||||
void Mai_ContEditAfterChgMai (void);
|
||||
void Mai_ReceiveNewMailDomain (void);
|
||||
void Mai_ReceiveNewMailDom (void);
|
||||
|
||||
void Mai_ReqUsrsToListEmails (void);
|
||||
void Mai_GetSelUsrsAndListEmails (void);
|
||||
|
|
12
swad_main.c
12
swad_main.c
|
@ -127,8 +127,8 @@ int main (void)
|
|||
/***** Get number of sessions *****/
|
||||
switch (Act_GetBrowserTab (Gbl.Action.Act))
|
||||
{
|
||||
case Act_1ST_TAB:
|
||||
case Act_AJAX_RF:
|
||||
case Act_1ST:
|
||||
case Act_REF:
|
||||
Ses_GetNumSessions ();
|
||||
break;
|
||||
default:
|
||||
|
@ -158,7 +158,7 @@ int main (void)
|
|||
if (FunctionPriori != NULL)
|
||||
FunctionPriori ();
|
||||
|
||||
if (Act_GetBrowserTab (Gbl.Action.Act) == Act_204_NOC)
|
||||
if (Act_GetBrowserTab (Gbl.Action.Act) == Act_204)
|
||||
/***** Write HTTP Status 204 No Content *****/
|
||||
Lay_WriteHTTPStatus204NoContent ();
|
||||
|
||||
|
@ -188,9 +188,9 @@ int main (void)
|
|||
/* When updating a small zone via AJAX, all output is already done */
|
||||
switch (Act_GetBrowserTab (Gbl.Action.Act))
|
||||
{
|
||||
case Act_AJAX_NR:
|
||||
case Act_AJAX_RF:
|
||||
case Act_WEB_SVC:
|
||||
case Act_AJA:
|
||||
case Act_REF:
|
||||
case Act_SVC:
|
||||
/* All the output is made, so don't write anymore */
|
||||
Gbl.Layout.DivsEndWritten =
|
||||
Gbl.Layout.HTMLEndWritten = true;
|
||||
|
|
18
swad_media.c
18
swad_media.c
|
@ -289,8 +289,8 @@ void Med_GetMediaDataByCod (struct Med_Media *Media)
|
|||
{
|
||||
/* Get and limit length of the URL */
|
||||
Length = strlen (row[2]);
|
||||
if (Length > Cns_MAX_BYTES_WWW)
|
||||
Length = Cns_MAX_BYTES_WWW;
|
||||
if (Length > WWW_MAX_BYTES_WWW)
|
||||
Length = WWW_MAX_BYTES_WWW;
|
||||
|
||||
if ((Media->URL = malloc (Length + 1)) == NULL)
|
||||
Err_NotEnoughMemoryExit ();
|
||||
|
@ -478,7 +478,7 @@ void Med_PutMediaUploader (int NumMedia,const char *ClassInput)
|
|||
"id=\"%s_url\" class=\"%s\"" // <id>_url
|
||||
" placeholder=\"%s\" maxlength=\"%u\""
|
||||
" disabled=\"disabled\" style=\"display:none;\"",
|
||||
Id,ClassInput,Txt_Link,Cns_MAX_CHARS_WWW);
|
||||
Id,ClassInput,Txt_Link,WWW_MAX_CHARS_WWW);
|
||||
|
||||
/* End container */
|
||||
HTM_DIV_End ();
|
||||
|
@ -698,11 +698,11 @@ static Med_FormType_t Usr_GetFormTypeFromForm (struct Med_ParUpload *ParUpload)
|
|||
|
||||
static void Usr_GetURLFromForm (const char *ParName,struct Med_Media *Media)
|
||||
{
|
||||
char URL[Cns_MAX_BYTES_WWW + 1];
|
||||
char URL[WWW_MAX_BYTES_WWW + 1];
|
||||
size_t Length;
|
||||
|
||||
/***** Get media URL from form *****/
|
||||
Par_GetParText (ParName,URL,Cns_MAX_BYTES_WWW);
|
||||
Par_GetParText (ParName,URL,WWW_MAX_BYTES_WWW);
|
||||
/* If the URL coming from the form is empty, keep current media URL unchanged
|
||||
If not empty, copy it to current media URL */
|
||||
if ((Length = strlen (URL)) > 0)
|
||||
|
@ -1888,8 +1888,8 @@ long Med_CloneMedia (const struct Med_Media *MediaSrc)
|
|||
{
|
||||
/* Get and limit length of the URL */
|
||||
Length = strlen (MediaSrc->URL);
|
||||
if (Length > Cns_MAX_BYTES_WWW)
|
||||
Length = Cns_MAX_BYTES_WWW;
|
||||
if (Length > WWW_MAX_BYTES_WWW)
|
||||
Length = WWW_MAX_BYTES_WWW;
|
||||
if ((MediaDst.URL = malloc (Length + 1)) == NULL)
|
||||
Err_NotEnoughMemoryExit ();
|
||||
Str_Copy (MediaDst.URL,MediaSrc->URL,Length);
|
||||
|
@ -1901,8 +1901,8 @@ long Med_CloneMedia (const struct Med_Media *MediaSrc)
|
|||
{
|
||||
/* Get and limit length of the title */
|
||||
Length = strlen (MediaSrc->Title);
|
||||
if (Length > Cns_MAX_BYTES_WWW)
|
||||
Length = Cns_MAX_BYTES_WWW;
|
||||
if (Length > WWW_MAX_BYTES_WWW)
|
||||
Length = WWW_MAX_BYTES_WWW;
|
||||
if ((MediaDst.Title = malloc (Length + 1)) == NULL)
|
||||
Err_NotEnoughMemoryExit ();
|
||||
Str_Copy (MediaDst.Title,MediaSrc->Title,Length);
|
||||
|
|
|
@ -2516,7 +2516,7 @@ static void Msg_WriteMsgTo (struct Msg_Messages *Messages,long MsgCod)
|
|||
bool UsrValid;
|
||||
bool ShowPhoto;
|
||||
const char *Title;
|
||||
char PhotoURL[Cns_MAX_BYTES_WWW + 1];
|
||||
char PhotoURL[WWW_MAX_BYTES_WWW + 1];
|
||||
|
||||
/***** Get number of recipients of a message from database *****/
|
||||
NumRecipients.Total = Msg_DB_GetNumRecipients (MsgCod);
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
/********************************* Headers ***********************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#include "swad_action.h"
|
||||
#include "swad_action_list.h"
|
||||
#include "swad_form.h"
|
||||
#include "swad_parameter_code.h"
|
||||
#include "swad_string.h"
|
||||
|
|
|
@ -144,7 +144,7 @@ static void Net_GetMyWebsAndSocialNetsFromForm (void);
|
|||
void Net_ShowWebsAndSocialNets (const struct Usr_Data *UsrDat)
|
||||
{
|
||||
Net_WebsAndSocialNetworks_t NumURL;
|
||||
char URL[Cns_MAX_BYTES_WWW + 1];
|
||||
char URL[WWW_MAX_BYTES_WWW + 1];
|
||||
|
||||
/***** Begin container *****/
|
||||
HTM_DIV_Begin ("class=\"REC_WEBS\"");
|
||||
|
@ -196,7 +196,7 @@ void Net_ShowFormMyWebsAndSocialNets (void)
|
|||
extern const char *Txt_Webs_social_networks;
|
||||
extern const char *Txt_Save_changes;
|
||||
Net_WebsAndSocialNetworks_t NumURL;
|
||||
char URL[Cns_MAX_BYTES_WWW + 1];
|
||||
char URL[WWW_MAX_BYTES_WWW + 1];
|
||||
char StrName[32];
|
||||
|
||||
/***** Begin section *****/
|
||||
|
@ -295,7 +295,7 @@ static void Net_GetMyWebsAndSocialNetsFromForm (void)
|
|||
{
|
||||
Net_WebsAndSocialNetworks_t NumURL;
|
||||
char ParName[3 + 10 + 1];
|
||||
char URL[Cns_MAX_BYTES_WWW + 1];
|
||||
char URL[WWW_MAX_BYTES_WWW + 1];
|
||||
|
||||
/***** Get URLs *****/
|
||||
for (NumURL = (Net_WebsAndSocialNetworks_t) 0;
|
||||
|
@ -304,7 +304,7 @@ static void Net_GetMyWebsAndSocialNetsFromForm (void)
|
|||
{
|
||||
/***** Get URL from the form *****/
|
||||
snprintf (ParName,sizeof (ParName),"URL%u",(unsigned) NumURL);
|
||||
Par_GetParText (ParName,URL,Cns_MAX_BYTES_WWW);
|
||||
Par_GetParText (ParName,URL,WWW_MAX_BYTES_WWW);
|
||||
|
||||
if (URL[0])
|
||||
/***** Insert or replace web / social network *****/
|
||||
|
|
|
@ -84,7 +84,7 @@ const char *Net_DB_WebsAndSocialNetworks[Net_NUM_WEBS_AND_SOCIAL_NETWORKS] =
|
|||
/*****************************************************************************/
|
||||
|
||||
void Net_DB_UpdateMyWeb (Net_WebsAndSocialNetworks_t NumURL,
|
||||
const char URL[Cns_MAX_BYTES_WWW + 1])
|
||||
const char URL[WWW_MAX_BYTES_WWW + 1])
|
||||
{
|
||||
DB_QueryREPLACE ("can not update user's web / social network",
|
||||
"REPLACE INTO usr_webs"
|
||||
|
@ -101,9 +101,9 @@ void Net_DB_UpdateMyWeb (Net_WebsAndSocialNetworks_t NumURL,
|
|||
/*****************************************************************************/
|
||||
|
||||
void Net_DB_GetURL (long UsrCod,Net_WebsAndSocialNetworks_t NumURL,
|
||||
char URL[Cns_MAX_BYTES_WWW + 1])
|
||||
char URL[WWW_MAX_BYTES_WWW + 1])
|
||||
{
|
||||
DB_QuerySELECTString (URL,Cns_MAX_BYTES_WWW,
|
||||
DB_QuerySELECTString (URL,WWW_MAX_BYTES_WWW,
|
||||
"can not get user's web / social network",
|
||||
"SELECT URL"
|
||||
" FROM usr_webs"
|
||||
|
|
|
@ -34,10 +34,10 @@
|
|||
/*****************************************************************************/
|
||||
|
||||
void Net_DB_UpdateMyWeb (Net_WebsAndSocialNetworks_t NumURL,
|
||||
const char URL[Cns_MAX_BYTES_WWW + 1]);
|
||||
const char URL[WWW_MAX_BYTES_WWW + 1]);
|
||||
|
||||
void Net_DB_GetURL (long UsrCod,Net_WebsAndSocialNetworks_t NumURL,
|
||||
char URL[Cns_MAX_BYTES_WWW + 1]);
|
||||
char URL[WWW_MAX_BYTES_WWW + 1]);
|
||||
unsigned Net_DB_GetWebAndSocialNetworksStats (MYSQL_RES **mysql_res);
|
||||
|
||||
void Net_DB_RemoveMyWeb (Net_WebsAndSocialNetworks_t NumURL);
|
||||
|
|
|
@ -197,7 +197,7 @@ void Not_ListFullNotices (void)
|
|||
/************************* Get highlighted notice code ***********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Not_GetHighLightedNotCod (void)
|
||||
void Not_GetHighlightNotCod (void)
|
||||
{
|
||||
Gbl.Crs.Notices.HighlightNotCod = ParCod_GetPar (ParCod_Not);
|
||||
}
|
||||
|
@ -379,7 +379,7 @@ void Not_ShowNotices (Not_Listing_t TypeNoticesListing,long HighlightNotCod)
|
|||
static void Not_PutLinkToRSSFile (void)
|
||||
{
|
||||
char PathRelRSSFile[PATH_MAX + 1];
|
||||
char RSSLink[Cns_MAX_BYTES_WWW + 1];
|
||||
char RSSLink[WWW_MAX_BYTES_WWW + 1];
|
||||
|
||||
/***** Create RSS file if not exists *****/
|
||||
snprintf (PathRelRSSFile,sizeof (PathRelRSSFile),"%s/%ld/%s/%s",
|
||||
|
|
|
@ -65,7 +65,7 @@ void Not_ShowFormNotice (void);
|
|||
void Not_ReceiveNotice (void);
|
||||
void Not_ListNoticesAfterRemoval (void);
|
||||
void Not_ListFullNotices (void);
|
||||
void Not_GetHighLightedNotCod (void);
|
||||
void Not_GetHighlightNotCod (void);
|
||||
|
||||
void Not_HideNotice (void);
|
||||
void Not_UnhideNotice (void);
|
||||
|
|
|
@ -70,7 +70,7 @@ static struct
|
|||
{
|
||||
/* Content send by the form and received by the CGI:
|
||||
Act_CONTENT_NORM (if CONTENT_TYPE==text/plain)
|
||||
Act_CONT_DATA (if CONTENT_TYPE==multipart/form-data) */
|
||||
Act_DATA (if CONTENT_TYPE==multipart/form-data) */
|
||||
Act_Content_t ContentReceivedByCGI;
|
||||
size_t ContentLength;
|
||||
char *QueryString; // String allocated dynamically with the arguments sent to the CGI
|
||||
|
@ -87,7 +87,7 @@ static struct
|
|||
char IP[Cns_MAX_BYTES_IP + 1];
|
||||
} Par_Pars =
|
||||
{
|
||||
.ContentReceivedByCGI = Act_CONT_NORM,
|
||||
.ContentReceivedByCGI = Act_NORM,
|
||||
.ContentLength = 0,
|
||||
.QueryString = NULL,
|
||||
.List = NULL,
|
||||
|
@ -143,7 +143,7 @@ bool Par_GetQueryString (void)
|
|||
{
|
||||
/***** GET method *****/
|
||||
Par_Pars.Method = Par_METHOD_GET;
|
||||
Par_SetContentReceivedByCGI (Act_CONT_NORM);
|
||||
Par_SetContentReceivedByCGI (Act_NORM);
|
||||
|
||||
/* Get content length */
|
||||
Par_Pars.ContentLength = strlen (getenv ("QUERY_STRING"));
|
||||
|
@ -183,7 +183,7 @@ bool Par_GetQueryString (void)
|
|||
|
||||
if (!strncmp (ContentType,"multipart/form-data",strlen ("multipart/form-data")))
|
||||
{
|
||||
Par_SetContentReceivedByCGI (Act_CONT_DATA);
|
||||
Par_SetContentReceivedByCGI (Act_DATA);
|
||||
Par_GetBoundary ();
|
||||
return Fil_ReadStdinIntoTmpFile ();
|
||||
}
|
||||
|
@ -193,7 +193,7 @@ bool Par_GetQueryString (void)
|
|||
}
|
||||
else
|
||||
{
|
||||
Par_SetContentReceivedByCGI (Act_CONT_NORM);
|
||||
Par_SetContentReceivedByCGI (Act_NORM);
|
||||
|
||||
/* Allocate memory for query string */
|
||||
if ((Par_Pars.QueryString = malloc (Par_Pars.ContentLength + 1)) == NULL)
|
||||
|
@ -281,8 +281,8 @@ void Par_CreateListOfPars (void)
|
|||
{
|
||||
static void (*CreateListOfPars[Act_NUM_CONTENTS]) (void) =
|
||||
{
|
||||
[Act_CONT_NORM] = Par_CreateListOfParsFromQueryString,
|
||||
[Act_CONT_DATA] = Par_CreateListOfParsFromTmpFile,
|
||||
[Act_NORM] = Par_CreateListOfParsFromQueryString,
|
||||
[Act_DATA] = Par_CreateListOfParsFromTmpFile,
|
||||
};
|
||||
|
||||
/***** Initialize empty list of parameters *****/
|
||||
|
@ -586,11 +586,11 @@ unsigned Par_GetPar (Par_ParamType_t ParType,const char *ParName,
|
|||
// Check if the name of the parameter is the same
|
||||
switch (Par_GetContentReceivedByCGI ())
|
||||
{
|
||||
case Act_CONT_NORM:
|
||||
case Act_NORM:
|
||||
ParFound = !strncmp (ParName,&Par_Pars.QueryString[Par->Name.Start],
|
||||
Par->Name.Length);
|
||||
break;
|
||||
case Act_CONT_DATA:
|
||||
case Act_DATA:
|
||||
fseek (QueryFile,Par->Name.Start,SEEK_SET);
|
||||
for (i = 0, ParFound = true;
|
||||
i < Par->Name.Length && ParFound;
|
||||
|
@ -648,12 +648,12 @@ unsigned Par_GetPar (Par_ParamType_t ParType,const char *ParName,
|
|||
/* Copy parameter value */
|
||||
switch (Par_GetContentReceivedByCGI ())
|
||||
{
|
||||
case Act_CONT_NORM:
|
||||
case Act_NORM:
|
||||
if (PtrDst)
|
||||
strncpy (PtrDst,&Par_Pars.QueryString[Par->Value.Start],
|
||||
Par->Value.Length);
|
||||
break;
|
||||
case Act_CONT_DATA:
|
||||
case Act_DATA:
|
||||
if (Par->FileName.Start == 0 && // Copy into destination only if it's not a file
|
||||
PtrDst)
|
||||
{
|
||||
|
@ -776,11 +776,11 @@ void Par_GetMainPars (void)
|
|||
/***** Some preliminary adjusts depending on action *****/
|
||||
switch (Act_GetBrowserTab (Gbl.Action.Act))
|
||||
{
|
||||
case Act_AJAX_NR:
|
||||
case Act_AJA:
|
||||
Gbl.Action.UsesAJAX = true;
|
||||
Gbl.Action.IsAJAXAutoRefresh = false;
|
||||
break;
|
||||
case Act_AJAX_RF:
|
||||
case Act_REF:
|
||||
Gbl.Action.UsesAJAX = true;
|
||||
Gbl.Action.IsAJAXAutoRefresh = true;
|
||||
break;
|
||||
|
|
26
swad_photo.c
26
swad_photo.c
|
@ -224,7 +224,7 @@ static void Pho_PutIconToReqRemMyPhoto (__attribute__((unused)) void *Args)
|
|||
|
||||
static void Pho_PutIconToReqRemOtherUsrPhoto (__attribute__((unused)) void *Args)
|
||||
{
|
||||
char PhotoURL[Cns_MAX_BYTES_WWW + 1];
|
||||
char PhotoURL[WWW_MAX_BYTES_WWW + 1];
|
||||
bool PhotoExists;
|
||||
static Act_Action_t NextAction[Rol_NUM_ROLES] =
|
||||
{
|
||||
|
@ -509,7 +509,7 @@ void Pho_ReqRemUsrPhoto (void)
|
|||
[PhoSha_SHAPE_OVAL ] = "PHOTOO186x248",
|
||||
[PhoSha_SHAPE_RECTANGLE] = "PHOTOR186x248",
|
||||
};
|
||||
char PhotoURL[Cns_MAX_BYTES_WWW + 1];
|
||||
char PhotoURL[WWW_MAX_BYTES_WWW + 1];
|
||||
|
||||
/***** Get user's code from form *****/
|
||||
Usr_GetParOtherUsrCodEncryptedAndGetListIDs ();
|
||||
|
@ -974,7 +974,7 @@ unsigned Pho_UpdateMyClicksWithoutPhoto (void)
|
|||
void Pho_ShowUsrPhotoIfAllowed (struct Usr_Data *UsrDat,
|
||||
const char *ClassPhoto,Pho_Zoom_t Zoom)
|
||||
{
|
||||
char PhotoURL[Cns_MAX_BYTES_WWW + 1];
|
||||
char PhotoURL[WWW_MAX_BYTES_WWW + 1];
|
||||
bool ShowPhoto = Pho_ShowingUsrPhotoIsAllowed (UsrDat,PhotoURL);
|
||||
|
||||
Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL :
|
||||
|
@ -989,7 +989,7 @@ void Pho_ShowUsrPhotoIfAllowed (struct Usr_Data *UsrDat,
|
|||
// Public photo means two different things depending on the user's type
|
||||
|
||||
bool Pho_ShowingUsrPhotoIsAllowed (struct Usr_Data *UsrDat,
|
||||
char PhotoURL[Cns_MAX_BYTES_WWW + 1])
|
||||
char PhotoURL[WWW_MAX_BYTES_WWW + 1])
|
||||
{
|
||||
/***** Photo is shown if I can see it, and it exists *****/
|
||||
return (Pri_CheckIfICanView (UsrDat->PhotoVisibility,UsrDat) == Usr_CAN) ? Pho_BuildLinkToPhoto (UsrDat,PhotoURL) :
|
||||
|
@ -1002,7 +1002,7 @@ bool Pho_ShowingUsrPhotoIsAllowed (struct Usr_Data *UsrDat,
|
|||
// Returns false if photo does not exist
|
||||
// Returns true if link is created successfully
|
||||
|
||||
bool Pho_BuildLinkToPhoto (const struct Usr_Data *UsrDat,char PhotoURL[Cns_MAX_BYTES_WWW + 1])
|
||||
bool Pho_BuildLinkToPhoto (const struct Usr_Data *UsrDat,char PhotoURL[WWW_MAX_BYTES_WWW + 1])
|
||||
{
|
||||
char PathPublPhoto[PATH_MAX + 1];
|
||||
char PathPrivPhoto[PATH_MAX + 1];
|
||||
|
@ -1025,7 +1025,7 @@ bool Pho_BuildLinkToPhoto (const struct Usr_Data *UsrDat,char PhotoURL[Cns_MAX_B
|
|||
" to access to user's private photo");
|
||||
|
||||
/***** Create the public URL of the photo *****/
|
||||
snprintf (PhotoURL,Cns_MAX_BYTES_WWW + 1,"%s/%s.jpg",
|
||||
snprintf (PhotoURL,WWW_MAX_BYTES_WWW + 1,"%s/%s.jpg",
|
||||
Cfg_URL_PHOTO_PUBLIC,UsrDat->Photo);
|
||||
|
||||
return true;
|
||||
|
@ -1068,9 +1068,9 @@ void Pho_BuildHTMLUsrPhoto (const struct Usr_Data *UsrDat,const char *PhotoURL,
|
|||
unsigned NumFollowers;
|
||||
bool PhotoExists;
|
||||
Act_BrowserTab_t BrowserTab = Act_GetBrowserTab (Gbl.Action.Act);
|
||||
bool BrowserTabIs1stTab = (BrowserTab == Act_1ST_TAB ||
|
||||
BrowserTab == Act_AJAX_NR ||
|
||||
BrowserTab == Act_AJAX_RF);
|
||||
bool BrowserTabIs1stTab = (BrowserTab == Act_1ST ||
|
||||
BrowserTab == Act_AJA ||
|
||||
BrowserTab == Act_REF);
|
||||
bool PutZoomCode = (Zoom == Pho_ZOOM) && // Make zoom
|
||||
BrowserTabIs1stTab; // Only in main browser tab (or AJAX)
|
||||
char IdCaption[Frm_MAX_BYTES_ID + 1];
|
||||
|
@ -1274,9 +1274,9 @@ void Pho_ShowUsrPhoto (const struct Usr_Data *UsrDat,const char *PhotoURL,
|
|||
const char *ClassPhoto,Pho_Zoom_t Zoom)
|
||||
{
|
||||
Act_BrowserTab_t BrowserTab = Act_GetBrowserTab (Gbl.Action.Act);
|
||||
bool BrowserTabIs1stTab = (BrowserTab == Act_1ST_TAB ||
|
||||
BrowserTab == Act_AJAX_NR ||
|
||||
BrowserTab == Act_AJAX_RF);
|
||||
bool BrowserTabIs1stTab = (BrowserTab == Act_1ST ||
|
||||
BrowserTab == Act_AJA ||
|
||||
BrowserTab == Act_REF);
|
||||
Frm_PutForm_t PutFormPublicProfile = (!Frm_CheckIfInside () && // Only if not inside another form
|
||||
BrowserTabIs1stTab) ? Frm_PUT_FORM : // Only in main browser tab (or AJAX)
|
||||
Frm_DONT_PUT_FORM;
|
||||
|
@ -2370,7 +2370,7 @@ static void Pho_ShowDegreeAvgPhotoAndStat (const struct Hie_Node *Deg,
|
|||
unsigned PhotoWidth;
|
||||
unsigned PhotoHeight;
|
||||
char PathRelAvgPhoto[PATH_MAX + 1];
|
||||
char PhotoURL[Cns_MAX_BYTES_WWW + 1];
|
||||
char PhotoURL[WWW_MAX_BYTES_WWW + 1];
|
||||
char PhotoCaption[1024 + Nam_MAX_BYTES_SHRT_NAME];
|
||||
bool ShowDegPhoto;
|
||||
char IdCaption[Frm_MAX_BYTES_ID + 1];
|
||||
|
|
|
@ -118,8 +118,8 @@ unsigned Pho_UpdateMyClicksWithoutPhoto (void);
|
|||
void Pho_ShowUsrPhotoIfAllowed (struct Usr_Data *UsrDat,
|
||||
const char *ClassPhoto,Pho_Zoom_t Zoom);
|
||||
bool Pho_ShowingUsrPhotoIsAllowed (struct Usr_Data *UsrDat,
|
||||
char PhotoURL[Cns_MAX_BYTES_WWW + 1]);
|
||||
bool Pho_BuildLinkToPhoto (const struct Usr_Data *UsrDat,char PhotoURL[Cns_MAX_BYTES_WWW + 1]);
|
||||
char PhotoURL[WWW_MAX_BYTES_WWW + 1]);
|
||||
bool Pho_BuildLinkToPhoto (const struct Usr_Data *UsrDat,char PhotoURL[WWW_MAX_BYTES_WWW + 1]);
|
||||
bool Pho_CheckIfPrivPhotoExists (long UsrCod,char PathPrivRelPhoto[PATH_MAX + 1]);
|
||||
void Pho_BuildHTMLUsrPhoto (const struct Usr_Data *UsrDat,const char *PhotoURL,
|
||||
const char *ClassPhoto,Pho_Zoom_t Zoom,
|
||||
|
|
|
@ -532,7 +532,7 @@ void Plc_RemovePlace (void)
|
|||
/********************* Change the short name of a place **********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Plc_RenamePlaceShort (void)
|
||||
void Plc_RenamePlaceShrt (void)
|
||||
{
|
||||
/***** Place constructor *****/
|
||||
Plc_EditingPlaceConstructor ();
|
||||
|
|
|
@ -70,7 +70,7 @@ void Plc_GetListPlaces (struct Plc_Places *Places);
|
|||
void Plc_FreeListPlaces (struct Plc_Places *Places);
|
||||
void Plc_GetPlaceDataByCod (struct Plc_Place *Plc);
|
||||
void Plc_RemovePlace (void);
|
||||
void Plc_RenamePlaceShort (void);
|
||||
void Plc_RenamePlaceShrt (void);
|
||||
void Plc_RenamePlaceFull (void);
|
||||
void Plc_ContEditAfterChgPlc (void);
|
||||
|
||||
|
|
|
@ -108,7 +108,7 @@ void Plg_ListPlugins (void)
|
|||
extern const char *Txt_Plugin;
|
||||
unsigned NumPlg;
|
||||
struct Plg_Plugin *Plg;
|
||||
char URL[Cns_MAX_BYTES_WWW + Cns_BYTES_SESSION_ID + 1];
|
||||
char URL[WWW_MAX_BYTES_WWW + Cns_BYTES_SESSION_ID + 1];
|
||||
char *Icon;
|
||||
struct Plg_Plugins Plugins;
|
||||
|
||||
|
@ -563,7 +563,7 @@ void Plg_RenamePlugin (void)
|
|||
/******************* Change the description of a plugin **********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Plg_ChangePlgDescription (void)
|
||||
void Plg_ChangePlgDesc (void)
|
||||
{
|
||||
extern const char *Txt_The_new_description_is_X;
|
||||
char NewDescription[Plg_MAX_BYTES_PLUGIN_DESCRIPTION + 1];
|
||||
|
@ -689,7 +689,7 @@ void Plg_ChangePlgAppKey (void)
|
|||
void Plg_ChangePlgURL (void)
|
||||
{
|
||||
extern const char *Txt_The_new_URL_is_X;
|
||||
char NewURL[Cns_MAX_BYTES_WWW + 1];
|
||||
char NewURL[WWW_MAX_BYTES_WWW + 1];
|
||||
|
||||
/***** Plugin constructor *****/
|
||||
Plg_EditingPluginConstructor ();
|
||||
|
@ -699,7 +699,7 @@ void Plg_ChangePlgURL (void)
|
|||
Plg_EditingPlg->PlgCod = ParCod_GetAndCheckPar (ParCod_Plg);
|
||||
|
||||
/* Get the new URL for the plugin */
|
||||
Par_GetParText ("URL",NewURL,Cns_MAX_BYTES_WWW);
|
||||
Par_GetParText ("URL",NewURL,WWW_MAX_BYTES_WWW);
|
||||
|
||||
/***** Get plugin data from the database *****/
|
||||
Plg_GetPluginDataByCod (Plg_EditingPlg);
|
||||
|
@ -915,7 +915,7 @@ void Plg_ReceiveNewPlg (void)
|
|||
Par_GetParText ("Description",Plg_EditingPlg->Description,Plg_MAX_BYTES_PLUGIN_DESCRIPTION);
|
||||
Par_GetParText ("Logo" ,Plg_EditingPlg->Logo ,Plg_MAX_BYTES_PLUGIN_LOGO);
|
||||
Par_GetParText ("AppKey" ,Plg_EditingPlg->AppKey ,Plg_MAX_BYTES_PLUGIN_APP_KEY);
|
||||
Par_GetParText ("URL" ,Plg_EditingPlg->URL ,Cns_MAX_BYTES_WWW);
|
||||
Par_GetParText ("URL" ,Plg_EditingPlg->URL ,WWW_MAX_BYTES_WWW);
|
||||
Par_GetParText ("IP" ,Plg_EditingPlg->IP ,Cns_MAX_BYTES_IP);
|
||||
|
||||
if (Plg_EditingPlg->Name[0]) // If there's a plugin name
|
||||
|
|
|
@ -56,7 +56,7 @@ struct Plg_Plugin
|
|||
char Description[Plg_MAX_BYTES_PLUGIN_DESCRIPTION + 1];
|
||||
char Logo[Plg_MAX_BYTES_PLUGIN_LOGO + 1];
|
||||
char AppKey[Plg_MAX_BYTES_PLUGIN_APP_KEY + 1];
|
||||
char URL[Cns_MAX_BYTES_WWW + 1];
|
||||
char URL[WWW_MAX_BYTES_WWW + 1];
|
||||
char IP[Cns_MAX_BYTES_IP + 1];
|
||||
};
|
||||
|
||||
|
@ -69,7 +69,7 @@ void Plg_EditPlugins (void);
|
|||
bool Plg_GetPluginDataByCod (struct Plg_Plugin *Plg);
|
||||
void Plg_RemovePlugin (void);
|
||||
void Plg_RenamePlugin (void);
|
||||
void Plg_ChangePlgDescription (void);
|
||||
void Plg_ChangePlgDesc (void);
|
||||
void Plg_ChangePlgLogo (void);
|
||||
void Plg_ChangePlgAppKey (void);
|
||||
void Plg_ChangePlgURL (void);
|
||||
|
|
|
@ -112,7 +112,7 @@ void Plg_DB_ChangeAppKey (long PlgCod,
|
|||
/*****************************************************************************/
|
||||
|
||||
void Plg_DB_ChangeURL (long PlgCod,
|
||||
const char NewURL[Cns_MAX_BYTES_WWW + 1])
|
||||
const char NewURL[WWW_MAX_BYTES_WWW + 1])
|
||||
{
|
||||
DB_QueryUPDATE ("can not update the URL of a plugin",
|
||||
"UPDATE plg_plugins"
|
||||
|
|
|
@ -45,7 +45,7 @@ void Plg_DB_ChangeLogo (long PlgCod,
|
|||
void Plg_DB_ChangeAppKey (long PlgCod,
|
||||
const char NewAppKey[Plg_MAX_BYTES_PLUGIN_APP_KEY + 1]);
|
||||
void Plg_DB_ChangeURL (long PlgCod,
|
||||
const char NewURL[Cns_MAX_BYTES_WWW + 1]);
|
||||
const char NewURL[WWW_MAX_BYTES_WWW + 1]);
|
||||
void Plg_DB_ChangeIP (long PlgCod,
|
||||
const char NewIP[Cns_MAX_BYTES_IP + 1]);
|
||||
|
||||
|
|
|
@ -128,13 +128,13 @@ void Prf_SeeSocialProfiles (void)
|
|||
/************************** Get public profile URL ***************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
char *Prf_GetURLPublicProfile (char URL[Cns_MAX_BYTES_WWW + 1],
|
||||
char *Prf_GetURLPublicProfile (char URL[WWW_MAX_BYTES_WWW + 1],
|
||||
const char *NickWithoutArr)
|
||||
{
|
||||
extern const char *Lan_STR_LANG_ID[1 + Lan_NUM_LANGUAGES];
|
||||
|
||||
/***** Build URL using nickname *****/
|
||||
snprintf (URL,Cns_MAX_BYTES_WWW + 1,"%s/%s?usr=@%s",
|
||||
snprintf (URL,WWW_MAX_BYTES_WWW + 1,"%s/%s?usr=@%s",
|
||||
Cfg_URL_SWAD_CGI,Lan_STR_LANG_ID[Gbl.Prefs.Language],
|
||||
NickWithoutArr);
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ struct Prf_UsrFigures
|
|||
|
||||
void Prf_SeeSocialProfiles (void);
|
||||
|
||||
char *Prf_GetURLPublicProfile (char URL[Cns_MAX_BYTES_WWW + 1],
|
||||
char *Prf_GetURLPublicProfile (char URL[WWW_MAX_BYTES_WWW + 1],
|
||||
const char *NickWithoutArr);
|
||||
void Prf_PutLinkMyPublicProfile (void);
|
||||
void Prf_PutLinkReqAnotherUsrProfile (void);
|
||||
|
|
|
@ -4073,7 +4073,7 @@ void Prj_ReceiveProject (void)
|
|||
Par_GetParHTML ("Materials" ,Projects.Prj.Materials ,Cns_MAX_BYTES_TEXT); // Store in HTML format (not rigorous)
|
||||
|
||||
/* Get degree WWW */
|
||||
Par_GetParText ("URL",Projects.Prj.URL,Cns_MAX_BYTES_WWW);
|
||||
Par_GetParText ("URL",Projects.Prj.URL,WWW_MAX_BYTES_WWW);
|
||||
|
||||
/***** Check if title is correct *****/
|
||||
if (!Projects.Prj.Title[0]) // If there is not a project title
|
||||
|
|
|
@ -167,7 +167,7 @@ struct Prj_Project
|
|||
char *Description;
|
||||
char *Knowledge;
|
||||
char *Materials;
|
||||
char URL[Cns_MAX_BYTES_WWW + 1];
|
||||
char URL[WWW_MAX_BYTES_WWW + 1];
|
||||
struct
|
||||
{
|
||||
Prj_ReviewStatus_t Status;
|
||||
|
|
|
@ -2085,7 +2085,7 @@ void Rec_ShowSharedUsrRecord (Rec_SharedRecordViewType_t TypeOfView,
|
|||
Rec_RecordHelp[Rec_SHA_RECORD_LIST] = Rec_RecordListHelp[UsrDat->Roles.InCurrentCrs];
|
||||
|
||||
PutFormLinks = (!Frm_CheckIfInside () && // Only if not inside another form
|
||||
Act_GetBrowserTab (Gbl.Action.Act) == Act_1ST_TAB) ? Frm_PUT_FORM : // Only in main browser tab
|
||||
Act_GetBrowserTab (Gbl.Action.Act) == Act_1ST) ? Frm_PUT_FORM : // Only in main browser tab
|
||||
Frm_DONT_PUT_FORM;
|
||||
|
||||
Ins.HieCod = UsrDat->InsCod;
|
||||
|
@ -2356,7 +2356,7 @@ static void Rec_PutIconsCommands (__attribute__((unused)) void *Args)
|
|||
};
|
||||
|
||||
if (!Frm_CheckIfInside () && // Only if not inside another form
|
||||
Act_GetBrowserTab (Gbl.Action.Act) == Act_1ST_TAB && // Only in main browser tab
|
||||
Act_GetBrowserTab (Gbl.Action.Act) == Act_1ST && // Only in main browser tab
|
||||
Gbl.Usrs.Me.Logged) // Only if I am logged
|
||||
{
|
||||
ICanViewUsrProfile = Pri_CheckIfICanView (Rec_Record.UsrDat->BaPrfVisibility,
|
||||
|
@ -2486,14 +2486,14 @@ void Rec_PutParUsrCodEncrypted (__attribute__((unused)) void *Args)
|
|||
|
||||
static void Rec_PutParsMyResults (__attribute__((unused)) void *Args)
|
||||
{
|
||||
Dat_SetDatesToPastAndNow ();
|
||||
Dat_SetDatesToPastNow ();
|
||||
Dat_WriteParsIniEndDates ();
|
||||
}
|
||||
|
||||
static void Rec_PutParsStdResults (__attribute__((unused)) void *Args)
|
||||
{
|
||||
Rec_PutParsStudent (NULL);
|
||||
Dat_SetDatesToPastAndNow ();
|
||||
Dat_SetDatesToPastNow ();
|
||||
Dat_WriteParsIniEndDates ();
|
||||
}
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ struct Rep_Report
|
|||
struct Rep_Hits Hits;
|
||||
unsigned long MaxHitsPerYear;
|
||||
char FilenameReport[NAME_MAX + 1];
|
||||
char Permalink[Cns_MAX_BYTES_WWW + 1];
|
||||
char Permalink[WWW_MAX_BYTES_WWW + 1];
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -1015,7 +1015,7 @@ void Roo_ChangeType (void)
|
|||
/********************** Change the short name of a room **********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Roo_RenameRoomShort (void)
|
||||
void Roo_RenameRoomShrt (void)
|
||||
{
|
||||
/***** Room constructor *****/
|
||||
Roo_EditingRoomConstructor ();
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue