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

[EP-tech] Programatically find the cfg.d directory



$repository->config('archiveroot') . '/cfg/cfg.d';

?but be careful with what you do to it ? all code in there is executed.  It?s a vector for code injection.

[cid:image001.png at 01D1D931.D71641C0]<http://www.jisc.ac.uk/>

Adam Field
SHERPA services analyst developer



From: <eprints-tech-bounces at ecs.soton.ac.uk> on behalf of "Alan.Stiles" <alan.stiles at open.ac.uk>
Reply-To: "eprints-tech at ecs.soton.ac.uk" <eprints-tech at ecs.soton.ac.uk>
Date: Friday, 8 July 2016 15:28
To: "eprints-tech at ecs.soton.ac.uk" <eprints-tech at ecs.soton.ac.uk>
Subject: [EP-tech] Programatically find the cfg.d directory

Is there a simple way to find the cfg.d directory for an archive from within the archive?
I?m thinking that I want to create a config file to hold e.g. an authorisation token that I?ve obtained via an API.  It?s 1 token per repository so I don?t really want to create a database table to just hold that, and I?d rather not try and get an admin to transcribe the token into a config file by hand if I don?t have to.

Unless anyone has a better suggestion for how to store it?  Pointers to example code also gratefully received?

Alan.
-- The Open University is incorporated by Royal Charter (RC 000391), an exempt charity in England & Wales and a charity registered in Scotland (SC 038302). The Open University is authorised and regulated by the Financial Conduct Authority.

Jisc is a registered charity (number 1149740) and a company limited by guarantee which is registered in England under Company No. 5747339, VAT No. GB 197 0632 86. Jisc?s registered office is: One Castlepark, Tower Hill, Bristol, BS2 0JA. T 0203 697 5800.

Jisc Services Limited is a wholly owned Jisc subsidiary and a company limited by guarantee which is registered in England under company number 2881024, VAT number GB 197 0632 86. The registered office is: One Castle Park, Tower Hill, Bristol BS2 0JA. T 0203 697 5800.  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20160708/8e15abf1/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 1264 bytes
Desc: image001.png
Url : http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20160708/8e15abf1/attachment.png