mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-28 08:03:36 +00:00
Enable image uploads in mediawiki at startup
Signed-off-by: Hemanth Kumar Veeranki <hemanthveeranki@gmail.com> Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
This commit is contained in:
parent
a33e295ae2
commit
85dd471c35
@ -88,6 +88,7 @@ def subcommand_setup(_):
|
||||
_disable_public_registrations()
|
||||
_disable_anonymous_editing()
|
||||
_change_logo()
|
||||
_enable_file_uploads()
|
||||
|
||||
|
||||
def _disable_public_registrations():
|
||||
@ -119,6 +120,20 @@ def _change_logo():
|
||||
file_handle.write(line)
|
||||
|
||||
|
||||
def _enable_file_uploads():
|
||||
"""Enable file uploads in mediawiki"""
|
||||
with open(CONF_FILE, 'r') as conf_file:
|
||||
lines = conf_file.readlines()
|
||||
with open(CONF_FILE, 'w') as conf_file:
|
||||
for line in lines:
|
||||
if line.startswith("$wgEnableUploads"):
|
||||
words = line.split()
|
||||
words[-1] = 'true;'
|
||||
conf_file.write(" ".join(words) + '\n')
|
||||
else:
|
||||
conf_file.write(line)
|
||||
|
||||
|
||||
def subcommand_change_password(arguments):
|
||||
"""Change the password for a given user"""
|
||||
new_password = ''.join(sys.stdin)
|
||||
|
||||
@ -26,7 +26,7 @@ from plinth.menu import main_menu
|
||||
|
||||
from .manifest import clients
|
||||
|
||||
version = 2
|
||||
version = 3
|
||||
|
||||
managed_packages = ['mediawiki', 'imagemagick', 'php-sqlite3']
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user