[glom] Don't network share new documents from (old) examples.



commit 8738a840086bde8e355aaa67a8d6714c2fce5e6b
Author: Murray Cumming <murrayc murrayc com>
Date:   Fri Apr 24 13:13:17 2009 +0200

    Don't network share new documents from (old) examples.
    
    * glom/libglom/document/document.cc: load_after(): Only assume network-sharing
    for older documents if it's not an example, so we don't have to resave all the
    examples.
---
 ChangeLog                         |    8 ++++++++
 glom/libglom/document/document.cc |    2 +-
 2 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 7eee2cb..2b4b77e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2009-04-24  Murray Cumming  <murrayc murrayc com>
+
+	Don't network share new documents from (old) examples.
+	
+	* glom/libglom/document/document.cc: load_after(): Only assume network-sharing 
+	for older documents if it's not an example, so we don't have to resave all the 
+	examples.
+
 2009-04-23  Murray Cumming  <murrayc murrayc com>
 
 	Fix loading of old self-hosted files, broken since defaulting to no sharing.
diff --git a/glom/libglom/document/document.cc b/glom/libglom/document/document.cc
index 52c3712..710514f 100644
--- a/glom/libglom/document/document.cc
+++ b/glom/libglom/document/document.cc
@@ -2368,7 +2368,7 @@ bool Document::load_after()
         m_network_shared = get_node_attribute_value_as_bool(nodeConnection, GLOM_ATTRIBUTE_CONNECTION_NETWORK_SHARED, false /* default */);
         
         //Older documents always defaulted to network-sharing with self-hosting.
-        if(!m_network_shared && (get_document_format_version() < 4))
+        if(!m_network_shared && !m_is_example && (get_document_format_version() < 4))
         {
           //Otherwise we would assume that the default user already exists,
           //and fail to ask for the user/password:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]