mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-11 03:05:40 +02:00
Version 16.61.7
This commit is contained in:
parent
acc8fe3a2d
commit
494f30fded
|
@ -157,13 +157,14 @@
|
|||
/****************************** Public constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 16.61.6 (2016-11-14)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 16.61.7 (2016-11-14)"
|
||||
#define CSS_FILE "swad16.60.1.css"
|
||||
#define JS_FILE "swad16.46.1.js"
|
||||
|
||||
// Number of lines (includes comments but not blank lines) has been got with the following command:
|
||||
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*?.h sql/swad*.sql | tail -1
|
||||
/*
|
||||
Version 16.61.7: Nov 14, 2016 Code refactoring in clipboard. (207155 lines)
|
||||
Version 16.61.6: Nov 14, 2016 Code refactoring in clipboard. (207167 lines)
|
||||
Version 16.61.5: Nov 14, 2016 New alert type: clipboard. (207161 lines)
|
||||
Version 16.61.4: Nov 14, 2016 Copy source is displayed as an alert. (207158 lines)
|
||||
|
|
|
@ -6825,24 +6825,22 @@ static bool Brw_GetMyClipboard (void)
|
|||
unsigned NumRows;
|
||||
unsigned UnsignedNum;
|
||||
|
||||
/***** Clear clipboard data *****/
|
||||
Gbl.FileBrowser.Clipboard.FileBrowser = Brw_UNKNOWN;
|
||||
Gbl.FileBrowser.Clipboard.Cod = -1L;
|
||||
Gbl.FileBrowser.Clipboard.WorksUsrCod = -1L;
|
||||
Gbl.FileBrowser.Clipboard.FileType = Brw_IS_UNKNOWN;
|
||||
Gbl.FileBrowser.Clipboard.Path[0] = '\0';
|
||||
Gbl.FileBrowser.Clipboard.FileName[0] = '\0';
|
||||
Gbl.FileBrowser.Clipboard.Level = 0;
|
||||
|
||||
/***** Get my current clipboard from database *****/
|
||||
sprintf (Query,"SELECT FileBrowser,Cod,WorksUsrCod,FileType,Path"
|
||||
" FROM clipboard WHERE UsrCod='%ld'",
|
||||
Gbl.Usrs.Me.UsrDat.UsrCod);
|
||||
NumRows = DB_QuerySELECT (Query,&mysql_res,"can not get source of copy from clipboard");
|
||||
NumRows = (unsigned) DB_QuerySELECT (Query,&mysql_res,"can not get source of copy from clipboard");
|
||||
|
||||
/***** Depending on the number of rows of the result... *****/
|
||||
if (NumRows == 0)
|
||||
{
|
||||
/***** Clear clipboard data *****/
|
||||
Gbl.FileBrowser.Clipboard.FileBrowser = Brw_UNKNOWN;
|
||||
Gbl.FileBrowser.Clipboard.Cod = -1L;
|
||||
Gbl.FileBrowser.Clipboard.WorksUsrCod = -1L;
|
||||
Gbl.FileBrowser.Clipboard.FileType = Brw_IS_UNKNOWN;
|
||||
Gbl.FileBrowser.Clipboard.Path[0] = '\0';
|
||||
Gbl.FileBrowser.Clipboard.FileName[0] = '\0';
|
||||
}
|
||||
else if (NumRows == 1)
|
||||
if (NumRows == 1)
|
||||
{
|
||||
/***** Get clipboard data *****/
|
||||
row = mysql_fetch_row (mysql_res);
|
||||
|
@ -6874,24 +6872,15 @@ static bool Brw_GetMyClipboard (void)
|
|||
(number of slashes in full path, including file or folder) */
|
||||
Brw_SetClipboardLevel ();
|
||||
}
|
||||
else
|
||||
{
|
||||
Gbl.FileBrowser.Clipboard.FileBrowser = Brw_UNKNOWN;
|
||||
Gbl.FileBrowser.Clipboard.Cod = -1L;
|
||||
Gbl.FileBrowser.Clipboard.WorksUsrCod = -1L;
|
||||
Gbl.FileBrowser.Clipboard.FileType = Brw_IS_UNKNOWN;
|
||||
Gbl.FileBrowser.Clipboard.Path[0] = '\0';
|
||||
Gbl.FileBrowser.Clipboard.FileName[0] = '\0';
|
||||
Gbl.FileBrowser.Clipboard.Level = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
Lay_ShowErrorAndExit ("Error when getting source of copy.");
|
||||
|
||||
/***** Free structure that stores the query result *****/
|
||||
DB_FreeMySQLResult (&mysql_res);
|
||||
|
||||
return (bool) (NumRows != 0);
|
||||
if (NumRows > 1)
|
||||
Lay_ShowErrorAndExit ("Error when getting source of copy.");
|
||||
|
||||
return (bool) (NumRows == 1);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
Loading…
Reference in New Issue
Block a user