820
821
822
823
824
825
826
827
828
829
830
831
832
833
|
/*
** WEBPAGE: chat-backup hidden
**
** Download an SQLite database containing all chat content with a
** message-id larger than the "msgid" query parameter. Setup
** privilege is required to use this URL.
*/
void chat_backup_webpage(void){
int msgid;
unsigned char *pDb = 0;
sqlite3_int64 szDb = 0;
Blob chatDb;
login_check_credentials();
|
>
>
|
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
|
/*
** WEBPAGE: chat-backup hidden
**
** Download an SQLite database containing all chat content with a
** message-id larger than the "msgid" query parameter. Setup
** privilege is required to use this URL.
**
** This is used to implement the "fossil chat pull" command.
*/
void chat_backup_webpage(void){
int msgid;
unsigned char *pDb = 0;
sqlite3_int64 szDb = 0;
Blob chatDb;
login_check_credentials();
|
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
|
**
** When there is no SUBCOMMAND (when this command is simply "fossil chat")
** the response is to bring up a web-browser window to the chatroom
** on the default system web-browser. You can accomplish the same by
** typing the appropriate URL into the web-browser yourself. This
** command is merely a convenience for command-line oriented people.
**
** > fossil chat backup
**
** Copy chat content from the server down into the local clone,
** as a backup. Setup privilege is required on the server.
**
** --all Download all chat content. Normally only
** previously undownloaded content is retrieved.
** --debug Additional debugging output.
** --out DATABASE Store CHAT table in separate database file
** DATABASE rather that adding to local clone
** --unsafe Allow the use of unencrypted http://
|
|
|
|
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
|
**
** When there is no SUBCOMMAND (when this command is simply "fossil chat")
** the response is to bring up a web-browser window to the chatroom
** on the default system web-browser. You can accomplish the same by
** typing the appropriate URL into the web-browser yourself. This
** command is merely a convenience for command-line oriented people.
**
** > fossil chat pull
**
** Copy chat content from the server down into the local clone,
** as a backup or archive. Setup privilege is required on the server.
**
** --all Download all chat content. Normally only
** previously undownloaded content is retrieved.
** --debug Additional debugging output.
** --out DATABASE Store CHAT table in separate database file
** DATABASE rather that adding to local clone
** --unsafe Allow the use of unencrypted http://
|
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
|
fossil_print("ERROR: username and/or password is incorrect\n");
}else{
fossil_print("ERROR: %s\n", blob_str(&down));
}
fossil_fatal("unable to send the chat message");
}
blob_reset(&down);
}else if( strcmp(g.argv[2],"backup")==0 ){
/* Pull the CHAT table from the default server down into the repository
** here on the local side */
int allowUnsafe = find_option("unsafe",0,0)!=0;
int bDebug = find_option("debug",0,0)!=0;
const char *zOut = find_option("out",0,1);
int bAll = find_option("all",0,0)!=0;
int mFlags = HTTP_GENERIC | HTTP_QUIET | HTTP_NOCOMPRESS;
|
|
|
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
|
fossil_print("ERROR: username and/or password is incorrect\n");
}else{
fossil_print("ERROR: %s\n", blob_str(&down));
}
fossil_fatal("unable to send the chat message");
}
blob_reset(&down);
}else if( strcmp(g.argv[2],"pull")==0 ){
/* Pull the CHAT table from the default server down into the repository
** here on the local side */
int allowUnsafe = find_option("unsafe",0,0)!=0;
int bDebug = find_option("debug",0,0)!=0;
const char *zOut = find_option("out",0,1);
int bAll = find_option("all",0,0)!=0;
int mFlags = HTTP_GENERIC | HTTP_QUIET | HTTP_NOCOMPRESS;
|