diff --git a/swad_ID.c b/swad_ID.c
index d4a1e4ba..4a7b291c 100644
--- a/swad_ID.c
+++ b/swad_ID.c
@@ -349,6 +349,7 @@ static bool ID_CheckIfUsrIDIsValidUsingMinDigits (const char *UsrID,unsigned Min
void ID_WriteUsrIDs (struct UsrData *UsrDat)
{
+ extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
unsigned NumID;
bool ItsMe = (UsrDat->UsrCod == Gbl.Usrs.Me.UsrDat.UsrCod);
bool ICanSeeUsrID;
@@ -363,7 +364,8 @@ void ID_WriteUsrIDs (struct UsrData *UsrDat)
{
ICanSeeUsrID = ID_ICanSeeAnotherUsrID (UsrDat);
ICanConfirmUsrID = ICanSeeUsrID &&
- !Gbl.Form.Inside; // Not inside a form
+ !Gbl.Form.Inside && // Only if not inside another form
+ Act_Actions[Gbl.Action.Act].BrowserWindow == Act_MAIN_WINDOW; // Only in main window
}
for (NumID = 0;
diff --git a/swad_QR.c b/swad_QR.c
index 076c666e..eedb7879 100644
--- a/swad_QR.c
+++ b/swad_QR.c
@@ -53,7 +53,6 @@
/*****************************************************************************/
extern struct Globals Gbl;
-extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
/*****************************************************************************/
/************************* Internal global variables *************************/
@@ -159,6 +158,7 @@ void QR_LinkTo (unsigned Size,const char *ParamStr,long Cod)
void QR_ExamAnnnouncement (void)
{
+ extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
extern const char *Txt_Link_to_announcement_of_exam;
/***** Show QR code with direct link to the exam announcement *****/
diff --git a/swad_changelog.h b/swad_changelog.h
index 6a417b6c..21e0896b 100644
--- a/swad_changelog.h
+++ b/swad_changelog.h
@@ -134,13 +134,14 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
-#define Log_PLATFORM_VERSION "SWAD 15.203.1 (2016-04-23)"
+#define Log_PLATFORM_VERSION "SWAD 15.203.2 (2016-04-23)"
#define CSS_FILE "swad15.203.css"
#define JS_FILE "swad15.197.js"
// Number of lines (includes comments but not blank lines) has been got with the following command:
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*.h sql/swad*.sql | tail -1
/*
+ Version 15.203.2: Apr 23, 2016 New form to confirm another user's ID. Not finished. (201104 lines)
Version 15.203.1: Apr 23, 2016 New form to confirm another user's ID. Not finished. (201090 lines)
Version 15.203: Apr 23, 2016 Changes in layout and CSS related to record card. (201076 lines)
Version 15.202.19:Apr 23, 2016 User's ID is shown in green or red in user's account. (201120 lines)
diff --git a/swad_country.c b/swad_country.c
index e22d4d04..d5bd9694 100644
--- a/swad_country.c
+++ b/swad_country.c
@@ -46,7 +46,6 @@
/*****************************************************************************/
extern struct Globals Gbl;
-extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
/*****************************************************************************/
/***************************** Private constants *****************************/
@@ -1107,6 +1106,7 @@ void Cty_WriteSelectorOfCountry (void)
void Cty_WriteCountryName (long CtyCod,const char *Class)
{
+ extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
char CtyName[Cty_MAX_BYTES_COUNTRY_NAME+1];
char ActTxt[Act_MAX_LENGTH_ACTION_TXT+1];
diff --git a/swad_course.c b/swad_course.c
index f677ad60..12fd57cc 100644
--- a/swad_course.c
+++ b/swad_course.c
@@ -53,7 +53,6 @@
/*****************************************************************************/
extern struct Globals Gbl;
-extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
/*****************************************************************************/
/*************************** Public constants ********************************/
@@ -142,6 +141,7 @@ void Crs_PrintConfiguration (void)
static void Crs_Configuration (bool PrintView)
{
+ extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
extern const char *The_ClassForm[The_NUM_THEMES];
extern const char *Txt_Course;
extern const char *Txt_Short_name;
@@ -443,6 +443,7 @@ void Crs_ChangeCourseConfig (void)
static void Crs_WriteListMyCoursesToSelectOne (void)
{
+ extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
extern const char *The_ClassForm[The_NUM_THEMES];
extern const char *The_ClassFormDark[The_NUM_THEMES];
extern const char *Txt_My_courses;
diff --git a/swad_file_browser.c b/swad_file_browser.c
index 2248b8a3..7aaf3013 100644
--- a/swad_file_browser.c
+++ b/swad_file_browser.c
@@ -8126,12 +8126,12 @@ static void Brw_PutFormToCreateAFolder (const char *FileNameToShow)
static void Brw_PutFormToUploadFilesUsingDropzone (const char *FileNameToShow)
{
+ extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
extern const char *Txt_Upload_files;
extern const char *Txt_or_you_can_upload_new_files_to_the_folder_X;
extern const char *Txt_Select_one_or_more_files_from_your_computer_or_drag_and_drop_here;
extern const char *Txt_STR_LANG_ID[1+Txt_NUM_LANGUAGES];
extern const char *Txt_Done;
- extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
/***** Start frame *****/
fprintf (Gbl.F.Out,"
");
diff --git a/swad_forum.c b/swad_forum.c
index 2851469e..d0f96db1 100644
--- a/swad_forum.c
+++ b/swad_forum.c
@@ -48,7 +48,6 @@
/*****************************************************************************/
extern struct Globals Gbl;
-extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
/*****************************************************************************/
/*********************** Private constants and types *************************/
@@ -2219,6 +2218,7 @@ void For_SetForumName (For_ForumType_t ForumType,
static void For_WriteLinkToForum (For_ForumType_t ForumType,Act_Action_t NextAct,const char *Icon,const char *ForumName,bool ShowNumOfPosts,
unsigned Level,bool IsLastItemInLevel[1+For_FORUM_MAX_LEVELS])
{
+ extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
extern const char *The_ClassForm[The_NUM_THEMES];
extern const char *The_ClassFormBold[The_NUM_THEMES];
extern const char *Txt_Copy_not_allowed;
diff --git a/swad_global.c b/swad_global.c
index 1a510f53..3e9246a6 100644
--- a/swad_global.c
+++ b/swad_global.c
@@ -56,8 +56,6 @@ struct Globals Gbl; // All the global parameters and variables must be in this s
/************** External global variables from others modules ****************/
/*****************************************************************************/
-extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
-
/*****************************************************************************/
/***************************** Private constants *****************************/
/*****************************************************************************/
@@ -117,7 +115,6 @@ void Gbl_InitializeGlobals (void)
Gbl.Error = false;
-
Gbl.Layout.WritingHTMLStart =
Gbl.Layout.HTMLStartWritten =
Gbl.Layout.DivsEndWritten =
@@ -439,6 +436,8 @@ void Gbl_InitializeGlobals (void)
void Gbl_Cleanup (void)
{
+ extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
+
if (!Gbl.Action.UsesAJAX &&
!Gbl.WebService.IsWebService &&
Act_Actions[Gbl.Action.Act].BrowserWindow == Act_MAIN_WINDOW &&
diff --git a/swad_indicator.c b/swad_indicator.c
index 2847ed02..964bba18 100644
--- a/swad_indicator.c
+++ b/swad_indicator.c
@@ -41,7 +41,6 @@
/*****************************************************************************/
extern struct Globals Gbl;
-extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
/*****************************************************************************/
/*************************** Internal constants ******************************/
@@ -493,6 +492,7 @@ static void Ind_PutButtonToConfirmIWantToSeeBigList (unsigned NumCrss)
static void Ind_ShowTableOfCoursesWithIndicators (Ind_IndicatorsLayout_t IndicatorsLayout,unsigned NumCrss,MYSQL_RES *mysql_res)
{
+ extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
extern const char *Txt_Degree;
extern const char *Txt_Course;
extern const char *Txt_Institutional_BR_code;
diff --git a/swad_layout.c b/swad_layout.c
index 9e2f9fbc..b9f909bd 100644
--- a/swad_layout.c
+++ b/swad_layout.c
@@ -52,7 +52,6 @@
/*****************************************************************************/
extern struct Globals Gbl;
-extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
/*****************************************************************************/
/****************************** Public constants *****************************/
@@ -103,6 +102,7 @@ static void Lay_HelpTextEditor (const char *Text,const char *InlineMath,const ch
void Lay_WriteStartOfPage (void)
{
+ extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
extern const char *Txt_STR_LANG_ID[1+Txt_NUM_LANGUAGES];
extern const unsigned Txt_Current_CGI_SWAD_Language;
extern const char *The_TabOnBgColors[The_NUM_THEMES];
@@ -341,6 +341,8 @@ void Lay_WriteStartOfPage (void)
static void Lay_WriteEndOfPage (void)
{
+ extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
+
if (!Gbl.Layout.DivsEndWritten)
{
/***** End of central part of main zone *****/
@@ -393,6 +395,7 @@ static void Lay_WritePageTitle (void)
static void Lay_WriteRedirectionToMyLanguage (void)
{
+ extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
extern const char *Txt_STR_LANG_ID[1+Txt_NUM_LANGUAGES];
fprintf (Gbl.F.Out,"\n");
@@ -891,6 +897,7 @@ static void Lay_WriteBreadcrumb (void)
static void Lay_WriteTitleAction (void)
{
+ extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
extern const char *The_ClassTitleAction[The_NUM_THEMES];
extern const char *The_ClassSubtitleAction[The_NUM_THEMES];
extern const char *Txt_TABS_FULL_TXT[Tab_NUM_TABS];
@@ -1345,6 +1352,8 @@ void Lay_EndRoundFrameWithButton (Lay_Button_t Button,const char *TxtButton)
void Lay_ShowErrorAndExit (const char *Message)
{
+ extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
+
/***** Unlock tables if locked *****/
if (Gbl.DB.LockedTables)
{
diff --git a/swad_mail.c b/swad_mail.c
index c9a0ae14..128aa275 100644
--- a/swad_mail.c
+++ b/swad_mail.c
@@ -44,7 +44,6 @@
/*****************************************************************************/
extern struct Globals Gbl;
-extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
/*****************************************************************************/
/***************************** Private constants *****************************/
@@ -1342,6 +1341,7 @@ bool Mai_UpdateEmailInDB (const struct UsrData *UsrDat,const char *NewEmail)
bool Mai_SendMailMsgToConfirmEmail (void)
{
+ extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
extern const char *Txt_If_you_just_request_from_X_the_confirmation_of_your_email_Y_NO_HTML;
extern const char *Txt_Confirmation_of_your_email_NO_HTML;
extern const char *Txt_There_was_a_problem_sending_an_email_automatically;
diff --git a/swad_main.c b/swad_main.c
index 01d7ceee..bafb9cd0 100644
--- a/swad_main.c
+++ b/swad_main.c
@@ -49,7 +49,6 @@
/*****************************************************************************/
extern struct Globals Gbl;
-extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
/*****************************************************************************/
/******************************* Internal types ******************************/
@@ -69,6 +68,7 @@ extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
int main (int argc, char *argv[])
{
+ extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
extern const char *Txt_You_dont_have_permission_to_perform_this_action;
/*
diff --git a/swad_menu.c b/swad_menu.c
index 82a394eb..6c8dc4eb 100644
--- a/swad_menu.c
+++ b/swad_menu.c
@@ -40,7 +40,6 @@
/*****************************************************************************/
extern struct Globals Gbl;
-extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
/*****************************************************************************/
/****************************** Private constants ****************************/
@@ -221,6 +220,7 @@ Act_Action_t Mnu_GetFirstActionAvailableInCurrentTab (void)
void Mnu_WriteMenuThisTab (void)
{
+ extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
extern const char *The_ClassTxtMenuOn[The_NUM_THEMES];
extern const char *The_ClassTxtMenuOff[The_NUM_THEMES];
extern const char *Txt_MENU_TITLE[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB];
diff --git a/swad_message.c b/swad_message.c
index 355bda50..314f8b1c 100644
--- a/swad_message.c
+++ b/swad_message.c
@@ -51,7 +51,6 @@
/*****************************************************************************/
extern struct Globals Gbl;
-extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
/*****************************************************************************/
/***************************** Private constants *****************************/
@@ -3238,6 +3237,7 @@ static void Msg_WriteFormToReply (long MsgCod,long CrsCod,const char *Subject,
static void Msg_WriteMsgFrom (struct UsrData *UsrDat,bool Deleted)
{
+ extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
extern const char *Txt_MSG_Sent;
extern const char *Txt_MSG_Sent_and_deleted;
extern const char *Txt_ROLES_SINGUL_abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
diff --git a/swad_photo.c b/swad_photo.c
index e1dec023..68820664 100644
--- a/swad_photo.c
+++ b/swad_photo.c
@@ -52,7 +52,6 @@
/*****************************************************************************/
extern struct Globals Gbl;
-extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
/*****************************************************************************/
/****************************** Public constants *****************************/
@@ -1033,6 +1032,7 @@ void Pho_ShowUsrPhoto (const struct UsrData *UsrDat,const char *PhotoURL,
const char *ClassPhoto,Pho_Zoom_t Zoom,
bool FormUnique)
{
+ extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
char SpecialFullName [3*(Usr_MAX_BYTES_NAME_SPEC_CHAR+1)+1];
char SpecialShortName[3*(Usr_MAX_BYTES_NAME_SPEC_CHAR+1)+6];
char SpecialSurnames [2*(Usr_MAX_BYTES_NAME_SPEC_CHAR+1)+1];
diff --git a/swad_record.c b/swad_record.c
index 458f5c69..e7eb0484 100644
--- a/swad_record.c
+++ b/swad_record.c
@@ -51,7 +51,6 @@
/*****************************************************************************/
extern struct Globals Gbl;
-extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
/*****************************************************************************/
/***************************** Private constants *****************************/
@@ -2000,6 +1999,7 @@ void Rec_ShowCommonRecordUnmodifiable (struct UsrData *UsrDat)
void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView,
struct UsrData *UsrDat)
{
+ extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
extern const char *The_ClassForm[The_NUM_THEMES];
extern const char *Txt_Save_changes;
extern const char *Txt_Register;
diff --git a/swad_statistic.c b/swad_statistic.c
index a2196bcb..dee045f5 100644
--- a/swad_statistic.c
+++ b/swad_statistic.c
@@ -58,7 +58,6 @@
/*****************************************************************************/
extern struct Globals Gbl;
-extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
/*****************************************************************************/
/***************************** Private constants *****************************/
@@ -277,6 +276,7 @@ void Sta_GetRemoteAddr (void)
void Sta_LogAccess (const char *Comments)
{
+ extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
char Query[2048];
long LogCod;
Rol_Role_t RoleToStore = (Gbl.Action.Act == ActLogOut) ? Gbl.Usrs.Me.LoggedRoleBeforeCloseSession :
@@ -728,6 +728,7 @@ static void Sta_WriteSelectorCountType (void)
static void Sta_WriteSelectorAction (void)
{
+ extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
extern const char *The_ClassForm[The_NUM_THEMES];
extern const char *Txt_Action;
extern const char *Txt_TABS_SHORT_TXT[Tab_NUM_TABS];
@@ -755,7 +756,8 @@ static void Sta_WriteSelectorAction (void)
if (Txt_TABS_SHORT_TXT[Act_Actions[NumAction].Tab])
fprintf (Gbl.F.Out,"%s > ",
Txt_TABS_SHORT_TXT[Act_Actions[NumAction].Tab]);
- fprintf (Gbl.F.Out,"%s",Act_GetActionTextFromDB (Act_Actions[NumAction].ActCod,ActTxt));
+ fprintf (Gbl.F.Out,"%s",
+ Act_GetActionTextFromDB (Act_Actions[NumAction].ActCod,ActTxt));
}
fprintf (Gbl.F.Out,""
@@ -796,6 +798,7 @@ void Sta_SeeCrsAccesses (void)
static void Sta_ShowHits (Sta_GlobalOrCourseAccesses_t GlobalOrCourse)
{
+ extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
extern const char *Txt_You_must_select_one_ore_more_users;
extern const char *Txt_There_is_no_knowing_how_many_users_not_logged_have_accessed;
extern const char *Txt_The_date_range_must_be_less_than_or_equal_to_X_days;
diff --git a/swad_tab.c b/swad_tab.c
index be69366c..87f72ada 100644
--- a/swad_tab.c
+++ b/swad_tab.c
@@ -34,7 +34,6 @@
/*****************************************************************************/
extern struct Globals Gbl;
-extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
/*****************************************************************************/
/****************************** Private constants ****************************/
@@ -202,6 +201,7 @@ static bool Tab_CheckIfICanViewTab (Act_Tab_t Tab)
void Tab_DrawBreadcrumb (void)
{
+ extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
extern const char *The_TabOnBgColors[The_NUM_THEMES];
extern const char *The_ClassTxtTabOn[The_NUM_THEMES];
@@ -273,6 +273,7 @@ static void Tab_WriteBreadcrumbTab (void)
static void Tab_WriteBreadcrumbAction (void)
{
+ extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
extern const char *The_ClassTxtTabOn[The_NUM_THEMES];
const char *Title = Act_GetTitleAction (Gbl.Action.Act);
@@ -292,6 +293,8 @@ static void Tab_WriteBreadcrumbAction (void)
void Tab_SetCurrentTab (void)
{
+ extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
+
Gbl.Action.Tab = Act_Actions[Gbl.Action.Act].Tab;
/***** Change action and tab if country, institution, centre or degree
diff --git a/swad_user.c b/swad_user.c
index 8d52b300..38392d10 100644
--- a/swad_user.c
+++ b/swad_user.c
@@ -98,7 +98,6 @@ const char *Usr_UsrDatMainFieldNames[Usr_NUM_MAIN_FIELDS_DATA_USR];
/*****************************************************************************/
extern struct Globals Gbl;
-extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
/*****************************************************************************/
/************************* Internal global variables *************************/
@@ -203,6 +202,7 @@ static float Usr_GetNumUsrsPerCrs (Rol_Role_t Role);
void Usr_InformAboutNumClicksBeforePhoto (void)
{
+ extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
extern const char *Txt_You_must_send_your_photo_because_;
extern const char *Txt_You_can_only_perform_X_further_actions_;
char Message[512]; // Don't use Gbl.Message here, because it may be filled with another message and such message would be overwritten
diff --git a/swad_zip.c b/swad_zip.c
index 38eb5169..e906b29b 100644
--- a/swad_zip.c
+++ b/swad_zip.c
@@ -93,7 +93,6 @@ const Act_Action_t ZIP_ActZIPFolder[Brw_NUM_TYPES_FILE_BROWSER] =
/*****************************************************************************/
extern struct Globals Gbl;
-// extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
/*****************************************************************************/
/************************* Internal global variables *************************/