Announcement

  •  » Engine
  •  » [photoWidget] data_location and current path

#1 2014-10-17 10:50:54

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13809

[photoWidget] data_location and current path

Hello nicolas,

plugin photoWidget writes a photoWidget.dat file (why not a line in piwigo_config table? that seems much simpler) and it may write it in unexpected places, because $conf['data_location'] is relative to the root path. With this change, it makes sure the photoWidget.dat is written at the right place:

Code:

$ svn diff include/photoWidgetConfig.class.php
Index: include/photoWidgetConfig.class.php
===================================================================
--- include/photoWidgetConfig.class.php (revision 1820)
+++ include/photoWidgetConfig.class.php (working copy)
@@ -52,7 +58,7 @@
   }
 
   private function get_config_file_dir() {
-    return $GLOBALS['conf']['data_location'].'/plugins/';
+    return PHPWG_ROOT_PATH.$GLOBALS['conf']['data_location'].'/plugins/';
   }
 
   private function get_config_filename() {

I have just prefixed the path with PHPWG_ROOT_PATH

Offline

 

#2 2014-10-17 10:52:34

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13809

Re: [photoWidget] data_location and current path

Actually, pwgCumulus already have this change :-)

Offline

 

#3 2014-10-17 20:23:56

nicolas
Former Piwigo Team
2004-12-30
1232

Re: [photoWidget] data_location and current path

plg wrote:

Hello nicolas,

plugin photoWidget writes a photoWidget.dat file (why not a line in piwigo_config table? that seems much simpler) and it may write it in unexpected places, because $conf['data_location'] is relative to the root path. With this change, it makes sure the photoWidget.dat is written at the right place:

I don't know but I will make the changes to saves configuration in database. Thanks for that good idea.

Offline

 
  •  » Engine
  •  » [photoWidget] data_location and current path

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact