Skip to content

Commit

Permalink
Add one new custom query
Browse files Browse the repository at this point in the history
  • Loading branch information
gggeek committed Oct 22, 2019
1 parent 1d9af8a commit f19622c
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 2 deletions.
2 changes: 2 additions & 0 deletions bin/php/checkattributes.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@
$cli->output();
}

/// @todo if the script is run with '-q' flag, this report will not be printed.
/// It would be nice to have everything else silenced, except this.
$cli->output( ezdbiReportGenerator::getText( $violations, $checks, $options['displaychecks'] ) );

$script->shutdown();
Expand Down
4 changes: 4 additions & 0 deletions doc/changelogs/changelog-0.15.1-to-0.16.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
changelog from version 0.15.1 to 0.16.0

. added 1 new custom query, that checks for rows in ezimagefile that correspond to attributes for non-existing content
versions (see upstream issue: https://github.com/ezsystems/ezpublish-kernel/pull/2835)
2 changes: 1 addition & 1 deletion extension.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<software>
<metadata>
<name>eZ DB Integrity extension</name>
<version>0.15.1</version>
<version>0.16.0</version>
<copyright>Copyright (C) 2014-2019 Gaetano Giunta</copyright>
<license>GNU General Public License v2.0</license>
</metadata>
Expand Down
2 changes: 1 addition & 1 deletion ezinfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ static function info()
{
return array(
'Name' => "<a href=\"http://projects.ez.no/ezdbintegrity\">eZ DB Integrity extension</a>",
'Version' => "0.15.1",
'Version' => "0.16.0",
'Copyright' => "Copyright (C) 2014-2019 Gaetano Giunta",
'License' => "GNU General Public License v2.0"
);
Expand Down
1 change: 1 addition & 0 deletions settings/ezdbintegrity.ini
Original file line number Diff line number Diff line change
Expand Up @@ -283,3 +283,4 @@ ezflow_blocks_with_invalid_zones[sql]=SELECT * FROM ezm_block WHERE zone_id NOT
nodes_with_wrong_path[sql]=SELECT c.node_id, c.path_string, p.path_string as parent_path_string FROM ezcontentobject_tree c, ezcontentobject_tree p WHERE c.parent_node_id = p.node_id AND c.path_string NOT REGEXP CONCAT('^', p.path_string, c.node_id, '/$') AND c.node_id <> 1
# for the one below, do we need to account as well for version states 2 and 4 ?
#draft_objects_with_no_draft_versions[sql]=SELECT * FROM ezcontentobject WHERE status = 0 AND id NOT IN ( SELECT contentobject_id FROM ezcontentobject_version WHERE status IN (0, 5) )
image_files_without_attribute_version[sql]=select i.* from ( select contentobject_attribute_id, substr( substr(filepath, locate(contentobject_attribute_id, filepath) + char_length(contentobject_attribute_id) + 1), 1, locate('-', substr(filepath, locate(contentobject_attribute_id, filepath) + char_length(contentobject_attribute_id) + 1)) -1 ) as version, filepath, id from ezimagefile ) i left join ezcontentobject_attribute a on a.id = i.contentobject_attribute_id and a.version = i.version where a.id is null

0 comments on commit f19622c

Please sign in to comment.