660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
|
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
|
fossil_print("%s: ambiguous command prefix: %s\n"
"%s: could be any of:%s\n"
"%s: use \"help\" for more information\n",
g.argv[0], zCmdName, g.argv[0], blob_str(&couldbe), g.argv[0]);
fossil_exit(1);
}
atexit( fossil_atexit );
/*
** The TH1 return codes from the hook will be handled as follows:
**
** TH_OK: The xFunc() and the TH1 notification will both be executed.
**
** TH_ERROR: The xFunc() and the TH1 notification will both be skipped.
**
** TH_BREAK: The xFunc() and the TH1 notification will both be skipped.
**
** TH_RETURN: The xFunc() will be executed, the TH1 notification will be
** skipped.
**
** TH_CONTINUE: The xFunc() will be skipped, the TH1 notification will be
** executed.
*/
if( g.isHTTP || g.fNoThHook ||
Th_CommandHook(aCommand[idx].zName, aCommand[idx].cmdFlags)==TH_OK ){
aCommand[idx].xFunc();
if( !g.isHTTP && !g.fNoThHook ){
if( !g.isHTTP && !g.fNoThHook ){
rc = Th_CommandHook(aCommand[idx].zName, aCommand[idx].cmdFlags);
}else{
rc = TH_OK;
}
if( rc==TH_OK || rc==TH_RETURN || rc==TH_CONTINUE ){
if( rc==TH_OK || rc==TH_RETURN ){ aCommand[idx].xFunc(); }
if( !g.isHTTP && !g.fNoThHook && (rc==TH_OK || rc==TH_CONTINUE) ){
Th_CommandNotify(aCommand[idx].zName, aCommand[idx].cmdFlags);
}
}
fossil_exit(0);
/*NOT_REACHED*/
return 0;
}
|
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
|
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
|
#endif
{
@ <h1>Server Configuration Error</h1>
@ <p>The database schema on the server is out-of-date. Please ask
@ the administrator to run <b>fossil rebuild</b>.</p>
}
}else{
/*
** The TH1 return codes from the hook will be handled as follows:
**
** TH_OK: The xFunc() and the TH1 notification will both be executed.
**
** TH_ERROR: The xFunc() and the TH1 notification will both be skipped.
**
** TH_BREAK: The xFunc() and the TH1 notification will both be skipped.
**
** TH_RETURN: The xFunc() will be executed, the TH1 notification will be
** skipped.
**
** TH_CONTINUE: The xFunc() will be skipped, the TH1 notification will be
** executed.
*/
int rc;
if( g.isHTTP || g.fNoThHook ||
Th_WebpageHook(aWebpage[idx].zName, aWebpage[idx].cmdFlags)==TH_OK ){
aWebpage[idx].xFunc();
if( !g.isHTTP && !g.fNoThHook ){
if( !g.isHTTP && !g.fNoThHook ){
rc = Th_WebpageHook(aWebpage[idx].zName, aWebpage[idx].cmdFlags);
}else{
rc = TH_OK;
}
if( rc==TH_OK || rc==TH_RETURN || rc==TH_CONTINUE ){
if( rc==TH_OK || rc==TH_RETURN ){ aWebpage[idx].xFunc(); }
if( !g.isHTTP && !g.fNoThHook && (rc==TH_OK || rc==TH_CONTINUE) ){
Th_WebpageNotify(aWebpage[idx].zName, aWebpage[idx].cmdFlags);
}
}
}
/* Return the result.
*/
|