-
-
Notifications
You must be signed in to change notification settings - Fork 851
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
Fix for #1360 - Enhance the row_counter #1515
Conversation
The inspection completed: 2 new issues |
@@ -1345,7 +1345,10 @@ function tabletbody_close() { | |||
function tablerow_open() { | |||
// initialize the cell counter used for classes | |||
$this->_counter['cell_counter'] = 0; | |||
$class = 'row'.$this->_counter['row_counter']++; | |||
if (!isset($this->_counter['row_counter'])){ | |||
$this->_counter['row_counter'] = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At line 1293 in function table_open() the row_counter is already initialized
Does that code nothing?
Or is that function never called for your specific case?
// initialize the row counter used for classes
$this->_counter['row_counter'] = 0;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/lupo49/dokuwiki-plugin-dir/blob/master/syntax.php#L1066
As #1360 notes, the table_open is redefined. It sets the _counter[row_counter] from this new function, but since that property is protected, it could not be changed by the new open_tabel function.
/** @var array global counter, for table classes etc. */
protected $_counter = array(); //
Does this also work with multiple tables? I suspect that then the row counter is never reset... I think a better fix would be to make it possible to specify css class(es) in |
is this obsolete with #1558? Can it be closed? |
Thanks for the pull request, but #1558 solves this issue indeed by allowing adding classes to opening tags. So plugins that didn't use DokuWiki's |
Fix for #1360 - Enhance the row_counter, please review.