Version 16.92.4

This commit is contained in:
Antonio Cañas Vargas 2016-12-09 18:22:25 +01:00
parent e92f27bc76
commit e006c0f0a8
2 changed files with 20 additions and 16 deletions

View File

@ -1241,21 +1241,6 @@ void Agd_MakeEventPublic (void)
Agd_ShowMyAgenda ();
}
/*****************************************************************************/
/*********** Check if the title or the folder of an event exists *************/
/*****************************************************************************/
static bool Agd_CheckIfSimilarEventExists (struct AgendaEvent *AgdEvent)
{
char Query[256+Agd_MAX_LENGTH_EVENT];
/***** Get number of events with a field value from database *****/
sprintf (Query,"SELECT COUNT(*) FROM agendas"
" WHERE UsrCod='%ld' AND Event='%s' AND AgdCod<>'%ld'",
AgdEvent->UsrCod,AgdEvent->Event,AgdEvent->AgdCod);
return (DB_QueryCOUNT (Query,"can not get similar events") != 0);
}
/*****************************************************************************/
/******************** Put a form to create a new event ***********************/
/*****************************************************************************/
@ -1399,6 +1384,9 @@ void Agd_RecFormEvent (void)
bool NewEventIsCorrect = true;
char Txt[Cns_MAX_BYTES_TEXT+1];
/***** Set author of the event *****/
AgdEvent.UsrCod = Gbl.Usrs.Me.UsrDat.UsrCod;
/***** Get the code of the event *****/
ItsANewEvent = ((AgdEvent.AgdCod = Agd_GetParamAgdCod ()) == -1L);
@ -1476,6 +1464,21 @@ void Agd_RecFormEvent (void)
Agd_RequestCreatOrEditEvent ();
}
/*****************************************************************************/
/*********** Check if the title or the folder of an event exists *************/
/*****************************************************************************/
static bool Agd_CheckIfSimilarEventExists (struct AgendaEvent *AgdEvent)
{
char Query[256+Agd_MAX_LENGTH_EVENT];
/***** Get number of events with a field value from database *****/
sprintf (Query,"SELECT COUNT(*) FROM agendas"
" WHERE UsrCod='%ld' AND Event='%s' AND AgdCod<>'%ld'",
AgdEvent->UsrCod,AgdEvent->Event,AgdEvent->AgdCod);
return (DB_QueryCOUNT (Query,"can not get similar events") != 0);
}
/*****************************************************************************/
/************************** Create a new event *******************************/
/*****************************************************************************/

View File

@ -185,13 +185,14 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 16.92.3 (2016-12-09)"
#define Log_PLATFORM_VERSION "SWAD 16.92.4 (2016-12-09)"
#define CSS_FILE "swad16.86.5.css"
#define JS_FILE "swad16.90.2.js"
// Number of lines (includes comments but not blank lines) has been got with the following command:
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*?.h sql/swad*.sql | tail -1
/*
Version 16.92.4: Dec 09, 2016 Fixed bug in edition of user's agenda. (? lines)
Version 16.92.3: Dec 09, 2016 Contextual help on user's public profile. (210310 lines)
Version 16.92.2: Dec 09, 2016 New icons to view user's profile ant to view user's record card in public agenda. (210308 lines)
Version 16.92.1: Dec 09, 2016 New icon to view user's profile in user's record card. (210277 lines)