This repository was archived by the owner on Sep 10, 2021. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,6 +30,11 @@ function indexAction()
3030 {
3131 $ this ->requireAdminPrivileges ();
3232 $ 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+ }
3338
3439 $ breadcrumbs = array ();
3540 $ breadcrumbs [] = array ('type ' => 'moduleList ' );
@@ -49,7 +54,9 @@ function submitAction()
4954 $ this ->disableView ();
5055
5156 $ 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 );
5360
5461 echo JsonComponent::encode (array ('message ' => 'Changes saved ' , 'status ' => 'ok ' ));
5562 }
Original file line number Diff line number Diff line change @@ -27,6 +27,14 @@ $this->headScript()->appendFile($this->moduleWebroot.'/public/js/config/config.i
2727 <label for="repoBrowserUrl">Repository Browser URL</label>
2828 <input type="text" name="repoBrowserUrl" value="<?php echo $ this ->repoBrowserUrl ;?> " />
2929 </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>
3038 <div>
3139 <input type="submit" value="Save" />
3240 </div>
You can’t perform that action at this time.
0 commit comments