Example #1
0
							</div>
							<?php 
        }
        ?>
						<ul>
							<?php 
        checkmark($check, $release, $release . ' ' . sprintf(ngettext('[%u release skipped]', '[%u releases skipped]', $c), $c), gettext('We do not test upgrades that skip releases. We recommend you upgrade in sequence.'));
    } else {
        ?>
							<ul>
								<?php 
        $prevRel = false;
        checkmark(1, sprintf(gettext('Installing Zenphoto v%s'), ZENPHOTO_VERSION), '', '');
    }
    chdir(dirname(SERVERPATH . '/' . DATA_FOLDER . '/' . CONFIGFILE));
    $test = setup_glob('*.log');
    $test[] = basename(SERVERPATH . '/' . DATA_FOLDER . '/' . CONFIGFILE);
    $p = true;
    foreach ($test as $file) {
        $permission = fileperms(dirname(SERVERPATH . '/' . DATA_FOLDER . '/' . CONFIGFILE) . '/' . $file) & 0777;
        if (!checkPermissions($permission, 0600)) {
            $p = -1;
            break;
        }
    }
    checkMark($p, sprintf(gettext('<em>%s</em> security'), DATA_FOLDER), sprintf(gettext('<em>%s</em> security [is compromised]'), DATA_FOLDER), sprintf(gettext('Zenphoto suggests you make the sensitive files in the %1$s folder accessable by <em>owner</em> only (permissions = 0600). The file permissions for <em>%2$s</em> are %3$04o which may allow unauthorized access.'), DATA_FOLDER, $file, $permission));
    $err = versionCheck(PHP_MIN_VERSION, PHP_DESIRED_VERSION, PHP_VERSION);
    $good = checkMark($err, sprintf(gettext("PHP version %s"), PHP_VERSION), "", sprintf(gettext('PHP Version %1$s or greater is required. Version %2$s or greater is strongly recommended. Use earlier versions at your own risk.'), PHP_MIN_VERSION, PHP_DESIRED_VERSION), false) && $good;
    if ($session && session_id() && $session_path == session_save_path()) {
        checkmark(true, gettext('PHP <code>Sessions</code>.'), gettext('PHP <code>Sessions</code> [appear to not be working].'), '', true);
    } else {
Example #2
0
                } else {
                    echo gettext('Done with table update with errors');
                }
            }
            echo "</h3>";
            // fixes 1.2 move/copy albums with wrong ids
            $albums = $_zp_gallery->getAlbums();
            foreach ($albums as $album) {
                checkAlbumParentid($album, NULL);
            }
        }
        if ($createTables) {
            if (isset($_GET['delete_files'])) {
                $curdir = getcwd();
                chdir(dirname(__FILE__) . '/setup');
                $list = setup_glob('*.*');
                chdir($curdir);
                $rslt = true;
                foreach ($list as $component) {
                    if ($component != '..' && $component != '.') {
                        $rslt = $rslt && setupDeleteComponent(@unlink(SERVERPATH . '/' . ZENFOLDER . '/setup/' . $component), $component);
                    }
                }
                $rslt = $rslt && setupDeleteComponent(@unlink(SERVERPATH . '/' . ZENFOLDER . '/setup.php'), 'setup.php');
                $rslt = $rslt && setupDeleteComponent(@rmdir(SERVERPATH . '/' . ZENFOLDER . '/setup/'), 'setup/');
                if (!$rslt) {
                    ?>
					<p class="errorbox"><?php 
                    echo gettext('Deleting files failed!');
                    ?>
</p>