Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sqlite support #28

Merged
merged 55 commits into from
Jan 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
4082ce8
see #808 - Migrate the code to display the trashed date in the admin …
ernestob Aug 28, 2023
98d1921
Merge branch 'netgen:ibexa4' into 202308_808-migrate_the_code_to_disp…
ernestob Aug 28, 2023
000a410
Update README.md Removed Outdated Build information
se7enxweb Dec 23, 2023
f9c9d65
Update README.md Rewrite to reflect changes in ecosystem and state of…
se7enxweb Dec 23, 2023
3c8b3d6
Update README.md fixed link format
se7enxweb Dec 23, 2023
21c521a
Update README.md Added section on PHP version support
se7enxweb Dec 23, 2023
20fafbd
Update README.md Changed version number of product offered to match e…
se7enxweb Dec 23, 2023
48133a5
Update README.md link syntax bugfix
se7enxweb Dec 23, 2023
9a8c9c4
Updated: Refactor Setup Registration Template to replace ez.no links
se7enxweb Dec 26, 2023
3d9406a
Update eztemplateforfunction.php bugfix for php 8
se7enxweb Dec 26, 2023
99ca162
Added: Added documentation outline on PHP 8 Support
se7enxweb Dec 26, 2023
a756066
Updated: Bugfix for default package installation process durring setu…
se7enxweb Dec 26, 2023
bd03edb
Updated: PHP 8.3 bugfix
se7enxweb Dec 26, 2023
95c2510
Merge pull request #42 from se7enxweb/se7enxweb-last-tpl-bug-plus-php…
se7enxweb Dec 26, 2023
a15cb1d
Updated: Moved version bc doc into bc folder. typo bugfix
se7enxweb Dec 26, 2023
40ec277
Merge pull request #43 from netgen/place_doc_in_bc
se7enxweb Dec 26, 2023
9d38333
Update package.ini replace php8 incompatible package server URLs
se7enxweb Jan 3, 2024
ecfdd5e
Merge pull request #44 from netgen/se7enxweb-fix-setup-wizard-site-pa…
se7enxweb Jan 3, 2024
210feca
Update dashboard.ini disable with comment the community_activity Admi…
se7enxweb Jan 3, 2024
e260525
Merge pull request #45 from netgen/se7enxweb-admin-dashboard-blocks
se7enxweb Jan 3, 2024
30f04b4
Updated: Refactor autoloads code used durring installation to prevent…
se7enxweb Jan 3, 2024
0c621b2
Merge pull request #46 from netgen/2024-01-7x-installation-bugfixes
se7enxweb Jan 3, 2024
6f7f898
Updated: Minor php8 bugfix. test if input is countable before counting
se7enxweb Jan 7, 2024
378bfc8
Updated: Minor php8 bugfix. test if input is countable before counting
se7enxweb Jan 7, 2024
d3d3b2e
Updated: Bugfix for inconsistant testing of data before use
se7enxweb Jan 7, 2024
d374cdd
Updated: Bugfix for inconsistant testing of data before use
se7enxweb Jan 7, 2024
c73eed6
Updated: Bugfix for missing parameter passing to function. Found test…
se7enxweb Jan 7, 2024
6ad5d57
Updated: Refactor sql to support sqlite use case
se7enxweb Jan 7, 2024
2a86e3c
Updated: Refactor sql to support sqlite use case
se7enxweb Jan 7, 2024
40b13ea
Updated: Bugfix for inconsistant testing of data before use
se7enxweb Jan 7, 2024
d1aa934
Updated: Refactor sql to support sqlite use case
se7enxweb Jan 7, 2024
80532e0
Updated: Refactor sql to support sqlite use case
se7enxweb Jan 7, 2024
d74e31a
Updated: Refactor sql to support sqlite use case
se7enxweb Jan 7, 2024
a078ae1
Updated: Refactor sql to support sqlite use case
se7enxweb Jan 7, 2024
6a2e04a
Added: Added SQLite database driver and schema into kernel
se7enxweb Jan 7, 2024
5d11b34
Added: Added SQLite database driver and schema into settings
se7enxweb Jan 7, 2024
b2f2951
Updated: Removed deprecated database support from setup testing to pr…
se7enxweb Jan 7, 2024
430a12c
Updated: Added sqlite ImplementationAlias to default settings
se7enxweb Jan 7, 2024
c678ac7
Updated: Refactor call to parent constructor
se7enxweb Jan 7, 2024
912d5e9
Updated: Refactor sqlite server version (same as client version numbe…
se7enxweb Jan 7, 2024
7b4703b
Updated: Added sqlite database type support
se7enxweb Jan 7, 2024
04e4080
Updated: Refactor database choise logic to support sqlite databases b…
se7enxweb Jan 7, 2024
605f1fd
Updated: Added sqlite database type support
se7enxweb Jan 7, 2024
527e9a9
Updated: Added expanded database sqlite support among others
se7enxweb Jan 7, 2024
452193e
Updated: Refactor Class Method createTemporaryCopy exception requirem…
se7enxweb Jan 7, 2024
70b815b
Added: Added example sqlite database schema, working data and example…
se7enxweb Jan 7, 2024
30ddf82
Updated: Refactor getting started with sqlite database data and examp…
se7enxweb Jan 7, 2024
79cb766
Update README.md update ezplatform website information link to point …
se7enxweb Jan 7, 2024
1d84d3c
Merge pull request #47 from netgen/se7enxweb-readme-platform-website-…
se7enxweb Jan 7, 2024
fa42a6e
Merge pull request #31 from mugoweb/202308_808-migrate_the_code_to_di…
se7enxweb Jan 7, 2024
75361f4
Merge branch 'ibexa4' into sqlite-support
se7enxweb Jan 8, 2024
65febff
Update composer.json maintains existing composer configuration
se7enxweb Jan 8, 2024
34a6762
Merge pull request #48 from se7enxweb/sqlite-support
se7enxweb Jan 8, 2024
0777443
Merge branch 'sqlite-support' into 7x-sqlite-support-clean
se7enxweb Jan 8, 2024
682b479
Merge pull request #27 from se7enxweb/7x-sqlite-support-clean
se7enxweb Jan 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 22 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
eZ Publish 6.0
==============
![Artboard 1xxhdpi](https://github.com/se7enxweb/ezpublish/assets/51429274/7d03458d-adae-4f8b-9496-05585b0d6075)


![eZ Publish - Project Logo](https://github.com/se7enxweb/ezpublish/assets/51429274/7d03458d-adae-4f8b-9496-05585b0d6075)

### What version of PHP is required?

Expand All @@ -28,7 +26,22 @@ access to the Internet.

(Referred to as `legacy` in eZ Publish Platform 5.x and Ibexa OSS)

eZ Publish is capable of being used standalone or combined with the Free Software Ibexa OSS.
#### What version of PHP is required

eZ Publish Legacy supports PHP 7.4 -> 8.3 please use the latest version of PHP available on your OS.

#### What is eZ Platform?

eZ Publish's successor, eZ Platform, is a highly extensible, pure Content
Managment Platform. It provides the same flexible content model at it's
core like eZ Publish, and has a growing amount of additional features
outside the traditional CMS scope provided by means of "Bundles"
extending it.

It is built on top of the full Symfony Framework, giving developers
access to "standard" tools for rapid web & application development.

Further reading on: [https://ezplatform.com/](http://web.archive.org/web/20200328165348/https://ezplatform.com/)

License
-------
Expand Down Expand Up @@ -65,8 +78,9 @@ Main eZ Publish features
- Full support for Unicode
- Template engine
- A read only REST API
- Database abstraction layer
- Database abstraction layer supporting MySQL, SQLite, Postgres and Oracle
- MVC architecture
- Support for the latest Image and Video File Formats (webp, webm, png, jpeg, etc)
- Support for highly available and scalable configurations (multi-server clusters)
- XML handling and parsing library
- SOAP communication library
Expand All @@ -88,15 +102,16 @@ Installation
------------
Read [doc/INSTALL.md](doc/INSTALL.md) or go to [ezpublishdoc.mugo.ca/eZ-Publish/Technical-manual/4.7/Installation.html](https://ezpublishdoc.mugo.ca/eZ-Publish/Technical-manual/4.7/Installation.html)


Issue tracker
-------------
Submitting bugs, improvements and stories is possible on [github.com/se7enxweb/ezpublish/issues](https://github.com/se7enxweb/ezpublish/issues).

Submitting bugs, improvements and stories is possible on [https://github.com/netgen/ezpublish-legacy/issues](https://github.com/netgen/ezpublish-legacy/issues)

If you discover a security issue, please responsibly report such issues.

Where to get more help
----------------------

eZ Publish documentation: [ezpublishdoc.mugo.ca/eZ-Publish](https://ezpublishdoc.mugo.ca/eZ-Publish/index.html)

eZ Publish Community forums: [share.se7enx.com/forums](https://share.se7enx.com/forums)
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,4 @@
"@legacy-scripts"
]
}
}
}
237 changes: 155 additions & 82 deletions design/admin/templates/content/trash.tpl
Original file line number Diff line number Diff line change
@@ -1,9 +1,29 @@
<style type="text/css">
{literal}
table.list td { max-width: 500px; word-wrap: break-word; }
table.list td.width-280 { max-width: 280px; }
.mt-20 { margin-top: 20px; }
{/literal}
</style>
{let item_type = ezpreference( 'admin_list_limit' )
number_of_items = min( $item_type, 3)|choose( 10, 10, 25, 50 )
trash_sort_field = first_set( $view_parameters.sort_field, 'name' )
trash_sort_order = first_set( $view_parameters.sort_order, '1' )
trash_sort_field = first_set( $view_parameters.sort_field, 'trashed' )
trash_sort_order = first_set( $view_parameters.sort_order, '0' )
list_count = fetch( 'content', 'trash_count', hash( 'objectname_filter', $view_parameters.namefilter ) ) }

{def
$sort_method = 1
$sort_order = ''
$col_class = ''
$link_order = 1
}

{if eq($trash_sort_order, '0')}
{set $sort_order = 'Descending'|i18n( 'design/admin/node/view/full' )}
{elseif eq($trash_sort_order, '1')}
{set $sort_order = 'Ascending'|i18n( 'design/admin/node/view/full' )}
{/if}

<form name="trashform" action={'content/trash/'|ezurl} method="post" >

<div class="context-block content-trash">
Expand Down Expand Up @@ -49,47 +69,137 @@
<div class="float-break"></div>
</div>

<table class="list" cellspacing="0">
<tr>
<th class="tight"><img src={'toggle-button-16x16.gif'|ezimage} width="16" height="16" alt="Invert selection." onclick="ezjs_toggleCheckboxes( document.trashform, 'DeleteIDArray[]' ); return false;" title="{'Invert selection.'|i18n( 'design/admin/content/trash' )}" /></th>
<th>{'Name'|i18n( 'design/admin/content/trash')}</th>
<th>{'Type'|i18n( 'design/admin/content/trash')}</th>
<th>{'Section'|i18n( 'design/admin/content/trash')}</th>
<th>{'Original Placement'|i18n( 'design/admin/content/trash')}</th>
<th class="tight">&nbsp;</th>
</tr>

{section var=tObjects loop=fetch( 'content', 'trash_object_list', hash( 'limit', $number_of_items,
'offset', $view_parameters.offset,
'sort_by', array( $trash_sort_field, $trash_sort_order ),
'objectname_filter', $view_parameters.namefilter ) ) sequence=array( bglight, bgdark )}
{let cur_c_object=$tObjects.item.object
original_parent = $tObjects.item.original_parent}

<tr class="{$tObjects.sequence}">
<td>
<input type="checkbox" name="DeleteIDArray[]" value="{$cur_c_object.id}" title="{'Use these checkboxes to mark items for removal. Click the "Remove selected" button to remove the selected items.'|i18n( 'design/admin/content/trash' )|wash()}" />
</td>
<td>
{$tObjects.item.class_identifier|class_icon( small, $tObjects.item.class_name|wash )}&nbsp;<a href={concat( '/content/versionview/', $cur_c_object.id, '/', $cur_c_object.current_version, '/' )|ezurl}>{$tObjects.item.name|wash}</a>
</td>
<td>
{$tObjects.item.class_name|wash}
</td>
<td>
{let section_object=fetch( section, object, hash( section_id, $cur_c_object.section_id ) )}{section show=$section_object}{$section_object.name|wash}{section-else}<i>{'Unknown'|i18n( 'design/admin/content/trash' )}</i>{/section}{/let}
</td>
<td>
{if $original_parent}<a href={concat( '/', $original_parent.path_identification_string )|ezurl}>{/if}/{$tObjects.item.original_parent_path_id_string|wash}{if $original_parent}</a>{/if}
</td>
<td>
<a href={concat( '/content/restore/', $cur_c_object.id, '/' )|ezurl}><img src={'edit.gif'|ezimage} border="0" alt="{'Restore'|i18n( 'design/admin/content/trash' )}" /></a>
</td>
</tr>

{/let}
{/section}
</table>
<div class="content-navigation-childlist yui-dt">
<table class="list" cellspacing="0">
<tr>
<th class="tight"><img src={'toggle-button-16x16.gif'|ezimage} width="16" height="16" alt="Invert selection." onclick="ezjs_toggleCheckboxes( document.trashform, 'DeleteIDArray[]' ); return false;" title="{'Invert selection.'|i18n( 'design/admin/content/trash' )}" /></th>
{* set Name column link & asc/desc icon *}
{set
$col_class = ''
$link_order = 1
}
{if eq( 'name', $trash_sort_field )}
{if eq($trash_sort_order, '0')}
{set $col_class = ' yui-dt-desc'}
{elseif eq($trash_sort_order, '1')}
{set
$col_class = ' yui-dt-asc'
$link_order = 0
}
{/if}
{/if}
<th class="yui-dt-col-name yui-dt-sortable{$col_class}">
<div id="yui-dt0-th-class_name-liner" class="yui-dt-liner">
<span class="yui-dt-label">
<a href="{concat( 'content/trash/(sort_field)/name/(sort_order)/', $link_order )|ezurl( 'no' )}" title="Click to sort {$sort_order}" class="yui-dt-sortable">{'Name'|i18n( 'design/adin/content/trash')}</a>
</span>
</div>
</th>
{* set Class name column link & asc/desc icon *}
{set
$col_class = ''
$link_order = 1
}
{if eq( 'class_name', $trash_sort_field )}
{if eq($trash_sort_order, '0')}
{set $col_class = ' yui-dt-desc'}
{elseif eq($trash_sort_order, '1')}
{set
$col_class = ' yui-dt-asc'
$link_order = 0
}
{/if}
{/if}
<th class="yui-dt-col-name yui-dt-sortable{$col_class}">
<div id="yui-dt0-th-class_name-liner" class="yui-dt-liner">
<span class="yui-dt-label">
<a href="{concat( 'content/trash/(sort_field)/class_name/(sort_order)/', $link_order )|ezurl( 'no' )}" title="Click to sort {$sort_order}" class="yui-dt-sortable">{'Type'|i18n( 'design/admin/content/trash')}</a>
</span>
</div>
</th>
{* set Section column link & asc/desc icon *}
{set
$col_class = ''
$link_order = 1
}
{if eq( 'section', $trash_sort_field )}
{if eq($trash_sort_order, '0')}
{set $col_class = ' yui-dt-desc'}
{elseif eq($trash_sort_order, '1')}
{set
$col_class = ' yui-dt-asc'
$link_order = 0
}
{/if}
{/if}
<th class="yui-dt-col-name yui-dt-sortable{$col_class}">
<div id="yui-dt0-th-class_name-liner" class="yui-dt-liner">
<span class="yui-dt-label">
<a href="{concat( 'content/trash/(sort_field)/section/(sort_order)/', $link_order )|ezurl( 'no' )}" title="Click to sort {$sort_order}" class="yui-dt-sortable">{'Section'|i18n( 'design/admin/content/trash')}</a>
</span>
</div>
</th>
<th class="yui-dt-col-name yui-dt-sortable">{'Original Placement'|i18n( 'design/admin/content/trash')}</th>
{* set Trashed column link & asc/desc icon *}
{set
$col_class = ''
$link_order = 1
}
{if eq( 'trashed', $trash_sort_field )}
{if eq($trash_sort_order, '0')}
{set $col_class = ' yui-dt-desc'}
{elseif eq($trash_sort_order, '1')}
{set
$col_class = ' yui-dt-asc'
$link_order = 0
}
{/if}
{/if}
<th class="yui-dt-col-name yui-dt-sortable{$col_class}">
<div id="yui-dt0-th-class_name-liner" class="yui-dt-liner">
<span class="yui-dt-label">
<a href="{concat( 'content/trash/(sort_field)/trashed/(sort_order)/', $link_order )|ezurl( 'no' )}" title="Click to sort {$sort_order}" class="yui-dt-sortable">{'Date trashed'|i18n( 'design/admin/content/trash')}</a>
</span>
</div>
</th>
<th class="tight yui-dt-col-name yui-dt-sortable">&nbsp;</th>
</tr>

{section var=tObjects loop=fetch( 'content', 'trash_object_list', hash( 'limit', $number_of_items,
'offset', $view_parameters.offset,
'sort_by', array( $trash_sort_field, $trash_sort_order ),
'objectname_filter', $view_parameters.namefilter ) ) sequence=array( bglight, bgdark )}
{let cur_c_object=$tObjects.item.object
original_parent = $tObjects.item.original_parent}

<tr class="{$tObjects.sequence}">
<td>
<input type="checkbox" name="DeleteIDArray[]" value="{$cur_c_object.id}" title="{'Use these checkboxes to mark items for removal. Click the "Remove selected" button to remove the selected items.'|i18n( 'design/admin/content/trash' )|wash()}" />
</td>
<td>
{$tObjects.item.class_identifier|class_icon( small, $tObjects.item.class_name|wash )}&nbsp;<a href={concat( '/content/versionview/', $cur_c_object.id, '/', $cur_c_object.current_version, '/' )|ezurl}>{$tObjects.item.name|wash}</a>
</td>
<td>
{$tObjects.item.class_name|wash}
</td>
<td>
{let section_object=fetch( section, object, hash( section_id, $cur_c_object.section_id ) )}{section show=$section_object}{$section_object.name|wash}{section-else}<i>{'Unknown'|i18n( 'design/admin/content/trash' )}</i>{/section}{/let}
</td>
<td class="width-280">
{if $original_parent}<a href={concat( '/', $original_parent.path_identification_string )|ezurl}>{/if}/{$tObjects.item.original_parent_path_id_string|wash}{if $original_parent}</a>{/if}
</td>
<td>
{$tObjects.item.trashed|l10n( 'shortdatetime' )}
</td>
<td>
<a href={concat( '/content/restore/', $cur_c_object.id, '/' )|ezurl}><img src={'edit.gif'|ezimage} border="0" alt="{'Restore'|i18n( 'design/admin/content/trash' )}" /></a>
</td>
</tr>

{/let}
{/section}
</table>
</div>

{else}

Expand All @@ -114,7 +224,7 @@

<div class="controlbar">
{* DESIGN: Control bar START *}<div class="box-bc"><div class="box-ml">
<div class="button-left">
<div class="button-left mt-20">
{if $list_count}
<input class="button" type="submit" name="RemoveButton" value="{'Remove selected'|i18n( 'design/admin/content/trash' )}" title="{'Permanently remove the selected items.'|i18n( 'design/admin/content/trash' )}" />
<input class="button" type="submit" name="EmptyButton" value="{'Empty trash'|i18n( 'design/admin/content/trash' )}" title="{'Permanently remove all items from the trash.'|i18n( 'design/admin/content/trash' )}" />
Expand All @@ -123,50 +233,13 @@
<input class="button-disabled" type="submit" name="EmptyButton" value="{'Empty trash'|i18n( 'design/admin/content/trash' )}" disabled="disabled" />
{/if}
</div>
{* Sorting *}
<div class="button-right" id="trash-list-sort-control" style="display:none;">
<label class="inline">{'Sorting'|i18n( 'design/admin/node/view/full' )}:</label>

{def $sort_fields = hash( 'class_identifier', 'Class identifier'|i18n( 'design/admin/node/view/full' ),
'class_name', 'Class name'|i18n( 'design/admin/node/view/full' ),
'modified', 'Modified'|i18n( 'design/admin/node/view/full' ),
'name', 'Name'|i18n( 'design/admin/node/view/full' ),
'published', 'Published'|i18n( 'design/admin/node/view/full' ),
'section', 'Section'|i18n( 'design/admin/node/view/full' ) )
$sort_title = 'Use these controls to set the sorting method for the sub items of the current location.'|i18n( 'design/admin/node/view/full' )}

<select id="trash_sort_field" title="{$sort_title}">
{foreach $sort_fields as $key => $item}
<option value="{$key}" {if eq( $key, $trash_sort_field )}selected="selected"{/if}>{$item}</option>
{/foreach}
</select>

<select id="trash_sort_order" title="{$sort_title}">
<option value="0"{if eq($trash_sort_order, '0')} selected="selected"{/if}>{'Descending'|i18n( 'design/admin/node/view/full' )}</option>
<option value="1"{if eq($trash_sort_order, '1')} selected="selected"{/if}>{'Ascending'|i18n( 'design/admin/node/view/full' )}</option>
</select>

<input class="button" type="submit" onclick="return trashSortingSelection({'content/trash'|ezurl('single')})" name="SetSorting" value="{'Set'|i18n( 'design/admin/node/view/full' )}" title="{$sort_title}" />

</div>
{literal}
<script type="text/javascript">
document.getElementById('trash-list-sort-control').style.display = '';

function trashSortingSelection( trashUrl )
{
trashUrl += '/(sort_field)/' + document.getElementById('trash_sort_field').value;
trashUrl += '/(sort_order)/' + document.getElementById('trash_sort_order').value;
document.location = trashUrl;
return false;
}
</script>
{/literal}

<div class="float-break"></div>
{* DESIGN: Control bar END *}</div></div>
</div>
</div>
</form>
{undef $sort_fields $sort_title}
{/let}

6 changes: 6 additions & 0 deletions kernel/classes/clusterfilehandlers/ezfsfilehandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,12 @@ function processCache( $retrieveCallback, $generateCallback = null, $ttl = null,
$extraData['noCache'] = true;
if ( $extraData !== null )
$args[] = $extraData;

if ( $generateCallback[1] == 'generateUserCacheForFile' )
{
$args[] = $extraData;
}

$fileData = call_user_func_array( $generateCallback, $args );
return $this->storeCache( $fileData, $storeCache );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -581,8 +581,15 @@ function createClassContentStructure( $doc )
{
$content = $this->defaultClassAttributeContent();
$root = $doc->documentElement;
$constraints = $root->getElementsByTagName( 'constraints' )->item( 0 );
if ( $constraints )
if ( $root !== null )
{
$constraints = $root->getElementsByTagName( 'constraints' )->item( 0 );
}
else
{
$constraints = null;
}
if ( $constraints !== null )
{
$allowedClassList = $constraints->getElementsByTagName( 'allowed-class' );
foreach( $allowedClassList as $allowedClass )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1491,7 +1491,9 @@ function createClassContentStructure( $doc )
{
$content = $this->defaultClassAttributeContent();
$root = $doc->documentElement;
$objectPlacement = $root->getElementsByTagName( 'contentobject-placement' )->item( 0 );
if( $root !== null )
{
$objectPlacement = $root->getElementsByTagName( 'contentobject-placement' )->item( 0 );

if ( $objectPlacement and $objectPlacement->hasAttributes() )
{
Expand Down Expand Up @@ -1522,7 +1524,7 @@ function createClassContentStructure( $doc )
{
$content['object_class'] = $objectClass->getAttribute( 'value' );
}

}
return $content;
}

Expand Down
Loading