summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile9
-rw-r--r--admin_site_upgrade.php2
-rw-r--r--admin_trees_download.php2
-rw-r--r--includes/functions/functions.php2
-rw-r--r--includes/functions/functions_export.php6
-rwxr-xr-xincludes/session.php11
-rw-r--r--library/WT/Controller/Page.php16
-rw-r--r--library/WT/Report/Base.php2
-rw-r--r--library/WT/Report/PDF.php2
-rw-r--r--library/WT/Stats.php2
-rw-r--r--modules_v3/clippings/clippings_ctrl.php2
-rw-r--r--themes/_administration/header.php2
-rw-r--r--themes/clouds/footer.php2
-rw-r--r--themes/colors/footer.php2
-rw-r--r--themes/fab/footer.php2
-rw-r--r--themes/minimal/footer.php2
-rw-r--r--themes/webtrees/footer.php2
-rw-r--r--themes/xenea/footer.php2
18 files changed, 33 insertions, 37 deletions
diff --git a/Makefile b/Makefile
index 12e1998497..e5023e5270 100644
--- a/Makefile
+++ b/Makefile
@@ -7,8 +7,8 @@ LANGUAGE_SRC=$(shell git grep -I --name-only --fixed-strings -e WT_I18N:: -- "*.
MO_FILES=$(patsubst %.po,%.mo,$(PO_FILES))
PO_FILES=$(wildcard $(LANGUAGE_DIR)/*.po $(LANGUAGE_DIR)/extra/*.po)
SHELL=bash
-WT_VERSION=$(shell grep "'WT_VERSION'" includes/session.php | cut -d "'" -f 4)
-WT_RELEASE=$(shell grep "'WT_VERSION_RELEASE'" includes/session.php | cut -d "'" -f 4)
+WT_VERSION=$(shell grep "'WT_VERSION'" includes/session.php | cut -d "'" -f 4 | awk -F - '{print $1}')
+WT_RELEASE=$(shell grep "'WT_VERSION'" includes/session.php | cut -d "'" -f 4 | awk -F - '{print $1}')
# Location of minification tools
CLOSURE_JS=$(BUILD_DIR)/compiler-20121212.jar
@@ -48,7 +48,7 @@ build/webtrees: clean update
# Extract from the repository either a tag or the current revision
if [ -z "$(WT_RELEASE)" ]; then git archive --prefix=$@/ $(WT_VERSION); else git archive --prefix=$@/ $(GIT_BRANCH); fi | tar -x
# Embed the build number in the code (for DEV builds only)
- sed -i "s/define('WT_RELEASE', 'dev')/define('WT_RELEASE', 'dev-$(BUILD_NUMBER)')/" $@/includes/session.php
+ sed -i "s/define('WT_RELEASE', '$(WT_VERSION)-dev')/define('WT_RELEASE', '$(WT_VERSION)-dev+$(BUILD_NUMBER)')/" $@/includes/session.php
# Add language files
cp -R $(LANGUAGE_DIR)/*.mo $@/$(LANGUAGE_DIR)/
cp -R $(LANGUAGE_DIR)/extra/*.mo $@/$(LANGUAGE_DIR)/extra/
@@ -61,9 +61,6 @@ build/webtrees: clean update
cd $(@D) && zip -qr $(@F)-$(BUILD_VERSION).zip $(@F)
# If we have a GNU private key, sign the file with it
if test -d ~/.gnupg; then gpg --armor --sign --detach-sig $@-$(BUILD_VERSION).zip; fi
- # If we have a public html area, publish the files
- if test -d ~/public_html/build; then cp $@-$(BUILD_VERSION).zip ~/public_html/build/; fi
- if test -d ~/public_html/build; then echo ${BUILD_VERSION} > ~/public_html/build/latest-dev.txt; fi
rm -Rf $@
# Done!
ls -l $@-$(BUILD_VERSION).zip*
diff --git a/admin_site_upgrade.php b/admin_site_upgrade.php
index 09109c961a..ffd0a4b7ac 100644
--- a/admin_site_upgrade.php
+++ b/admin_site_upgrade.php
@@ -68,7 +68,7 @@ if ($latest_version == '') {
exit;
}
-if (version_compare(WT_VERSION, $latest_version) > 0) {
+if (version_compare(WT_VERSION, $latest_version) >= 0) {
echo '<p>', WT_I18N::translate('This is the latest version of webtrees. No upgrade is available.'), '</p>';
exit;
}
diff --git a/admin_trees_download.php b/admin_trees_download.php
index 4cac87fd66..8b497351de 100644
--- a/admin_trees_download.php
+++ b/admin_trees_download.php
@@ -65,7 +65,7 @@ if ($action == "download" && $zip == "yes") {
$gedout = fopen($gedname, "w");
export_gedcom($GEDCOM, $gedout, $exportOptions);
fclose($gedout);
- $comment = "Created by ".WT_WEBTREES." ".WT_VERSION_TEXT." on " . date("r") . ".";
+ $comment = "Created by ".WT_WEBTREES." ".WT_VERSION." on " . date("r") . ".";
$archive = new PclZip($zipfile);
$v_list = $archive->create($gedname, PCLZIP_OPT_COMMENT, $comment, PCLZIP_OPT_REMOVE_PATH, $temppath);
if ($v_list == 0) echo "Error : " . $archive->errorInfo(true);
diff --git a/includes/functions/functions.php b/includes/functions/functions.php
index b598069b2f..01ec985f0d 100644
--- a/includes/functions/functions.php
+++ b/includes/functions/functions.php
@@ -60,7 +60,7 @@ function fetch_latest_version() {
$last_update_timestamp=WT_Site::preference('LATEST_WT_VERSION_TIMESTAMP');
if ($last_update_timestamp < WT_TIMESTAMP - 24*60*60) {
$row=WT_DB::prepare("SHOW VARIABLES LIKE 'version'")->fetchOneRow();
- $params='?w='.WT_VERSION.WT_VERSION_RELEASE.'&p='.PHP_VERSION.'&m='.$row->value.'&o='.(DIRECTORY_SEPARATOR=='/'?'u':'w');
+ $params='?w='.WT_VERSION.'&p='.PHP_VERSION.'&m='.$row->value.'&o='.(DIRECTORY_SEPARATOR=='/'?'u':'w');
$latest_version_txt=fetch_remote_file('svn.webtrees.net', '/build/latest-version.txt'.$params);
if ($latest_version_txt) {
WT_Site::preference('LATEST_WT_VERSION', $latest_version_txt);
diff --git a/includes/functions/functions_export.php b/includes/functions/functions_export.php
index 10e5b58b61..d683f3e581 100644
--- a/includes/functions/functions_export.php
+++ b/includes/functions/functions_export.php
@@ -89,9 +89,9 @@ function gedcom_header($gedfile) {
// Default values for a new header
$HEAD = "0 HEAD";
- $SOUR = "\n1 SOUR ".WT_WEBTREES."\n2 NAME ".WT_WEBTREES."\n2 VERS ".WT_VERSION_TEXT;
+ $SOUR = "\n1 SOUR " . WT_WEBTREES . "\n2 NAME " . WT_WEBTREES . "\n2 VERS " . WT_VERSION;
$DEST = "\n1 DEST DISKETTE";
- $DATE = "\n1 DATE ".strtoupper(date("d M Y"))."\n2 TIME ".date("H:i:s");
+ $DATE = "\n1 DATE " . strtoupper(date("d M Y")) . "\n2 TIME " . date("H:i:s");
$GEDC = "\n1 GEDC\n2 VERS 5.5.1\n2 FORM Lineage-Linked";
$CHAR = "\n1 CHAR UTF-8";
$FILE = "\n1 FILE {$gedfile}";
@@ -99,7 +99,7 @@ function gedcom_header($gedfile) {
$PLAC = "\n1 PLAC\n2 FORM City, County, State/Province, Country";
$COPR = "";
$SUBN = "";
- $SUBM = "\n1 SUBM @SUBM@\n0 @SUBM@ SUBM\n1 NAME ".WT_USER_NAME; // The SUBM record is mandatory
+ $SUBM = "\n1 SUBM @SUBM@\n0 @SUBM@ SUBM\n1 NAME " . WT_USER_NAME; // The SUBM record is mandatory
// Preserve some values from the original header
$record = WT_GedcomRecord::getInstance('HEAD');
diff --git a/includes/session.php b/includes/session.php
index 4e8c6f5689..d20806ce60 100755
--- a/includes/session.php
+++ b/includes/session.php
@@ -28,14 +28,13 @@ if (!defined('WT_SCRIPT_NAME')) {
}
// Identify ourself
-define('WT_WEBTREES', 'webtrees');
-define('WT_VERSION', '1.5.2');
-define('WT_VERSION_RELEASE', 'dev'); // “dev”, “beta”, “rc1”, “”, etc.
-define('WT_VERSION_TEXT', trim(WT_VERSION.' '.WT_VERSION_RELEASE));
+define('WT_WEBTREES', 'webtrees');
+define('WT_VERSION', '1.5.2-dev');
+define('WT_VERSION_TEXT', WT_VERSION); // Deprecated
// External URLs
-define('WT_WEBTREES_URL', 'http://www.webtrees.net/');
-define('WT_WEBTREES_WIKI', 'http://wiki.webtrees.net/');
+define('WT_WEBTREES_URL', 'http://www.webtrees.net/');
+define('WT_WEBTREES_WIKI', 'http://wiki.webtrees.net/');
// Optionally, specify a CDN server for static content (e.g. CSS, JS, PNG)
// For example, http://my.cdn.com/webtrees-static-1.3.1/
diff --git a/library/WT/Controller/Page.php b/library/WT/Controller/Page.php
index 53d0f6e54d..ec28cd3dad 100644
--- a/library/WT/Controller/Page.php
+++ b/library/WT/Controller/Page.php
@@ -133,21 +133,21 @@ class WT_Controller_Page extends WT_Controller_Base {
$title=html_entity_decode(strip_tags($this->page_title), ENT_QUOTES, 'UTF-8');
// Initialise variables for the theme’s header.php
- $LINK_CANONICAL =$this->canonical_url;
- $META_ROBOTS =$this->meta_robots;
- $META_DESCRIPTION=WT_GED_ID ? get_gedcom_setting(WT_GED_ID, 'META_DESCRIPTION') : '';
+ $LINK_CANONICAL = $this->canonical_url;
+ $META_ROBOTS = $this->meta_robots;
+ $META_DESCRIPTION = WT_GED_ID ? get_gedcom_setting(WT_GED_ID, 'META_DESCRIPTION') : '';
if (!$META_DESCRIPTION) {
- $META_DESCRIPTION=WT_TREE_TITLE;
+ $META_DESCRIPTION = WT_TREE_TITLE;
}
- $META_GENERATOR =WT_WEBTREES.'-'.WT_VERSION_TEXT.' - '.WT_WEBTREES_URL;
- $META_TITLE =WT_GED_ID ? get_gedcom_setting(WT_GED_ID, 'META_TITLE') : '';
+ $META_GENERATOR = WT_WEBTREES . ' ' . WT_VERSION . ' - ' . WT_WEBTREES_URL;
+ $META_TITLE = WT_GED_ID ? get_gedcom_setting(WT_GED_ID, 'META_TITLE') : '';
if ($META_TITLE) {
- $title.=' - '.$META_TITLE;
+ $title .= ' - ' . $META_TITLE;
}
// This javascript needs to be loaded in the header, *before* the CSS.
// All other javascript should be defered until the end of the page
- $javascript= '<script src="' . WT_MODERNIZR_URL . '"></script>';
+ $javascript = '<script src="' . WT_MODERNIZR_URL . '"></script>';
// Give Javascript access to some PHP constants
$this->addInlineJavascript('
diff --git a/library/WT/Report/Base.php b/library/WT/Report/Base.php
index 5beac66016..ac0787ac9d 100644
--- a/library/WT/Report/Base.php
+++ b/library/WT/Report/Base.php
@@ -213,7 +213,7 @@ class WT_Report_Base {
$this->rkeywords = '';
// Generated By...text
// I18N: This is a report footer. %s is the name of the application.
- $this->generatedby = WT_I18N::translate('Generated by %s', WT_WEBTREES.' '.WT_VERSION_TEXT);
+ $this->generatedby = WT_I18N::translate('Generated by %s', WT_WEBTREES.' '.WT_VERSION);
// For known size pages
if (($this->pagew == 0) AND ($this->pageh == 0)) {
diff --git a/library/WT/Report/PDF.php b/library/WT/Report/PDF.php
index cba3f40b05..5e86101c61 100644
--- a/library/WT/Report/PDF.php
+++ b/library/WT/Report/PDF.php
@@ -89,7 +89,7 @@ class WT_Report_PDF extends WT_Report_Base {
// Only admin should see the version number
$appversion = WT_WEBTREES;
if (WT_USER_IS_ADMIN) {
- $appversion .= " ".WT_VERSION_TEXT;
+ $appversion .= " ".WT_VERSION;
}
$this->pdf->SetCreator($appversion." (".parent::wt_url.")");
// Not implemented yet - WT_Report_Base::setup()
diff --git a/library/WT/Stats.php b/library/WT/Stats.php
index 50753ee0f0..f480686b98 100644
--- a/library/WT/Stats.php
+++ b/library/WT/Stats.php
@@ -3530,7 +3530,7 @@ class WT_Stats {
// Older versions of webtrees allowed access to all constants and globals.
// Newer version just allow access to these values:
public static function WT_VERSION() { return WT_VERSION; }
- public static function WT_VERSION_TEXT() { return WT_VERSION_TEXT; }
+ public static function WT_VERSION_TEXT() { return WT_VERSION; } // Deprecated
// These functions provide access to hitcounter
// for use in the HTML block.
diff --git a/modules_v3/clippings/clippings_ctrl.php b/modules_v3/clippings/clippings_ctrl.php
index 5186f3726d..1ba548014f 100644
--- a/modules_v3/clippings/clippings_ctrl.php
+++ b/modules_v3/clippings/clippings_ctrl.php
@@ -269,7 +269,7 @@ class WT_Controller_Clippings {
fclose($fp);
$zipName = "clippings".rand(0, 1500).".zip";
$fname = WT_DATA_DIR.$zipName;
- $comment = "Created by ".WT_WEBTREES." ".WT_VERSION_TEXT." on ".date("d M Y").".";
+ $comment = "Created by ".WT_WEBTREES." ".WT_VERSION." on ".date("d M Y").".";
$archive = new PclZip($fname);
// add the ged file to the root of the zip file (strip off the data folder)
$this->media_list[]= array (PCLZIP_ATT_FILE_NAME => WT_DATA_DIR.$tempFileName, PCLZIP_ATT_FILE_NEW_FULL_NAME => $tempFileName);
diff --git a/themes/_administration/header.php b/themes/_administration/header.php
index d4ff53ec5f..395a1bcad3 100644
--- a/themes/_administration/header.php
+++ b/themes/_administration/header.php
@@ -75,7 +75,7 @@ echo
}
echo '</div>',
'<div id="info">',
- WT_WEBTREES, ' ', WT_VERSION_TEXT,
+ WT_WEBTREES, ' ', WT_VERSION,
'<br>',
/* I18N: The local time on the server */
WT_I18N::translate('Server time'), ' — ', format_timestamp(WT_SERVER_TIMESTAMP),
diff --git a/themes/clouds/footer.php b/themes/clouds/footer.php
index 2e7169541c..678f680f04 100644
--- a/themes/clouds/footer.php
+++ b/themes/clouds/footer.php
@@ -33,7 +33,7 @@ if ($view!='simple') {
echo contact_links();
echo '<br>';
echo '<p class="logo">';
- echo '<a href="', WT_WEBTREES_URL, '" target="_blank" class="icon-webtrees" title="', WT_WEBTREES, ' ', WT_VERSION_TEXT, '"></a>';
+ echo '<a href="', WT_WEBTREES_URL, '" target="_blank" class="icon-webtrees" title="', WT_WEBTREES, ' ', WT_VERSION, '"></a>';
echo '</p>';
if (WT_DEBUG || get_gedcom_setting(WT_GED_ID, 'SHOW_STATS')) {
echo execution_stats();
diff --git a/themes/colors/footer.php b/themes/colors/footer.php
index f5734ea2bd..2a762f438a 100644
--- a/themes/colors/footer.php
+++ b/themes/colors/footer.php
@@ -33,7 +33,7 @@ if ($view!='simple') {
echo contact_links();
echo '<br>';
echo '<p class="logo">';
- echo '<a href="', WT_WEBTREES_URL, '" target="_blank" class="icon-webtrees" title="', WT_WEBTREES, ' ', WT_VERSION_TEXT, '"></a>';
+ echo '<a href="', WT_WEBTREES_URL, '" target="_blank" class="icon-webtrees" title="', WT_WEBTREES, ' ', WT_VERSION, '"></a>';
echo '</p>';
if (WT_DEBUG || get_gedcom_setting(WT_GED_ID, 'SHOW_STATS')) {
echo execution_stats();
diff --git a/themes/fab/footer.php b/themes/fab/footer.php
index 2949166541..ceeb9bb411 100644
--- a/themes/fab/footer.php
+++ b/themes/fab/footer.php
@@ -32,5 +32,5 @@ if ($view!='simple') {
if (WT_DEBUG || get_gedcom_setting(WT_GED_ID, 'SHOW_STATS')) {
echo execution_stats();
}
- echo '</div><a style="font-size:150%; color:#888;" href="', WT_WEBTREES_URL, '" title="', WT_WEBTREES , ' - ', WT_VERSION_TEXT, '">', WT_WEBTREES, '</a></div>';
+ echo '</div><a style="font-size:150%; color:#888;" href="', WT_WEBTREES_URL, '" title="', WT_WEBTREES , ' - ', WT_VERSION, '">', WT_WEBTREES, '</a></div>';
}
diff --git a/themes/minimal/footer.php b/themes/minimal/footer.php
index fcbc4f5b82..9cb70d3550 100644
--- a/themes/minimal/footer.php
+++ b/themes/minimal/footer.php
@@ -31,7 +31,7 @@ if ($view!='simple') {
echo '<div id="footer" class="', $TEXT_DIRECTION, ' width99 center">';
echo contact_links();
echo '<p class="logo">';
- echo '<a href="', WT_WEBTREES_URL, '" target="_blank" title="', WT_WEBTREES, ' ', WT_VERSION_TEXT, '">webtrees</a>';
+ echo '<a href="', WT_WEBTREES_URL, '" target="_blank" title="', WT_WEBTREES, ' ', WT_VERSION, '">webtrees</a>';
echo '</p>';
if (WT_DEBUG || get_gedcom_setting(WT_GED_ID, 'SHOW_STATS')) {
echo execution_stats();
diff --git a/themes/webtrees/footer.php b/themes/webtrees/footer.php
index 088328f666..002a88c85d 100644
--- a/themes/webtrees/footer.php
+++ b/themes/webtrees/footer.php
@@ -31,7 +31,7 @@ if ($view!='simple') {
echo '<div id="footer">';
echo contact_links();
echo '<p class="logo">';
- echo '<a href="', WT_WEBTREES_URL, '" target="_blank" class="icon-webtrees" title="', WT_WEBTREES, ' ', WT_VERSION_TEXT, '"></a>';
+ echo '<a href="', WT_WEBTREES_URL, '" target="_blank" class="icon-webtrees" title="', WT_WEBTREES, ' ', WT_VERSION, '"></a>';
echo '</p>';
if (WT_DEBUG || get_gedcom_setting(WT_GED_ID, 'SHOW_STATS')) {
diff --git a/themes/xenea/footer.php b/themes/xenea/footer.php
index c2c41c6e6a..18b3f6b882 100644
--- a/themes/xenea/footer.php
+++ b/themes/xenea/footer.php
@@ -31,7 +31,7 @@ if ($view!='simple') {
echo '<div id="footer" class="', $TEXT_DIRECTION, ' width99 center">';
echo contact_links();
echo '<p class="logo">';
- echo '<a href="', WT_WEBTREES_URL, '" target="_blank" class="icon-webtrees" title="', WT_WEBTREES, ' ', WT_VERSION_TEXT, '"></a>';
+ echo '<a href="', WT_WEBTREES_URL, '" target="_blank" class="icon-webtrees" title="', WT_WEBTREES, ' ', WT_VERSION, '"></a>';
echo '</p>';
if (WT_DEBUG || get_gedcom_setting(WT_GED_ID, 'SHOW_STATS')) {
echo execution_stats();