Fixed by adding all fields except category_id in group by clause
category_id is retrieved later in an another query.
Fixed also problem of FROM_UNIXTIME function not POstgreSQL compatible.
git-svn-id: http://piwigo.org/svn/trunk@6596 68402e56-0260-453c-a942-63ccdbb3a9ee
For posgresql and sqlite date must allways use day and month with two diggits.
git-svn-id: http://piwigo.org/svn/trunk@6518 68402e56-0260-453c-a942-63ccdbb3a9ee
or agregate function
Fix issue for lambda function (incorrect number of params)
git-svn-id: http://piwigo.org/svn/trunk@6510 68402e56-0260-453c-a942-63ccdbb3a9ee
Incorrect use of database dependant functions.
Fixed same problem for ws functions
git-svn-id: http://piwigo.org/svn/trunk@6500 68402e56-0260-453c-a942-63ccdbb3a9ee
- quick fix (maybe not the cleanest) of regression 2.0 -> 2.1 when displaying metadata on picture page (event called with different input)
git-svn-id: http://piwigo.org/svn/trunk@6475 68402e56-0260-453c-a942-63ccdbb3a9ee
- when using a modifier on a non array variable use @| instead of | (generated code is simpler and faster)
git-svn-id: http://piwigo.org/svn/trunk@6437 68402e56-0260-453c-a942-63ccdbb3a9ee
- merged the linkroot integration with the existing gallery_url (unique $conf['gallery_url'] used for RSS, mail homepage root in the browse path)
- added an option $conf['debug_mail'] - if set all outgoing mails are saved into local_data_dir
git-svn-id: http://piwigo.org/svn/trunk@6411 68402e56-0260-453c-a942-63ccdbb3a9ee
bug 1704 fixed: windows needs a specific directory separator when creating
recursive directory.
git-svn-id: http://piwigo.org/svn/trunk@6385 68402e56-0260-453c-a942-63ccdbb3a9ee
feature 1697: ability to deactivate the synchronization method to add photos.
git-svn-id: http://piwigo.org/svn/trunk@6365 68402e56-0260-453c-a942-63ccdbb3a9ee
bug 1694 fixed: COMPUTED Exif fields were not displayed on picture.php
git-svn-id: http://piwigo.org/svn/trunk@6340 68402e56-0260-453c-a942-63ccdbb3a9ee
bug 1682: r6312 was producing a MySQL error (depending on the MySQL server
version) because a count() implies a group by.
This code change was checked against MySQL 5.0.75, MySQL 5.0.51 (where the
error occured) and SQLite 3.6.22.
git-svn-id: http://piwigo.org/svn/trunk@6322 68402e56-0260-453c-a942-63ccdbb3a9ee
bug 1684 fixed: the test to check availability of the user_infos line was
wrong. I had changed the old db_num_rows > 0 because it was not working with
SQLite. As suggested by nicolas, let's use a simpler trick "count(1)" in the
query itself, this way it should work with any database engine.
I've also removed the while (true) (ugly infinite loop, with a condition for
exit) that was producing an infinite loop for Piwigo installations with 2.0
database model and 2.1 code (before launching upgrade.php)
git-svn-id: http://piwigo.org/svn/trunk@6315 68402e56-0260-453c-a942-63ccdbb3a9ee
bug 1683 fixed: as soon as an admin modifies the admin>conf>options>guest settings, registration is broken. This is because user_infos.theme/language are emptied (while they should not).
I have also added an "automatic repair" piece of code in get_default_user_info function. This piece of code should be removed for 2.2 with the appropriate migration task.
git-svn-id: http://piwigo.org/svn/trunk@6314 68402e56-0260-453c-a942-63ccdbb3a9ee
hard coded enums values for all tables
because enum feature doesn't exists for SQLite.
git-svn-id: http://piwigo.org/svn/trunk@6153 68402e56-0260-453c-a942-63ccdbb3a9ee
fix typos on language names in install.php
correct list of available newsletters
git-svn-id: http://piwigo.org/svn/trunk@6152 68402e56-0260-453c-a942-63ccdbb3a9ee
and pgsql, also make the $pwg_db_link global in the install_db_connect function
so that it can be used in SQLite functions.
bug fixed: with pdo-sqlite, pwg_db_num_rows always returns 0, so when
initializing user data, it tries to insert the same row twice.
git-svn-id: http://piwigo.org/svn/trunk@6090 68402e56-0260-453c-a942-63ccdbb3a9ee
In any language where the str2url would return an empty string. The behavior
doesn't change for european characters.
rvelices warned me about the many issues we might encounter with copy/paste of
the URL and required url_encode/url_decode BUT after many tests (Linux with
Firefox 3.0/Google Chrome 5, MacOS 10.6 with Firefox/Safari, WindowsXP with
IE6/Firefox) I've found 0 problem, even with the most error prone mode
$conf['tag_url_style'] = 'tag'
git-svn-id: http://piwigo.org/svn/trunk@6060 68402e56-0260-453c-a942-63ccdbb3a9ee
parameter (web API already use it).
By default, the $conf['upload_dir'] is no longer dependent to PHPWG_ROOT_PATH
because it becomes a real mess when admin/include/uploadify.php (called
directly, not from an include) tries to perform an upload.
Improvement: make clearer how $conf['upload_dir'] can be set (relative to the
Piwigo installation directory + HTTP reachable)
git-svn-id: http://piwigo.org/svn/trunk@6052 68402e56-0260-453c-a942-63ccdbb3a9ee
screen and in web API.
bug fixed: UploadForm partly takes into account the configurable upload
directory (must be propagated everywhere in the UploadForm process)
git-svn-id: http://piwigo.org/svn/trunk@6051 68402e56-0260-453c-a942-63ccdbb3a9ee
is ready for upload (currently, it checks write access on the upload directory)
git-svn-id: http://piwigo.org/svn/trunk@6049 68402e56-0260-453c-a942-63ccdbb3a9ee
create it. To avoid useless checks on filesystem (rvelices should
appreciate) a configuration variable tells if we have to check or not.
git-svn-id: http://piwigo.org/svn/trunk@5998 68402e56-0260-453c-a942-63ccdbb3a9ee
improvement: no need to transmit the REQUEST_URI from PHP, Smarty already
knows it.
git-svn-id: http://piwigo.org/svn/trunk@5990 68402e56-0260-453c-a942-63ccdbb3a9ee
required version is now 5.0.0
move required version to functions database specific file like others engines
git-svn-id: http://piwigo.org/svn/trunk@5782 68402e56-0260-453c-a942-63ccdbb3a9ee
install_db_connect() function must return database resource link
insert into set syntax is mysql specific
git-svn-id: http://piwigo.org/svn/trunk@5781 68402e56-0260-453c-a942-63ccdbb3a9ee
"related tags" block. Only keep one link for each tag in the "related tags"
block.
git-svn-id: http://piwigo.org/svn/trunk@5703 68402e56-0260-453c-a942-63ccdbb3a9ee
- some searches returned bad array for page['items'] (resulting in php warnings and sometimes mysql fatal error) still existing in branch 2.0
- mysql fatal error in admin maintenance
- php warn in plugins_list.php
- fix check on function param in admin/include/functions.php
git-svn-id: http://piwigo.org/svn/trunk@5691 68402e56-0260-453c-a942-63ccdbb3a9ee
- insert into syntax not correct for posgresql or sqlite
- add languages table
- incorrect function for row count (sqlite)
git-svn-id: http://piwigo.org/svn/trunk@5452 68402e56-0260-453c-a942-63ccdbb3a9ee
About string for theme has to be saved in language theme directory (about.html)
git-svn-id: http://piwigo.org/svn/trunk@5446 68402e56-0260-453c-a942-63ccdbb3a9ee
Template extensions are now attached to all themes if nothing is selected in "bound theme" column.
git-svn-id: http://piwigo.org/svn/trunk@5434 68402e56-0260-453c-a942-63ccdbb3a9ee
Remove $conf['default_theme'] from config file (useless).
Check if theme is still installed in pwg_get_themes.
git-svn-id: http://piwigo.org/svn/trunk@5306 68402e56-0260-453c-a942-63ccdbb3a9ee
Change "Default Display" tab by "Guest Settings" tab.
Add display tab in Configuration/Option menu.
Allow to activate/deactivate a lot of display features:
On main page:
# Display only recently posted images
# Sort order
# Display all elements in all sub-categories
# Display a calendar by posted date
# Display a calendar by creation date
# Slideshow
On photo page:
# Show file metadata
# slideshow
# Add this image to your favorites
# Navigation Bar
# Navigation Thumbnails
git-svn-id: http://piwigo.org/svn/trunk@5293 68402e56-0260-453c-a942-63ccdbb3a9ee
but it has been reported), the fallback on constant PHPWG_DEFAULT_TEMPLATE
was not working.
git-svn-id: http://piwigo.org/svn/trunk@5271 68402e56-0260-453c-a942-63ccdbb3a9ee
unactive, we fallback on default theme (the real default theme, the one set
for default user)
git-svn-id: http://piwigo.org/svn/trunk@5264 68402e56-0260-453c-a942-63ccdbb3a9ee
shows a connection box (and only this), then if the user is an admin shows the
"Hello %s, your gallery is empty...".
I've also added the ability to deactivate this message. Only an admin can
deactivate it.
git-svn-id: http://piwigo.org/svn/trunk@5240 68402e56-0260-453c-a942-63ccdbb3a9ee
PDO::SQLite is now displayed as SQLite in install page.
Always display unique SQLite engine.
git-svn-id: http://piwigo.org/svn/trunk@5239 68402e56-0260-453c-a942-63ccdbb3a9ee
only one function
use exceptions to deal with differents possible errors
git-svn-id: http://piwigo.org/svn/trunk@5236 68402e56-0260-453c-a942-63ccdbb3a9ee
- fix link to css
- simplified language loading (a couple of years ago during utf8 migration I left the possibility to have languages defined in another charsets - this is useless)
git-svn-id: http://piwigo.org/svn/trunk@5200 68402e56-0260-453c-a942-63ccdbb3a9ee
bug 1329: backport the check_input_parameter on trunk
feature 1026: add pwg_token feature for edit/delete comment. Heavy refactoring
on this feature to make the code simpler and easier to maintain (I hope).
git-svn-id: http://piwigo.org/svn/trunk@5195 68402e56-0260-453c-a942-63ccdbb3a9ee
- permalink that use if() syntax
- add tables themes for other database engines that mysql
git-svn-id: http://piwigo.org/svn/trunk@5192 68402e56-0260-453c-a942-63ccdbb3a9ee
applied to en_UK and fr_FR. The help content itself needs some updates
but it will be another set of commits, in this commit, I nearly only
modified the container.
The new "Add Photos" help page only introduces you to 3 main ways to add
photos: direct upload, pLoader and FTP. Each of them has a dedicated tab
on the Admin>Photos>Add screen.
No use of the big question mark icon linked to the Help pages in the
administration header, to avoid having this icon twice : in the header
+ in the content next to H2.
git-svn-id: http://piwigo.org/svn/trunk@5182 68402e56-0260-453c-a942-63ccdbb3a9ee
- local_head must now be defined in the themeconf.inc.php otherwise not taken into account (avoid several calls to file_exists)
- renamed themeconf['theme'] to themeconf['name'] (this is what it is themeconf[theme] is confusing)
git-svn-id: http://piwigo.org/svn/trunk@5177 68402e56-0260-453c-a942-63ccdbb3a9ee
Keep english values for language keys translation.
Provide a script to use english values for key in language files.
Todo : provide a script (to help transition) to keep using
original keys in language files for translators.
git-svn-id: http://piwigo.org/svn/trunk@5156 68402e56-0260-453c-a942-63ccdbb3a9ee
delete, set as default.
plugins.class.php was merged back to a state it doesn't manage themes at all.
themes.class.php was created instead, from a duplication of plugins.class.php
and strongly modified then.
feature 1507: the display of available themes is now much more "graphic".
git-svn-id: http://piwigo.org/svn/trunk@5153 68402e56-0260-453c-a942-63ccdbb3a9ee
Extend for templates now work properly.
Bound template as to be renamed in bound theme...
git-svn-id: http://piwigo.org/svn/trunk@5126 68402e56-0260-453c-a942-63ccdbb3a9ee
Move mail images.
Change image path in mail-css files.
Remove local css file for NBM.
git-svn-id: http://piwigo.org/svn/trunk@5125 68402e56-0260-453c-a942-63ccdbb3a9ee
manages template/theme in a simpler "theme only level" architecture. It
supports multiple level inheritance.
git-svn-id: http://piwigo.org/svn/trunk@5123 68402e56-0260-453c-a942-63ccdbb3a9ee
$themeconf['modeling'] = false; /* Assume to have all *.tpl files in the template.
git-svn-id: http://piwigo.org/svn/trunk@5101 68402e56-0260-453c-a942-63ccdbb3a9ee
Use php-gettext (developpement version rev43, because of php5.3) as fallback
Use native language (english) instead of key for translation
Keep directory en_UK for english customization
Need some refactoring for plurals
Todo : managing plugins in the same way
git-svn-id: http://piwigo.org/svn/trunk@5021 68402e56-0260-453c-a942-63ccdbb3a9ee
feature 1448 added: ability to set the upload directory (for pwg.images.add
API method).
Warning: due to risk on img src construction, the upload_dir must be relative
to the Piwigo directory itself.
git-svn-id: http://piwigo.org/svn/trunk@5014 68402e56-0260-453c-a942-63ccdbb3a9ee
- sqlite is proposed by default if severals
database engine are available (cf conf)
- sqlite is proposed before pdo-sqlite
- remove host, user and password for sqlite
git-svn-id: http://piwigo.org/svn/trunk@4985 68402e56-0260-453c-a942-63ccdbb3a9ee
bug 1047 fixed: avoid warnings when the creation date is 0000-00-00 (which
happens when date_creation comes from corrupted EXIF)
bug 859 fixed: at display time only. Piwigo still inserts wrong date in the
database, to be fixed later.
git-svn-id: http://piwigo.org/svn/trunk@4966 68402e56-0260-453c-a942-63ccdbb3a9ee
feature 1453 added: ability to check for uniqueness on filename. No change on
the default behavior: uniqueness is set on md5sum.
git-svn-id: http://piwigo.org/svn/trunk@4954 68402e56-0260-453c-a942-63ccdbb3a9ee
feature 967: optionnaly transmit the original filename to pwg.images.add. When
transmitted, it fills the images.file column.
git-svn-id: http://piwigo.org/svn/trunk@4911 68402e56-0260-453c-a942-63ccdbb3a9ee
Feature 0001142: notification on category, current user language depends on last group user
Thanks to cljosse and Eric for their help!
git-svn-id: http://piwigo.org/svn/trunk@4908 68402e56-0260-453c-a942-63ccdbb3a9ee
bug 1423 fixed: support for ExtendedDescription (and all the ones using the
"render_category_name" event) in category names.
git-svn-id: http://piwigo.org/svn/trunk@4903 68402e56-0260-453c-a942-63ccdbb3a9ee
bug 1422 fixed: pwg.images.add (and sub methods) can create recursive
directories for windows.
add trace in ws_logfile for add_file + ws_images_add_chunk
git-svn-id: http://piwigo.org/svn/trunk@4900 68402e56-0260-453c-a942-63ccdbb3a9ee
update pwg_db_insert_id() function.
PosgreSQL needs table name to retrieve last insert auto increment id.
git-svn-id: http://piwigo.org/svn/trunk@4892 68402e56-0260-453c-a942-63ccdbb3a9ee
bug 1431: Community users now can see empty categories just like any admin.
git-svn-id: http://piwigo.org/svn/trunk@4884 68402e56-0260-453c-a942-63ccdbb3a9ee
Using session_write_close function when session handler use database because write is called after object destruction.
git-svn-id: http://piwigo.org/svn/trunk@4781 68402e56-0260-453c-a942-63ccdbb3a9ee
feature 1381: pwg.images.add automatically synchronizes metadata. Thank you to
Jochen Roth (Polly) for the patch.
git-svn-id: http://piwigo.org/svn/trunk@4685 68402e56-0260-453c-a942-63ccdbb3a9ee