This repository was archived by the owner on Sep 10, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,11 @@ function indexAction()
30
30
{
31
31
$ this ->requireAdminPrivileges ();
32
32
$ this ->view ->repoBrowserUrl = $ this ->Setting ->getValueByName ('repoBrowserUrl ' , $ this ->moduleName );
33
+ $ this ->view ->tempScalarTtl = $ this ->Setting ->getValueByName ('tempScalarTtl ' , $ this ->moduleName );
34
+ if (!$ this ->view ->tempScalarTtl )
35
+ {
36
+ $ this ->view ->tempScalarTtl = 24 ; //default to 24 hours
37
+ }
33
38
34
39
$ breadcrumbs = array ();
35
40
$ breadcrumbs [] = array ('type ' => 'moduleList ' );
@@ -49,7 +54,9 @@ function submitAction()
49
54
$ this ->disableView ();
50
55
51
56
$ repoBrowserUrl = $ this ->_getParam ('repoBrowserUrl ' );
52
- $ this ->Setting ->setConfig ('repoBrowserUrl ' , $ repoBrowserUrl , $ this ->moduleName );
57
+ $ tempScalarTtl = $ this ->_getParam ('tempScalarTtl ' );
58
+ $ this ->Setting ->setConfig ('repoBrowserUrl ' , $ repoBrowserUrl , $ this ->moduleName );
59
+ $ this ->Setting ->setConfig ('tempScalarTtl ' , $ tempScalarTtl , $ this ->moduleName );
53
60
54
61
echo JsonComponent::encode (array ('message ' => 'Changes saved ' , 'status ' => 'ok ' ));
55
62
}
Original file line number Diff line number Diff line change @@ -27,6 +27,14 @@ $this->headScript()->appendFile($this->moduleWebroot.'/public/js/config/config.i
27
27
<label for="repoBrowserUrl">Repository Browser URL</label>
28
28
<input type="text" name="repoBrowserUrl" value="<?php echo $ this ->repoBrowserUrl ;?> " />
29
29
</div>
30
+ <div class="explanation">
31
+ <p>Set this field to the number of hours that unofficial submissions should be kept before being deleted automatically
32
+ by the scheduler. The default value is 24 hours.</p>
33
+ </div>
34
+ <div>
35
+ <label for="tempScalarTtl">Unofficial Scalar TTL</label>
36
+ <input type="text" name="tempScalarTtl" value="<?php echo $ this ->tempScalarTtl ;?> " />
37
+ </div>
30
38
<div>
31
39
<input type="submit" value="Save" />
32
40
</div>
You can’t perform that action at this time.
0 commit comments