File phpipam-configpath.patch of Package phpipam
Index: phpipam-1.7.0/app/install/install_automatic.php
===================================================================
--- phpipam-1.7.0.orig/app/install/install_automatic.php
+++ phpipam-1.7.0/app/install/install_automatic.php
@@ -25,7 +25,7 @@ $filename = $GET->subnetId=="migrate"
<div class="text-muted" style="margin:10px;">
<?php print _("Please provide required inputs in below form for automatic database")." ".$title_prefix.", "._("once finished click Install database."); ?>
<br>
- <?php print _("Before you proceed to")." ".$text_prefix." "._("please fill in all settings in <strong>config.php</strong> file!"); ?>
+ <?php print _("Before you proceed to")." ".$text_prefix." "._("please fill in all settings in <strong>/etc/phpipam/config.php</strong> file!"); ?>
</div>
<hr>
@@ -58,7 +58,7 @@ $filename = $GET->subnetId=="migrate"
<div class="col-xs-12 col-md-4"><strong><?php print _("MySQL/MariaDB database name"); ?></strong></div>
<div class="col-xs-12 col-md-8">
<input type="text" style="width:100%;" name="mysqltable" class="form-control" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" disabled="disabled" value="<?php print $db['name']; ?>">
- <div class="text-muted"><?php print _("* change database details on config.php"); ?></div>
+ <div class="text-muted"><?php print _("* change database details on /etc/phpipam/config.php"); ?></div>
</div>
<!-- toggle advanced options -->
Index: phpipam-1.7.0/app/install/install_manual.php
===================================================================
--- phpipam-1.7.0.orig/app/install/install_manual.php
+++ phpipam-1.7.0/app/install/install_manual.php
@@ -21,7 +21,7 @@ $filename = $GET->subnetId=="migrate"
<div style="margin-top:10px;padding:30px 20px;">
<?php print _("For importing database file with mysqlimport tool please follow the instructions below:"); ?><hr>
<ol>
- <li><?php print _("Set variables for database connection in config.php"); ?></li>
+ <li><?php print _("Set variables for database connection in /etc/phpipam/config.php"); ?></li>
<li><?php print _("Open mysql connection, create database"); ?>
<pre>mysql -u root -p</pre>
</li>
Index: phpipam-1.7.0/app/install/install_mysqlimport.php
===================================================================
--- phpipam-1.7.0.orig/app/install/install_mysqlimport.php
+++ phpipam-1.7.0/app/install/install_mysqlimport.php
@@ -22,7 +22,7 @@ $filename = $GET->subnetId=="migrate"
<div style="margin-top:10px;padding:30px 20px;">
<?php print _("Please follow the steps below for")." ".$title_prefix." "._("with mysqlimport:"); ?><hr>
<ol>
- <li><?php print _("Set variables for database connection in config.php"); ?></li>
+ <li><?php print _("Set variables for database connection in /etc/phpipam/config.php"); ?></li>
<li><?php print _("Open mysql connection"); ?>
<pre>mysql -u root -p
Enter password:</pre>
Index: phpipam-1.7.0/app/install/select_install_type.php
===================================================================
--- phpipam-1.7.0.orig/app/install/select_install_type.php
+++ phpipam-1.7.0/app/install/select_install_type.php
@@ -16,7 +16,7 @@ $text_prefix = $GET->subnetId=="migrate
<div class="text-mute2d" style="margin:10px;">
<?php print _("We are glad you decided to")." ".$text_prefix." phpipam. "._("Before you can start to process please:"); ?><br><br>
<ul>
- <li><?php print _("Edit settings in config.php file"); ?></li>
+ <li><?php print _("Edit settings in /etc/phpipam/config.php file"); ?></li>
<li><?php print _("Create a MySQL/MariaDB database for phpipam, you can do this three ways (select below)"); ?></li>
</ul>
<br>
Index: phpipam-1.7.0/app/install/sql_error.php
===================================================================
--- phpipam-1.7.0.orig/app/install/sql_error.php
+++ phpipam-1.7.0/app/install/sql_error.php
@@ -24,9 +24,9 @@
print '<div class="text-muted" style="margin:10px;margin-bottom:20px;">';
print _("Troubleshooting:");
print '<ul>';
- print ' <li>' . _("Make sure all settings in config.php are correct.") . '</li>';
+ print ' <li>' . _("Make sure all settings in /etc/phpipam/config.php are correct.") . '</li>';
print ' <li>' . _("Make sure database is running and accepting connections.") . '</li>';
- print ' <li>' . _("Make sure user defined in config.php has access to database.") . '</li>';
+ print ' <li>' . _("Make sure user defined in /etc/phpipam/config.php has access to database.") . '</li>';
print '</ul>';
print '</div>';
}
Index: phpipam-1.7.0/app/tools/circuits/all-circuits-map.php
===================================================================
--- phpipam-1.7.0.orig/app/tools/circuits/all-circuits-map.php
+++ phpipam-1.7.0/app/tools/circuits/all-circuits-map.php
@@ -1,4 +1,3 @@
-<?php
# Check we have been included and not called directly
require( dirname(__FILE__) . '/../../../functions/include-only.php' );
Index: phpipam-1.7.0/app/tools/locations/single-location-map.php
===================================================================
--- phpipam-1.7.0.orig/app/tools/locations/single-location-map.php
+++ phpipam-1.7.0/app/tools/locations/single-location-map.php
@@ -41,4 +41,4 @@ elseif(!is_object($location)) {
$OSM->add_location($location);
$OSM->map($height ?? null);
}
-}
\ No newline at end of file
+}
Index: phpipam-1.7.0/functions/classes/class.User.php
===================================================================
--- phpipam-1.7.0.orig/functions/classes/class.User.php
+++ phpipam-1.7.0/functions/classes/class.User.php
@@ -563,7 +563,7 @@ class User extends Common_functions {
}
/**
- * Migrate resolve_subnets from config.php to database
+ * Migrate resolve_subnets from /etc/phpipam/config.php to database
* for versions older than 1.31
*
* @method migrate_resolve_subnets
@@ -586,7 +586,7 @@ class User extends Common_functions {
} catch (Exception $e) {}
}
// print that is can be deleted
- $this->Result->show ("warning", '$config[resolve_subnets] '._('was migrated to database. It can be deleted from config.php'), false);
+ $this->Result->show ("warning", '$config[resolve_subnets] '._('was migrated to database. It can be deleted from /etc/phpipam/config.php'), false);
}
Index: phpipam-1.7.0/index.php
===================================================================
--- phpipam-1.7.0.orig/index.php
+++ phpipam-1.7.0/index.php
@@ -1,6 +1,6 @@
<?php
/* config */
-if (!file_exists("config.php")) { die("<br><hr>-- config.php file missing! Please copy default config file `config.dist.php` to `config.php` and set configuration! --<hr><br>phpipam installation documentation: <a href='http://phpipam.net/documents/installation/'>http://phpipam.net/documents/installation/</a>"); }
+if (!file_exists("/etc/phpipam/config.php")) { die("<br><hr>-- config.php file missing! Please copy default config file `/etc/phpipam/config.dist.php` to `/etc/phpipam/config.php` and set configuration! --<hr><br>phpipam installation documentation: <a href='http://phpipam.net/documents/installation/'>http://phpipam.net/documents/installation/</a>"); }
/* site functions */
require_once( 'functions/functions.php' );
Index: phpipam-1.7.0/install/index.php
===================================================================
--- phpipam-1.7.0.orig/install/index.php
+++ phpipam-1.7.0/install/index.php
@@ -52,7 +52,7 @@ require_once('../functions/functions.php
<h4>1.) Define Base</h4>
<hr>
- Make sure BASE directive is set for your installation. This is used to properly detect phpIPAM directory. It must be set in config.php and in .htaccess
+ Make sure BASE directive is set for your installation. This is used to properly detect phpIPAM directory. It must be set in /etc/phpipam/config.php and in .htaccess
<div class="well" style="padding:5px;margin-top:5px;">
Detected BASE: <?php print str_replace("install/", "", $_SERVER['REQUEST_URI']); ?>
Index: phpipam-1.7.0/upgrade/index.php
===================================================================
--- phpipam-1.7.0.orig/upgrade/index.php
+++ phpipam-1.7.0/upgrade/index.php
@@ -51,7 +51,7 @@
<h4>1.) Define Base</h4>
<hr>
- Make sure BASE directive is set for your installation. This is used to properly detect phpIPAM directory. It must be set in config.php.
+ Make sure BASE directive is set for your installation. This is used to properly detect phpIPAM directory. It must be set in /etc/phpipam/config.php.
<div class="well" style="padding:5px;margin-top:5px;">
Detected BASE: <?php print str_replace("upgrade/", "", $_SERVER['REQUEST_URI']); ?>
@@ -76,4 +76,4 @@
<!-- end body -->
</body>
-</html>
\ No newline at end of file
+</html>
Index: phpipam-1.7.0/functions/classes/class.Config.php
===================================================================
--- phpipam-1.7.0.orig/functions/classes/class.Config.php
+++ phpipam-1.7.0/functions/classes/class.Config.php
@@ -25,7 +25,7 @@ class Config {
return $alt_file;
}
- return dirname(__FILE__) . "/../../config.php";
+ return "/etc/phpipam/config.php";
}
/**