1 --- gallery-1.5.10/lib/url.php~ 2009-08-27 10:16:20.000000000 +0300
2 +++ gallery-1.5.10/lib/url.php 2009-08-27 10:17:03.141519923 +0300
4 $currentFile = __FILE__;
5 if ( $currentFile == '/usr/share/gallery/lib/url.php') {
6 /* We assume Gallery runs on as Debian Package */
7 - define ("GALLERY_CONFDIR", "/etc/gallery");
8 + define ("GALLERY_CONFDIR", "/usr/share/gallery");
9 define ("GALLERY_SETUPDIR", "/var/lib/gallery/setup");
12 --- gallery/setup/config_data.inc 2006-01-10 07:41:32.000000000 +0200
13 +++ /tmp/config_data.inc 2006-01-27 00:53:36.000000000 +0200
15 'desc' => '(<span class="attention">' . gTranslate('config',"REQUIRED") . '</span>) ' .
16 sprintf(gTranslate('config',"The filesystem path to a temporary directory. E.g. %s or %s. Note that if you have <b>open_basedir</b> configured on your system, then this temporary directory must be inside the <b>open_basedir</b> path! In that case you may need to create the directory yourself and make sure that it's writable by the webserver process."),
17 '<i>/tmp</i>','<i>c:\\windows\\temp</i>'),
18 - 'value' => getenv('TMP'),
19 + 'value' => '/var/tmp',
21 'require-write-dir' => 1,
23 --- gallery/setup/config_data.inc 2006-01-27 01:22:22.000000000 +0200
24 +++ /tmp/config_data.inc 2006-01-27 01:38:25.000000000 +0200
26 'desc' => '(<span class="attention">' . gTranslate('config',"REQUIRED") . '</span>) ' .
27 sprintf(gTranslate('config',"The full URL to your album directory on your web server. (e.g. %s) Gallery can operate with relative URLs, however some features, such as printing, may not function correctly."),
28 '<i>http://www.example.com/albums</i>'),
29 - 'value' => 'http://' . getenv('SERVER_NAME') . '/albums',
30 + 'value' => 'http://' . getenv('SERVER_NAME') . $GALLERY_URL . '/albums',
31 'no-trailing-slash' => 1,
33 'attrs' => array('size' => 50),
34 --- gallery-1.5.2.orig/configure.sh
35 +++ gallery-1.5.2/configure.sh
43 -if [ ! -f config.php ]; then
46 +ROOT=/usr/share/gallery
47 +CONFDIR=/etc/webapps/gallery
49 -if [ ! -f .htaccess ]; then
51 +if [ `whoami` != "root" ] ; then
52 + echo "You must be root to run this script" 2>&1
56 -chmod 666 config.php .htaccess
57 +for file in $CONFDIR/config.php $CONFDIR/htaccess ; do
58 + if [ ! -f $file ]; then
61 + chown root:http $file
65 +chmod 755 $ROOT/setup
69 -echo "You are now in setup mode. Your Gallery installation"
70 +echo "You are now in setup mode. Your Gallery installation"
71 echo "can be configured by pointing your web browser"
72 -echo "to the URL to 'setup' in this directory."
73 +echo "to the setup wizard (e.g. http://www.example.com/gallery/setup/index.php) "
75 --- gallery-1.5.2.orig/secure.sh
76 +++ gallery-1.5.2/secure.sh
81 -if [ -f config.php ]; then
82 - chmod 644 config.php
85 -if [ -f .htaccess ]; then
89 +ROOT=/usr/share/gallery
90 +CONFDIR=/etc/webapps/gallery
92 +if [ `whoami` != "root" ] ; then
93 + echo "You must be root to run this script" 2>&1
97 -if [ -f setup/resetadmin ]; then
98 - rm -f setup/resetadmin
99 +for file in $CONFDIR/config.php $CONFDIR/htaccess ; do
100 + if [ -f $file ]; then
101 + chown root:http $file
106 +if [ -f $ROOT/setup/resetadmin ]; then
107 + rm -f $ROOT/setup/resetadmin
111 echo "Your Gallery is now secure and cannot be configured. If"
112 -echo "you wish to reconfigure it, run:"
113 +echo "you wish to reconfigure it, run configure.sh as root:"
115 -echo " % ./configure.sh"
116 +echo " # $ROOT/configure.sh"
118 --- gallery/setup/confirm.inc~ 2007-08-21 09:25:22.650536464 +0300
119 +++ gallery/setup/confirm.inc 2007-08-21 09:28:17.384497289 +0300
121 ${str_replace('.', '', $outfile) . '_file'} = 0;
124 - $viewheader .= '<br>'. gallery_error(sprintf(gTranslate('config', "File %s in your Gallery mainfolder is not writable by the webserver. - chmod it 777 before proceeding. See %s for more details."), "<i><b>$outfile</b></i>", $docs)) . "</p>\n";
125 + $viewheader .= '<br>'. gallery_error(sprintf(gTranslate('config', "File %s in your Gallery mainfolder is not writable by the webserver. - run %s before proceeding. See %s for more details."), "<i><b>$outfile</b></i>", "<tt>/usr/share/gallery/configure.sh</tt>", $docs)) . "</p>\n";
126 ${str_replace('.', '', $outfile) . '_file'} = 1;
129 --- gallery-1.5.10/setup/write.inc~ 2009-08-27 10:17:59.000000000 +0300
130 +++ gallery-1.5.10/setup/write.inc 2009-08-27 10:18:26.424844612 +0300
132 $message .= "<br><br>";
135 - $message = gTranslate('config', "We highly suggest that you run 'secure.sh', or chmod your .htaccess and config.php to 644 for increased security.");
136 + $message = gTranslate('config', "We highly suggest that you run '/usr/share/gallery/secure.sh' for increased security.");