Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroenrnl committed Apr 4, 2016
2 parents 1b1580d + edb1f77 commit efa7aa0
Show file tree
Hide file tree
Showing 93 changed files with 1,246 additions and 649 deletions.
8 changes: 8 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Used to remove files from deployment using `git archive`
# This is used when creating a release
# git files
.gitattributes export-ignore
.gitignore export-ignore
# Unittests
UnitTests export-ignore
sonar-project.properties export-ignore
101 changes: 77 additions & 24 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,65 @@
# Zoph Changelog #

##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
* 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
* 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
* Fixed an issue where breadcrumbs wouldn't be removed correctly in some cases
* Changed erronous extension of Exception class
* Fixed slow login times for non-admin users
* Improved performance on people page
* Fixed: zoom buttons are missing from Google Maps
* Remove duplicate files from import (if you would specify the same file twice on CLI import, you would get an error, this is now filtered out)
* Fixed an issue where the person pulldown on the add user page appeared to be empty
* Remove a user from a group when a the user is deleted
* Fixed a warning about unknown variable on places page
* Allow apostropes in place names when creating map markers (Jason Taylor [@JiCiT])

###Refactor###
* A complete new query builder has been created
* Many more parts of Zoph can be (and are being) tested automatically now, this should improve overall quality and reduce bugs
* Many parts of Zoph have been cleaned up to modernize code to the current state of PHP - dropping PHP 5.3 and 5.4 compatibility
* Dropped MSIE6/7 compatibility
* Added documentation to many parts of Zoph's source code
* Many changes to readability of source code, such as more consistent use of whitespace
* Added some more debugging possibilities to easier troubleshoot in case of problems
* Changed logging so less logging is displayed when set to log::NONE
* Changed all self:: references into static:: references
* 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
* 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
* Performance improvement on place page
* Added a posibility to debug queries including parameters

## Zoph 0.9.1 ##
### 21 Feb 2014 ###
Zoph 0.9.1 is the first feature release for Zoph 0.9, it shows a preview of some of the new features for Zoph 0.10. Most important change is the move of most configuration items from config.inc.php into the Web GUI.

####Features####

* issue#28 Configuration through webinterface
* Issue #28 Configuration through webinterface
* Removed display desc under thumbnail feature
* Removed MIXED_THUMBNAILS and THUMB_EXTENSION settings
* removed DEFAULT_SHOW_ALL setting
Expand All @@ -15,27 +68,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 Added a favicon
* Issue #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 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 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
* 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 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

####Improvements####

Expand All @@ -44,7 +97,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 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 @@ -74,7 +127,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 Change documentation to Markdown
* Modified some queries to improve performance

## Zoph 0.9.0.1 ##
Expand All @@ -85,14 +138,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 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
Fixed a small layout issue on the prefs page

## Zoph 0.9 ##
Expand Down
2 changes: 1 addition & 1 deletion INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ $ cp -r php/* /var/www/html/zoph/
```
##Configure the PHP templates##

Many configuration items can be set in php/config.inc.php file. For more information, see http://en.wikibooks.org/wiki/Zoph/Configuration.
Some configuration options can be set in php/config.inc.php file. Usually you will not have to change anything there. Most configuration can be done from the web interface of Zoph. For more information, see http://en.wikibooks.org/wiki/Zoph/Configuration.

##Install the CLI scripts##

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.1 Readme #
# Zoph 0.9.2 Readme #

## Introduction ##

Expand Down
30 changes: 26 additions & 4 deletions UPGRADE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
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.

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.2.sql:

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

Changes this script makes:

* Add previously missing 'random' sortorder to preferences
* Resize Last IP address field so IPv6 addresses can be stored
* Database changes for 'circles' feature
* Create a VIEW on the database to speed up queries for non-admin users


Zoph 0.9 to 0.9.1
=================
Expand All @@ -6,17 +29,16 @@ Zoph 0.9 to 0.9.1

Copy files
----------
Copy the contents of the php directory, including all subdirs, into your webroot and copy the lang directory into the webroot as well. You should make a backup copy of config.inc.php to prevent overwriting it.
Copy the contents of the php directory, including all subdirs, into your webroot and copy the lang directory into the webroot as well.

cp config.inc.php config.local.php
cp -a php/* /var/www/html/zoph
cp -a lang /var/www/html/zoph

Database changes
----------------
* Execute zoph-update-0.10.sql:
* Execute zoph-update-0.9.1.sql:

mysql -u zoph_admin -p zoph < sql/zoph_update-0.10.sql
mysql -u zoph_admin -p zoph < sql/zoph_update-0.9.1.sql

Changes this script makes:

Expand Down
26 changes: 13 additions & 13 deletions UnitTests/PDOdatabaseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,20 +137,20 @@ public function testQueryWithGroupBy() {
* Test a SELECT query with a JOIN clause
*/
public function testQueryWithJoin() {
$qry=new select("photos");
$qry=new select(array("p" => "photos"));
$qry->addFields(array("name"));
$where=new clause("zoph_photos.photo_id = :photoid");
$where=new clause("p.photo_id = :photoid");
$qry->addParam(new param(":photoid", 5, PDO::PARAM_INT));
$qry->join("photo_albums","zoph_photos.photo_id=zoph_photo_albums.photo_id")
->join("albums","zoph_photo_albums.album_id=zoph_albums.album_id")
$qry->join(array("pa" => "photo_albums"),"p.photo_id=pa.photo_id")
->join(array("a" => "albums"),"pa.album_id=a.album_id")
->where($where);
$sql=(string) $qry;
$exp_sql="SELECT zoph_photos.name FROM zoph_photos " .
"INNER JOIN zoph_photo_albums " .
"ON zoph_photos.photo_id=zoph_photo_albums.photo_id " .
"INNER JOIN zoph_albums " .
"ON zoph_photo_albums.album_id=zoph_albums.album_id " .
"WHERE (zoph_photos.photo_id = :photoid);";
$exp_sql="SELECT p.name FROM zoph_photos AS p " .
"INNER JOIN zoph_photo_albums AS pa " .
"ON p.photo_id=pa.photo_id " .
"INNER JOIN zoph_albums AS a " .
"ON pa.album_id=a.album_id " .
"WHERE (p.photo_id = :photoid);";

$this->assertEquals($exp_sql, $sql);
}
Expand Down Expand Up @@ -224,18 +224,18 @@ public function testQueryWithOrder(array $orders) {
}

public function testHasTable() {
$qry=new select("photos");
$qry=new select(array("p" => "photos"));

$this->assertTrue($qry->hasTable("photos"));
$this->assertFalse($qry->hasTable("albums"));

$qry->join("photo_albums", "photos.photo_id=photo_albums.photo_id");
$qry->join(array("pa" => "photo_albums"), "p.photo_id=pa_.photo_id");

$this->assertTrue($qry->hasTable("photos"));
$this->assertTrue($qry->hasTable("photo_albums"));
$this->assertFalse($qry->hasTable("albums"));

$qry->join("albums", "photo_albums.album_id=albums.album_id");
$qry->join(array("a" => "albums"), "pa.album_id=a.album_id");

$this->assertTrue($qry->hasTable("photos"));
$this->assertTrue($qry->hasTable("photo_albums"));
Expand Down
3 changes: 2 additions & 1 deletion UnitTests/XMLdataTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public function testGetXML($object, $search, $xml) {
$actual->loadXML($object::getXML($search)->saveXML());
$expected=new DOMDocument();
$expected->loadXML($xml);

$this->assertEqualXMLStructure($expected->firstChild, $actual->firstChild, false);

}
Expand All @@ -50,7 +51,7 @@ public function testGetXML($object, $search, $xml) {
* @dataProvider getXMLtestdataForUser
*/
public function testGetXMLForUser($object, $search, $xml) {
user::setCurrent(new user(2));
user::setCurrent(new user(5));

$actual = new DOMDocument;
$actual->loadXML($object::getXML($search)->saveXML());
Expand Down
23 changes: 12 additions & 11 deletions UnitTests/albumTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ public function testDelete() {
* @dataProvider getChildren()
*/
public function testGetChildren($id, array $exp_children, $order=null) {
user::setCurrent(new user(1));
$album=new album($id);
$alb_children=$album->getChildren($order);
$children=array();
Expand Down Expand Up @@ -389,7 +390,7 @@ public function getChildren() {
*/
public function getDetails() {
return array(
array(2,2,"no", array(
array(2, 2, 1, array(
"count" => "2",
"oldest" => "2014-01-01 00:01:00",
"newest" => "2014-01-07 00:01:00",
Expand All @@ -399,7 +400,7 @@ public function getDetails() {
"highest" => "7.5",
"average" => "7.50"
)),
array(4,3,"no", array(
array(4, 3, "no", array(
"count" => "3",
"oldest" => "2014-01-01 00:01:00",
"newest" => "2014-01-08 00:01:00",
Expand All @@ -409,7 +410,7 @@ public function getDetails() {
"highest" => "7.5",
"average" => "5.92",
)),
array(1,6,1,array(
array(1, 6, 1,array(
"count" => "3",
"oldest" => "2014-01-03 00:01:00",
"newest" => "2014-01-05 00:01:00",
Expand All @@ -436,8 +437,8 @@ public function getTotalPhotoCount() {
array(1,1,10),
array(1,6,4),
array(1,11,3),
array(2,1,2),
array(2,8,0),
array(5,1,2),
array(5,8,0),
array(4,1,4),
array(4,2,4),
);
Expand Down Expand Up @@ -471,9 +472,9 @@ public function getCoversChildren() {
array(1,"first", 3, 1),
array(1,"last", 4, 9),
array(1,"newest", 4, 10),
array(2,"oldest", 1, 1),
array(2,"newest", 2, 7),
array(2,"first", 2, 1),
array(5,"oldest", 1, 1),
array(5,"newest", 2, 7),
array(5,"first", 2, 1),
array(4,"last", 2, 7),
);
}
Expand All @@ -485,7 +486,7 @@ public function getCoversChildren() {
public function getTopNData() {
return array(
array(1,array(3,4,5,6,11)),
array(2,array(2)),
array(5,array(2)),
array(4,array(3,2))
);
}
Expand All @@ -497,7 +498,7 @@ public function getTopNData() {
public function getAllData() {
return array(
array(1,array(2,3,4,5,6,7,9,10,8,11,12,13,14,1)),
array(2,array(2,1)),
array(5,array(2,1)),
array(4,array(2,3,1))
);
}
Expand All @@ -509,7 +510,7 @@ public function getAllData() {
public function getAlbumCount() {
return array (
array(1, 14),
array(2, 2),
array(5, 2),
array(4, 3)
);
}
Expand Down
Loading

0 comments on commit efa7aa0

Please sign in to comment.