aboutsummaryrefslogtreecommitdiffstats
path: root/modules/mediawiki/templates/LocalSettings.php
diff options
context:
space:
mode:
authorDan Fandrich <danf@mageia.org>2024-10-05 16:09:13 -0700
committerDan Fandrich <danf@mageia.org>2024-10-05 16:39:54 -0700
commita7797c331e1fa86bdef5c49d6870d822dc591217 (patch)
treeab13b66e6f59511f98c5973ecbff36af876b57cc /modules/mediawiki/templates/LocalSettings.php
parent9d1a749d073a5997cd435ac51c5c65eb050b2af5 (diff)
downloadpuppet-a7797c331e1fa86bdef5c49d6870d822dc591217.tar
puppet-a7797c331e1fa86bdef5c49d6870d822dc591217.tar.gz
puppet-a7797c331e1fa86bdef5c49d6870d822dc591217.tar.bz2
puppet-a7797c331e1fa86bdef5c49d6870d822dc591217.tar.xz
puppet-a7797c331e1fa86bdef5c49d6870d822dc591217.zip
Use @ when accessing variables in templates
Access without the @ symbol is the older method and is discouraged. This take leaves alone accesses of variables that are defined within the template, which don't seem to allow an @. This batch of changes is for templates related to web sites.
Diffstat (limited to 'modules/mediawiki/templates/LocalSettings.php')
-rw-r--r--modules/mediawiki/templates/LocalSettings.php42
1 files changed, 21 insertions, 21 deletions
diff --git a/modules/mediawiki/templates/LocalSettings.php b/modules/mediawiki/templates/LocalSettings.php
index 36b3054f..c340dfd9 100644
--- a/modules/mediawiki/templates/LocalSettings.php
+++ b/modules/mediawiki/templates/LocalSettings.php
@@ -24,7 +24,7 @@ set_include_path( implode( PATH_SEPARATOR, $path ) . PATH_SEPARATOR . get_includ
## Uncomment this to disable output compression
# $wgDisableOutputCompression = true;
-$wgSitename = "<%= title %>";
+$wgSitename = "<%= @title %>";
# $wgMetaNamespace = ""; # Defaults to $wgSitename
## The URL base path to the directory containing the wiki;
@@ -32,7 +32,7 @@ $wgSitename = "<%= title %>";
## For more information on customizing the URLs
## (like /w/index.php/Page_title to /wiki/Page_title) please see:
## https://www.mediawiki.org/wiki/Manual:Short_URL
-$wgScriptPath = "/<%= path %>";
+$wgScriptPath = "/<%= @path %>";
## The protocol and server name to use in fully-qualified URLs
$wgServer = "https://wiki.mageia.org";
@@ -52,8 +52,8 @@ $wgLogo = "$wgStylePath/common/images/wiki_mga.png";
$wgEnableEmail = true;
$wgEnableUserEmail = true; # UPO
-$wgEmergencyContact = "root@<%= domain %>";
-$wgPasswordSender = "wiki_noreply@ml.<%= domain %>";
+$wgEmergencyContact = "root@<%= @domain %>";
+$wgPasswordSender = "wiki_noreply@ml.<%= @domain %>";
$wgEnotifUserTalk = true; # UPO
$wgEnotifWatchlist = true; # UPO
@@ -61,10 +61,10 @@ $wgEmailAuthentication = true;
## Database settings
$wgDBtype = "postgres";
-$wgDBserver = "pg.<%= domain %>";
-$wgDBname = "<%= db_name %>";
-$wgDBuser = "<%= db_user %>";
-$wgDBpassword = "<%= db_password %>";
+$wgDBserver = "pg.<%= @domain %>";
+$wgDBname = "<%= @db_name %>";
+$wgDBuser = "<%= @db_user %>";
+$wgDBpassword = "<%= @db_password %>";
# Postgres specific settings
$wgDBport = "5432";
@@ -97,22 +97,22 @@ $wgShellLocale = "en_US.UTF-8";
# This seems actually mandatory to get the Vector skin to work properly
# https://serverfault.com/a/744059
# FIXME: Dehardcode that path (maybe via ${wiki_root} if exposed?)
-$wgCacheDirectory = "/srv/wiki/<%= path %>/cache";
+$wgCacheDirectory = "/srv/wiki/<%= @path %>/cache";
-$wgUploadDirectory = "/srv/wiki/<%= path %>/images";
+$wgUploadDirectory = "/srv/wiki/<%= @path %>/images";
# This seems mandatory to get the Vector skin to work properly
# https://phabricator.wikimedia.org/T119934
# FIXME: Dehardcode that path (maybe via ${wiki_root} if exposed?)
-$wgTmpDirectory = "/srv/wiki/<%= path %>/tmp";
+$wgTmpDirectory = "/srv/wiki/<%= @path %>/tmp";
# Array of interwiki prefixes for current wiki.
$wgLocalInterwikis = array( strtolower( $wgSitename ) );
# Site language code, should be one of the list in ./languages/data/Names.php
-$wgLanguageCode = "<%= lang %>";
+$wgLanguageCode = "<%= @lang %>";
-$wgSecretKey = "<%= secret_key %>";
+$wgSecretKey = "<%= @secret_key %>";
# Changing this will log out all existing sessions.
$wgAuthenticationTokenVersion = "1";
@@ -180,19 +180,19 @@ $wgLDAPUseLocal = false;
$wgLDAPDomainNames = array( 'ldap' );
# TODO make it workable with more than one server
-$wgLDAPServerNames = array( 'ldap' => 'ldap.<%= domain %>' );
+$wgLDAPServerNames = array( 'ldap' => 'ldap.<%= @domain %>' );
-$wgLDAPSearchStrings = array( 'ldap' => 'uid=USER-NAME,ou=People,<%= dc_suffix %>' );
+$wgLDAPSearchStrings = array( 'ldap' => 'uid=USER-NAME,ou=People,<%= @dc_suffix %>' );
$wgLDAPEncryptionType = array( 'ldap' => 'tls' );
-$wgLDAPBaseDNs = array( 'ldap' => '<%= dc_suffix %>' );
-$wgLDAPUserBaseDNs = array( 'ldap' => 'ou=People,<%= dc_suffix %>' );
-$wgLDAPGroupBaseDNs = array ( 'ldap' => 'ou=Group,<%= dc_suffix %>' );
+$wgLDAPBaseDNs = array( 'ldap' => '<%= @dc_suffix %>' );
+$wgLDAPUserBaseDNs = array( 'ldap' => 'ou=People,<%= @dc_suffix %>' );
+$wgLDAPGroupBaseDNs = array ( 'ldap' => 'ou=Group,<%= @dc_suffix %>' );
-$wgLDAPProxyAgent = array( 'ldap' => 'cn=mediawiki-alamut,ou=System Accounts,<%= dc_suffix %>' );
+$wgLDAPProxyAgent = array( 'ldap' => 'cn=mediawiki-alamut,ou=System Accounts,<%= @dc_suffix %>' );
-$wgLDAPProxyAgentPassword = array( 'ldap' => '<%= ldap_password %>' );
+$wgLDAPProxyAgentPassword = array( 'ldap' => '<%= @ldap_password %>' );
$wgLDAPUseLDAPGroups = array( 'ldap' => true );
$wgLDAPGroupNameAttribute = array( 'ldap' => 'cn' );
@@ -205,4 +205,4 @@ $wgLDAPLowerCaseUsername = array( 'ldap' => true );
$wgLDAPPreferences = array( 'ldap' => array( 'email'=>'mail','realname'=>'cn','nickname'=>'uid','language'=>'preferredlanguage') );
-<%= wiki_settings %>
+<%= @wiki_settings %>