Skip to content

Commit

Permalink
Merge developments for v0.9.3 into master
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroenrnl committed Jun 10, 2016
2 parents edb1f77 + dff4cdc commit 5df1039
Show file tree
Hide file tree
Showing 103 changed files with 2,602 additions and 1,240 deletions.
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@
# Unittests
UnitTests export-ignore
sonar-project.properties export-ignore
# binary files
*.jpg binary diff=exif
*.gif binary diff=exif
*.png binary diff=exif
97 changes: 64 additions & 33 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,55 @@
# Zoph Changelog #
##Zoph 0.9.3##
###10 jun 2016###

Zoph 0.9.3 is the new stable release. It is recommended for everyone to upgrade to this release

###Features###
* [Issue #72](https://github.com/jeroenrnl/zoph/issues/72) Zoph now has a new logon screen.
The logon screen has background photos. Two of them are already included in Zoph. You can place your own backgrounds in ```templates/default/images/backgrounds```. Or, you can (on the config screen) define an album from which the images will be used as background images. Zoph will display a random image as background.
* [Issue #76](https://github.com/jeroenrnl/zoph/issues/76) The logon screen now gives a message about the username and/or password being wrong instead of just returning to the same screen
* [Issue #75](https://github.com/jeroenrnl/zoph/issues/75) Zoph now uses PHP's password hashing algorithm instead of MySQL's.
This includes a random 'salt' added to each password. This will make it much, much harder to decrypt your passwords, if your database would ever fall into the wrong hands. The old hashes will be updated with the new ones as soon the the user logs in. Zoph will continue to support the old password hashes at least until v0.9.5.
* [Issue #26](https://github.com/jeroenrnl/zoph/issues/26) It is now possible to define the cookie expirement time. In previous versions of Zoph, a user would be logged out when closing the browser. Is now possible to extend the time to 1 hour, 4 hours, 8 hours, 1 day, 1 week or 1 month. This means a user will not need to re-login for that period of time, even when the browser is closed in the mean time. This can be very convenient, but it could mean that a user leaves Zoph logged in on a public PC. Therefore, the default is still 'session', which means a user will be logged out when closing the browser.
* "new" pages now show up in breadcrumbs
* It is now possible to give a user "can see all photos" access rights. This means you can give a user access to all photos, without giving him/her admin rights and without having to update user rights whenever an album is added.
* [Issue #22](https://github.com/jeroenrnl/zoph/issues/22) It is now possible to allow a user to create albums, categories, people, circles and places. The user automatically has access rights to place photos in the albums, categories, people, circles and places he or she has created.
* [Issue #21](https://github.com/jeroenrnl/zoph/issues/21) It is now possible to allow a user to delete photos. The user will have to have "write" access to at least one album a photo is in.
* Remove the rather ugly trailing space on the links on zoph.php

###Bugs###
* [Issue #73](https://github.com/jeroenrnl/zoph/issues/73) Fixed sharing feature
* [Issue #74](https://github.com/jeroenrnl/zoph/issues/74) Fixed Canadian English, Dutch and German translation files

###Other improvements###
* Added a way to disable a setting on the configuration page depending on the state of another configuration item. (This was created because the photo album as a logon background relies on the sharing feature to be enabled).
* Moved user page to template
* Moved form into a separate class
* Some cleanup of the places and categories pages
* Refactor HTML for actionlinks
* Modified createTestData script to only require password once
* Rearranged order of unittests
* Added translations for German, Canadian English and Dutch

##Zoph 0.9.2##
###1 apr 2016###

Zoph 0.9.2 is the new stable release. I have decided to drop the separation between 'stable' and 'unstable' or 'feature' releases. This means that it is recommended for everyone to upgrade to this release.

###Features###
* Issue #44 : Added 'circles': a way to group people in Zoph. This is especially handy if you have a large amount of people in your Zoph, and the 'person' page is becoming confusing or cluttered.
* Issue #46 A circle and it's members can be surpressed in the overview page, so you can, for example, hide people that you added only for a small set of photos.
* Issue #20 Zoph has switched to the PDO classes for database access. This ensures compatibility with PHP in the future, because the old mysql libs will be dropped soon.
* Issue #32 It is now possible to set more properties of a photo, including map zoom from the web import.
* Issue #60 The link text for "next" and "previous" as well as page numbers has been increased in size for better usability esp. on mobile devices
* [Issue #44](https://github.com/jeroenrnl/zoph/issues/44) : Added 'circles': a way to group people in Zoph. This is especially handy if you have a large amount of people in your Zoph, and the 'person' page is becoming confusing or cluttered.
* [Issue #46](https://github.com/jeroenrnl/zoph/issues/46) A circle and it's members can be surpressed in the overview page, so you can, for example, hide people that you added only for a small set of photos.
* [Issue #20](https://github.com/jeroenrnl/zoph/issues/20) Zoph has switched to the PDO classes for database access. This ensures compatibility with PHP in the future, because the old mysql libs will be dropped soon.
* [Issue #32](https://github.com/jeroenrnl/zoph/issues/32) It is now possible to set more properties of a photo, including map zoom from the web import.
* [Issue #60](https://github.com/jeroenrnl/zoph/issues/60) The link text for "next" and "previous" as well as page numbers has been increased in size for better usability esp. on mobile devices
* Added a script for fixing filename case (by Jason Taylor [@JiCit] )
* Access Google maps via https (Jason Taylor [@JiCiT])
* As of this version, the language files are in the php dir, and no longer need to be copied or moved separately

###Bugs###
* [http://github.com/jeroenrnl/zoph/issues/49 Issue #49] Zoph now supports MySQL strict mode
* [http://github.com/jeroenrnl/zoph/issues/55 Issue #55] Autocomplete not working for people
* [http://github.com/jeroenrnl/zoph/issues/58 Issue #58] Sort order for albums and categories can not be changed
* [Issue #49](https://github.com/jeroenrnl/zoph/issues/49) Zoph now supports MySQL strict mode
* [Issue #55](https://github.com/jeroenrnl/zoph/issues/55) Autocomplete not working for people
* [Issue #58](https://github.com/jeroenrnl/zoph/issues/58) Sort order for albums and categories can not be changed
* CLI: Fixed an issue where Zoph would try to import to the current directory when double spaces were present in CLI
* Better handling of file not found problems during import
* Fixed two bugs that caused maps not to display
Expand Down Expand Up @@ -46,7 +77,7 @@ Zoph 0.9.2 is the new stable release. I have decided to drop the separation betw
* Added function scope to many methods
* Started using namespaces to better organize the classes
* Updated version numbers in REQUIREMENTS readme.
* Issue #8 (partial) Changed several parts of Zoph to use templates
* [Issue #8](https://github.com/jeroenrnl/zoph/issues/8) (partial) Changed several parts of Zoph to use templates
* Added improvements to templating system
* Modified query for photo access rights to a view for performance reasons
* Changed logging so SQL query log to file can be done without displaying
Expand All @@ -59,7 +90,7 @@ Zoph 0.9.1 is the first feature release for Zoph 0.9, it shows a preview of some

####Features####

* Issue #28 Configuration through webinterface
* [Issue #28](https://github.com/jeroenrnl/zoph/issues/28) Configuration through webinterface
* Removed display desc under thumbnail feature
* Removed MIXED_THUMBNAILS and THUMB_EXTENSION settings
* removed DEFAULT_SHOW_ALL setting
Expand All @@ -68,27 +99,27 @@ Zoph 0.9.1 is the first feature release for Zoph 0.9, it shows a preview of some
* Removed alternative password validators
* Removed checks for PHP 5.1
* Adding CLI support for configuration
* Issue #7 Added a favicon
* Issue #18 Added "return" link on bulk edit page
* [Issue #7](https://github.com/jeroenrnl/zoph/issues/7) Added a favicon
* [Issue #18](https://github.com/jeroenrnl/zoph/issues/18) Added "return" link on bulk edit page
* Added a script to migrate config to new db-based system
* Issue #8 Made template selectible from webinterface
* [Issue #8](https://github.com/jeroenrnl/zoph/issues/8) Made template selectible from webinterface
* Removed MAX_CRUMBS

####Bugs####

* Simplified CLI code & fixed bug in --autoadd
* Issue #34 Rows and columns swapped on photos page
* Issue #36 Webimporter does not import description
* Issue #37 Can not add position on map using the mouse
* [Issue #34](https://github.com/jeroenrnl/zoph/issues/34) Rows and columns swapped on photos page
* [Issue #36](https://github.com/jeroenrnl/zoph/issues/36) Webimporter does not import description
* [Issue #37](https://github.com/jeroenrnl/zoph/issues/37) Can not add position on map using the mouse
* Fixed a bug that caused EXIF information in some (rare) cases to report the aperture wrong.
* Strict standards warning
* Issue #45 Pagebreak inside HTML tags causes browser to render incorrectly
* Issue #45 Added selectArray cache to zophTable
* Issue #48 Repair photo ratings during import
* Issue #50 Geonames project has changed URL and requires username
* Issue #51 Fixed depth in tree display when autocorrect is off
* Issue #39 Added support for session.upload_progress as APC replacement (PHP 5.4 compatibility)
* Issue #38 CLI tries to lookup previous argument's value when looking up photographer
* [Issue #45](https://github.com/jeroenrnl/zoph/issues/45) Pagebreak inside HTML tags causes browser to render incorrectly
* [Issue #45](https://github.com/jeroenrnl/zoph/issues/45) Added selectArray cache to zophTable
* [Issue #48](https://github.com/jeroenrnl/zoph/issues/48) Repair photo ratings during import
* [Issue #50](https://github.com/jeroenrnl/zoph/issues/50) Geonames project has changed URL and requires username
* [Issue #51](https://github.com/jeroenrnl/zoph/issues/51) Fixed depth in tree display when autocorrect is off
* [Issue #39](https://github.com/jeroenrnl/zoph/issues/39) Added support for session.upload_progress as APC replacement (PHP 5.4 compatibility)
* [Issue #38](https://github.com/jeroenrnl/zoph/issues/38) CLI tries to lookup previous argument's value when looking up photographer

####Improvements####

Expand All @@ -97,7 +128,7 @@ to create cleaner, less duplicated and more robust code. I have introduced UnitT
about 20% of Zoph's sourcecode now tested fully automatic for bugs). As a help to that, I am now
using Sonar to automatically run these tests and also analyse Zoph code for other problems.

* * Issue #29 First step in creating unittests for Zoph
* [Issue #29](https://github.com/jeroenrnl/zoph/issues/29) First step in creating unittests for Zoph
* Sonar Support
* Refactor of PHP part of Mapping implementation
* Move timezone-related global functions into class
Expand Down Expand Up @@ -127,7 +158,7 @@ using Sonar to automatically run these tests and also analyse Zoph code for othe
* Removed various unused variables
* Removed duplicate templates
* Removed unused $user from createPulldown() calls.
* Issue #40 Change documentation to Markdown
* [Issue #40](https://github.com/jeroenrnl/zoph/issues/40) Change documentation to Markdown
* Modified some queries to improve performance

## Zoph 0.9.0.1 ##
Expand All @@ -138,14 +169,14 @@ Zoph 0.9.0.1 is the first maintenance release for Zoph 0.9. It adds compatibilit

#### Bugs ####

* Issue #1 Changed TYPE=MyISAM to ENGINE=MyISAM for MySQL > 5.4.4 compatibility
* Issue #1 Fixed: PHP Notice: Array to string conversion
* Issue #2 Changed timestamp(14) into timestamp
* Issue #3 Removed pass-by-reference for PHP 5.4 compatibility
* Issue #6 Missing French translation
* Issue #30 Remove warning about undefined variables
* Issue #31 Fixed several errors in geotagging code
* Issue #33 Fixed: no error message when rotate fails
* [Issue #1](https://github.com/jeroenrnl/zoph/issues/1) Changed TYPE=MyISAM to ENGINE=MyISAM for MySQL > 5.4.4 compatibility
* [Issue #1](https://github.com/jeroenrnl/zoph/issues/1) Fixed: PHP Notice: Array to string conversion
* [Issue #2](https://github.com/jeroenrnl/zoph/issues/2) Changed timestamp(14) into timestamp
* [Issue #3](https://github.com/jeroenrnl/zoph/issues/3) Removed pass-by-reference for PHP 5.4 compatibility
* [Issue #6](https://github.com/jeroenrnl/zoph/issues/6) Missing French translation
* [Issue #30](https://github.com/jeroenrnl/zoph/issues/30) Remove warning about undefined variables
* [Issue #31](https://github.com/jeroenrnl/zoph/issues/31) Fixed several errors in geotagging code
* [Issue #33](https://github.com/jeroenrnl/zoph/issues/33) Fixed: no error message when rotate fails
Fixed a small layout issue on the prefs page

## Zoph 0.9 ##
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Zoph 0.9.2 Readme #
# Zoph 0.9.3 Readme #

## Introduction ##

Expand Down
11 changes: 2 additions & 9 deletions REQUIREMENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,15 @@
Zoph is being developped on Linux, but it should be able to run on any OS that can run Apache, MySQL and PHP. Users have reported succesful installations on MacOSX, several BSD flavours and even Windows.

Zoph requires the following:
* Apache 2.2
* Apache 2.2 or 2.4
* PHP 5.5 or 5.6
* MySQL 5.6
* ImageMagick 6.9
* Jhead 2.97

Other versions may work as well, see below for more details. How to install these applications and get them to work together is depending on your OS and distribution. Check the documentation of the application and/or your distribution for details.

##Apache##
* Current versions of Zoph are developped on Apache 2.2.x
* Current versions of Zoph are developped on Apache 2.4.x

##PHP##
Current versions of Zoph are developped on PHP 5.5 and 5.6
Expand Down Expand Up @@ -53,12 +52,6 @@ The e-mail photo feature may require increasing the memory_limit setting. See EM
##ImageMagick##
* Current Zoph versions have been tested against ImageMagick 6.9.x

##Jhead##
* Jhead 2.97
* Other versions probably work as well

Jhead is a handy little program that extracts the information stored in the Exif headers that are added by most digital cameras. Exif stores date and time plus a bunch of other info about a photo. Zoph can use it to automatically rotate images during import. You can download it from http://www.sentex.net/~mwandel/jhead/.

##Browser##
In order to be able to use Zoph, you will need a browser.
* Zoph is being developped and thoroughly tested with a recent Firefox build
Expand Down
23 changes: 23 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
Zoph 0.9.2 to 0.9.3
===================
* If you want to upgrade from an older version, first follow the instructions to upgrade to 0.9.2. It is not necessary to install older versions first, you can just install the current version and follow the upgrade instructions below.

Copy files
----------

Copy the contents of the php directory, including all subdirs, into your webroot.

cp -a php/* /var/www/html/zoph

Database changes
----------------
* Execute zoph-update-0.9.3.sql:

mysql -u zoph_admin -p zoph < sql/zoph_update-0.9.3.sql

Changes this script makes:

* Resize the password field to allow store bigger hashes
* Add fields to the user table to allow for new access rights
* Add 'created by' fields to the albums, categories, places, people and circles tables

Zoph 0.9.1 to 0.9.2
===================
* If you want to upgrade from an older version, first follow the instructions to upgrade to 0.9.1. It is not necessary to install older versions first, you can just install the current version and follow the upgrade instructions below.
Expand Down
2 changes: 2 additions & 0 deletions UnitTests/PDOdatabaseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
* @author Jeroen Roos
*/

require_once "testSetup.php";

use db\select;
use db\db;
use db\param;
Expand Down
4 changes: 2 additions & 2 deletions UnitTests/circleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ public function testGetDisplayArray() {
"members" => implode("<br>", $memberLinks)
);
$this->assertEquals($exp, $circle->getDisplayArray());

$circle->set("hidden", true);
$circle->update();

$exp["hidden"]="This circle is hidden in overviews";

$this->assertEquals($exp, $circle->getDisplayArray());
Expand Down
29 changes: 29 additions & 0 deletions UnitTests/configTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
* @author Jeroen Roos
*/

require_once "testSetup.php";

use db\insert;
use db\param;
use db\db;
Expand Down Expand Up @@ -88,5 +90,32 @@ public function testUnkownConfItem() {
conf::set("path.images", getcwd() . "/.images");
}

/**
* Test an item which requires another item to be enabled
*/
public function testConfRequirements() {
$loginAlb=conf::get("interface.logon.background.album");
$this->assertNull($loginAlb);

$share=conf::get("share.enable");
$this->assertFalse($share);

$loginAlb=conf::set("interface.logon.background.album", 7);
$loginAlb->update();

// Despite setting it, retrieving it will still return the
// default value.
$loginAlb=conf::get("interface.logon.background.album");
$this->assertNull($loginAlb);

// Now we enable sharing:
$share=conf::set("share.enable", true);
$share->update();
$share=conf::get("share.enable");
$this->assertTrue($share);

// And now, it will return the previously set album number
$loginAlb=conf::get("interface.logon.background.album");
$this->assertEquals(7, $loginAlb);
}
}
13 changes: 8 additions & 5 deletions UnitTests/createTestData/run
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,18 @@
#
# You will need to adopt the below to your local situation

echo -n "Password: "
read -s PASSWORD

echo "Drop Database zophtest:"
mysqladmin -u root -p drop zophtest
mysqladmin -u root -p"$PASSWORD" drop zophtest
echo "Create database zophtest:"
mysql -u root -p -e "CREATE DATABASE zophtest CHARACTER SET utf8 COLLATE utf8_general_ci"
mysql -u root -p"$PASSWORD" -e "CREATE DATABASE zophtest CHARACTER SET utf8 COLLATE utf8_general_ci"
echo "Grant permissions:"
mysql -u root -p -e "grant all on zophtest.* to zoph@'%' identified by \"password\""
mysql -u root -p"$PASSWORD" -e "grant all on zophtest.* to zoph@'%' identified by \"$PASSWORD\""
echo "Import default SQL data:"
mysql -u root -p zophtest < ../sql/zoph.sql
mysql -u root -p"$PASSWORD" zophtest < ../sql/zoph.sql
echo "Create test database:"
./createTestData/createTest.php
echo "Dump data to XML file:"
mysqldump -t -u root -p --xml zophtest > db.xml
mysqldump -t -u root -p"$PASSWORD" --xml zophtest > db.xml
Loading

0 comments on commit 5df1039

Please sign in to comment.