fixed type speical -> special (#3052)
Этот коммит содержится в:
коммит произвёл
Christopher Speller
родитель
09863c0b80
Коммит
20302c6953
@@ -227,7 +227,7 @@ func CreateUser(user *model.User) (*model.User, *model.AppError) {
|
|||||||
|
|
||||||
user.Roles = ""
|
user.Roles = ""
|
||||||
|
|
||||||
// Below is a speical case where the first user in the entire
|
// Below is a special case where the first user in the entire
|
||||||
// system is granted the system_admin role instead of admin
|
// system is granted the system_admin role instead of admin
|
||||||
if result := <-Srv.Store.User().GetTotalUsersCount(); result.Err != nil {
|
if result := <-Srv.Store.User().GetTotalUsersCount(); result.Err != nil {
|
||||||
return nil, result.Err
|
return nil, result.Err
|
||||||
@@ -793,7 +793,7 @@ func getInitialLoad(c *Context, w http.ResponseWriter, r *http.Request) {
|
|||||||
var cchan store.StoreChannel
|
var cchan store.StoreChannel
|
||||||
|
|
||||||
if sessionCache.Len() == 0 {
|
if sessionCache.Len() == 0 {
|
||||||
// Below is a speical case when intializating a new server
|
// Below is a special case when intializating a new server
|
||||||
// Lets check to make sure the server is really empty
|
// Lets check to make sure the server is really empty
|
||||||
|
|
||||||
cchan = Srv.Store.User().GetTotalUsersCount()
|
cchan = Srv.Store.User().GetTotalUsersCount()
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ func main() {
|
|||||||
l4g.Info(utils.T("mattermost.working_dir"), pwd)
|
l4g.Info(utils.T("mattermost.working_dir"), pwd)
|
||||||
l4g.Info(utils.T("mattermost.config_file"), utils.FindConfigFile(flagConfigFile))
|
l4g.Info(utils.T("mattermost.config_file"), utils.FindConfigFile(flagConfigFile))
|
||||||
|
|
||||||
// Speical case for upgrading the db to 3.0
|
// Special case for upgrading the db to 3.0
|
||||||
// ADDED for 3.0 REMOVE for 3.4
|
// ADDED for 3.0 REMOVE for 3.4
|
||||||
cmdUpdateDb30()
|
cmdUpdateDb30()
|
||||||
|
|
||||||
@@ -351,7 +351,7 @@ func cmdUpdateDb30() {
|
|||||||
store := api.Srv.Store.(*store.SqlStore)
|
store := api.Srv.Store.(*store.SqlStore)
|
||||||
utils.InitHTML()
|
utils.InitHTML()
|
||||||
|
|
||||||
l4g.Info("Attempting to run speical upgrade of the database schema to version 3.0 for user model changes")
|
l4g.Info("Attempting to run special upgrade of the database schema to version 3.0 for user model changes")
|
||||||
time.Sleep(time.Second)
|
time.Sleep(time.Second)
|
||||||
|
|
||||||
if !store.DoesColumnExist("Users", "TeamId") {
|
if !store.DoesColumnExist("Users", "TeamId") {
|
||||||
@@ -406,7 +406,7 @@ func cmdUpdateDb30() {
|
|||||||
flushLogAndExit(1)
|
flushLogAndExit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
l4g.Info("Starting speical 3.0 database upgrade with performed_backup=YES team_name=%v", team.Name)
|
l4g.Info("Starting special 3.0 database upgrade with performed_backup=YES team_name=%v", team.Name)
|
||||||
l4g.Info("Primary team %v will be left unchanged", team.Name)
|
l4g.Info("Primary team %v will be left unchanged", team.Name)
|
||||||
l4g.Info("Upgrading primary team %v", team.Name)
|
l4g.Info("Upgrading primary team %v", team.Name)
|
||||||
|
|
||||||
@@ -481,7 +481,7 @@ func cmdUpdateDb30() {
|
|||||||
store.RemoveColumnIfExists("Users", "TeamId")
|
store.RemoveColumnIfExists("Users", "TeamId")
|
||||||
}
|
}
|
||||||
|
|
||||||
l4g.Info("Finished running speical upgrade of the database schema to version 3.0 for user model changes")
|
l4g.Info("Finished running special upgrade of the database schema to version 3.0 for user model changes")
|
||||||
|
|
||||||
if result := <-store.System().Update(&model.System{Name: "Version", Value: model.CurrentVersion}); result.Err != nil {
|
if result := <-store.System().Update(&model.System{Name: "Version", Value: model.CurrentVersion}); result.Err != nil {
|
||||||
l4g.Error("Failed to update system schema version details=%v", result.Err)
|
l4g.Error("Failed to update system schema version details=%v", result.Err)
|
||||||
|
|||||||
@@ -629,7 +629,7 @@ func (s SqlPostStore) Search(teamId string, userId string, params *model.SearchP
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// these chars have speical meaning and can be treated as spaces
|
// these chars have special meaning and can be treated as spaces
|
||||||
for _, c := range specialSearchChar {
|
for _, c := range specialSearchChar {
|
||||||
terms = strings.Replace(terms, c, " ", -1)
|
terms = strings.Replace(terms, c, " ", -1)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ func NewSqlStore() Store {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// This is a speical case for upgrading the schema to the 3.0 user model
|
// This is a special case for upgrading the schema to the 3.0 user model
|
||||||
// ADDED for 3.0 REMOVE for 3.4
|
// ADDED for 3.0 REMOVE for 3.4
|
||||||
if sqlStore.SchemaVersion == "2.2.0" ||
|
if sqlStore.SchemaVersion == "2.2.0" ||
|
||||||
sqlStore.SchemaVersion == "2.1.0" ||
|
sqlStore.SchemaVersion == "2.1.0" ||
|
||||||
@@ -183,7 +183,7 @@ func NewSqlStore() Store {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ADDED for 3.0 REMOVE for 3.4
|
// ADDED for 3.0 REMOVE for 3.4
|
||||||
// This is a speical case for upgrading the schema to the 3.0 user model
|
// This is a special case for upgrading the schema to the 3.0 user model
|
||||||
func NewSqlStoreForUpgrade30() *SqlStore {
|
func NewSqlStoreForUpgrade30() *SqlStore {
|
||||||
sqlStore := initConnection()
|
sqlStore := initConnection()
|
||||||
|
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user