Fossil SCM
The SQL parameter $login in the SQL for a report returns the name of the login name of the current user.
Commit
a4249d2180521bddb2df2a2d6f168f5611dc7539
Parent
e00e6205b624f0a…
1 file changed
+3
+3
| --- src/report.c | ||
| +++ src/report.c | ||
| @@ -864,10 +864,13 @@ | ||
| 864 | 864 | if( !sqlite3_stmt_readonly(pStmt) ){ |
| 865 | 865 | sqlite3_finalize(pStmt); |
| 866 | 866 | return SQLITE_ERROR; |
| 867 | 867 | } |
| 868 | 868 | |
| 869 | + i = sqlite3_bind_parameter_index(pStmt, "$login"); | |
| 870 | + if( i ) sqlite3_bind_text(pStmt, i, g.zLogin, -1, SQLITE_TRANSIENT); | |
| 871 | + | |
| 869 | 872 | nCol = sqlite3_column_count(pStmt); |
| 870 | 873 | azVals = fossil_malloc(2*nCol*sizeof(const char*) + 1); |
| 871 | 874 | while( (rc = sqlite3_step(pStmt))==SQLITE_ROW ){ |
| 872 | 875 | if( azCols==0 ){ |
| 873 | 876 | azCols = &azVals[nCol]; |
| 874 | 877 |
| --- src/report.c | |
| +++ src/report.c | |
| @@ -864,10 +864,13 @@ | |
| 864 | if( !sqlite3_stmt_readonly(pStmt) ){ |
| 865 | sqlite3_finalize(pStmt); |
| 866 | return SQLITE_ERROR; |
| 867 | } |
| 868 | |
| 869 | nCol = sqlite3_column_count(pStmt); |
| 870 | azVals = fossil_malloc(2*nCol*sizeof(const char*) + 1); |
| 871 | while( (rc = sqlite3_step(pStmt))==SQLITE_ROW ){ |
| 872 | if( azCols==0 ){ |
| 873 | azCols = &azVals[nCol]; |
| 874 |
| --- src/report.c | |
| +++ src/report.c | |
| @@ -864,10 +864,13 @@ | |
| 864 | if( !sqlite3_stmt_readonly(pStmt) ){ |
| 865 | sqlite3_finalize(pStmt); |
| 866 | return SQLITE_ERROR; |
| 867 | } |
| 868 | |
| 869 | i = sqlite3_bind_parameter_index(pStmt, "$login"); |
| 870 | if( i ) sqlite3_bind_text(pStmt, i, g.zLogin, -1, SQLITE_TRANSIENT); |
| 871 | |
| 872 | nCol = sqlite3_column_count(pStmt); |
| 873 | azVals = fossil_malloc(2*nCol*sizeof(const char*) + 1); |
| 874 | while( (rc = sqlite3_step(pStmt))==SQLITE_ROW ){ |
| 875 | if( azCols==0 ){ |
| 876 | azCols = &azVals[nCol]; |
| 877 |