mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Merge pull request #957 from sharelatex/hb-force-v1-image-templates
Force gallery items to use legacy OL v1 texlive image
This commit is contained in:
commit
a524f99fbf
2 changed files with 21 additions and 10 deletions
|
@ -45,6 +45,7 @@ module.exports = TemplatesController =
|
|||
docId: req.body.docId
|
||||
templateId: req.body.templateId
|
||||
templateVersionId: req.body.templateVersionId
|
||||
image: 'wl_texlive:2018.1'
|
||||
},
|
||||
req,
|
||||
res
|
||||
|
@ -63,6 +64,7 @@ module.exports = TemplatesController =
|
|||
logger.err err:err, zipReq:zipReq, "problem building project from zip"
|
||||
return res.sendStatus 500
|
||||
setCompiler project._id, options.compiler, ->
|
||||
setImage project._id, options.image, ->
|
||||
fs.unlink dumpPath, ->
|
||||
delete req.session.templateData
|
||||
conditions = {_id:project._id}
|
||||
|
@ -78,3 +80,9 @@ setCompiler = (project_id, compiler, callback)->
|
|||
ProjectOptionsHandler.setCompiler project_id, compiler, callback
|
||||
else
|
||||
callback()
|
||||
|
||||
setImage = (project_id, imageName, callback)->
|
||||
if imageName?
|
||||
ProjectOptionsHandler.setImageName project_id, imageName, callback
|
||||
else
|
||||
callback()
|
||||
|
|
|
@ -22,7 +22,10 @@ describe 'TemplatesController', ->
|
|||
}
|
||||
@ProjectUploadManager = {createProjectFromZipArchive : sinon.stub().callsArgWith(3, null, {_id:project_id})}
|
||||
@dumpFolder = "dump/path"
|
||||
@ProjectOptionsHandler = {setCompiler:sinon.stub().callsArgWith(2)}
|
||||
@ProjectOptionsHandler = {
|
||||
setCompiler:sinon.stub().callsArgWith(2)
|
||||
setImageName:sinon.stub().callsArgWith(2)
|
||||
}
|
||||
@uuid = "1234"
|
||||
@ProjectDetailsHandler =
|
||||
getProjectDescription:sinon.stub()
|
||||
|
|
Loading…
Reference in a new issue