Your ROOT_URL in app.ini is http://git.osmesh.ru/ but you are visiting http://91.221.70.94:3000/MOS/OpenBoard/commit/f49e2fa75eaf9f08194768a00f9a897013015e9f?style=unified&whitespace=ignore-eol
You should set ROOT_URL correctly, otherwise the web may not work correctly.
4 changed files with
10 additions and
6 deletions
src/adaptors/UBImportDocument.cpp
src/core/UBPersistenceManager.cpp
src/core/UBPersistenceManager.h
src/core/main.cpp
@ -171,8 +171,11 @@ UBDocumentProxy* UBImportDocument::importFile(const QFile& pFile, const QString&
return NULL ;
}
bool addTitlePage = false ;
if ( UBSettings : : settings ( ) - > teacherGuidePageZeroActivated - > get ( ) . toBool ( ) & & ! QFile ( documentRootFolder + " /page000.svg " ) . exists ( ) )
addTitlePage = true ;
UBDocumentProxy * newDocument = UBPersistenceManager : : persistenceManager ( ) - > createDocumentFromDir ( documentRootFolder , pGroup ) ;
UBDocumentProxy * newDocument = UBPersistenceManager : : persistenceManager ( ) - > createDocumentFromDir ( documentRootFolder , pGroup , " " , false , addTitlePage ) ;
UBApplication : : showMessage ( tr ( " Import successful. " ) ) ;
return newDocument ;
}
@ -265,7 +265,7 @@ UBDocumentProxy* UBPersistenceManager::createDocument(const QString& pGroupName,
return doc ;
}
UBDocumentProxy * UBPersistenceManager : : createDocumentFromDir ( const QString & pDocumentDirectory , const QString & pGroupName , const QString & pName , bool withEmptyPage )
UBDocumentProxy * UBPersistenceManager : : createDocumentFromDir ( const QString & pDocumentDirectory , const QString & pGroupName , const QString & pName , bool withEmptyPage , bool addTitlePage )
{
checkIfDocumentRepositoryExists ( ) ;
@ -280,7 +280,8 @@ UBDocumentProxy* UBPersistenceManager::createDocumentFromDir(const QString& pDoc
{
doc - > setMetaData ( UBSettings : : documentName , pName ) ;
}
if ( withEmptyPage ) createDocumentSceneAt ( doc , 0 ) ;
if ( withEmptyPage ) createDocumentSceneAt ( doc , 0 ) ;
if ( addTitlePage ) persistDocumentScene ( doc , mSceneCache . createScene ( doc , 0 , false ) , 0 ) ;
QMap < QString , QVariant > metadatas = UBMetadataDcSubsetAdaptor : : load ( pDocumentDirectory ) ;
@ -47,7 +47,7 @@ class UBPersistenceManager : public QObject
static void destroy ( ) ;
virtual UBDocumentProxy * createDocument ( const QString & pGroupName = " " , const QString & pName = " " , bool withEmptyPage = true ) ;
virtual UBDocumentProxy * createDocumentFromDir ( const QString & pDocumentDirectory , const QString & pGroupName = " " , const QString & pName = " " , bool withEmptyPage = false ) ;
virtual UBDocumentProxy * createDocumentFromDir ( const QString & pDocumentDirectory , const QString & pGroupName = " " , const QString & pName = " " , bool withEmptyPage = false , bool addTitlePage = false ) ;
virtual UBDocumentProxy * persistDocumentMetadata ( UBDocumentProxy * pDocumentProxy ) ;
@ -129,7 +129,7 @@ int main(int argc, char *argv[])
QObject : : connect ( & app , SIGNAL ( messageReceived ( const QString & ) ) , & app , SLOT ( handleOpenMessage ( const QString & ) ) ) ;
qDebug ( ) < < fileToOpen ;
qDebug ( ) < < " file name argument " < < fileToOpen ;
int result = app . exec ( fileToOpen ) ;
app . cleanup ( ) ;