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

add_column greater than 9 #84

Open
olimortimer opened this issue Feb 24, 2015 · 2 comments
Open

add_column greater than 9 #84

olimortimer opened this issue Feb 24, 2015 · 2 comments

Comments

@olimortimer
Copy link
Contributor

If you use add_column, and attempt to pass more than 9 match_replacements (ie, $10, $11 etc), the exec_replace replacement function doesn't work. This is due to exec_replace running through each key in order, which causes $1 (foo) to also replace $11, $12 etc with foo1, foo2 etc.

olimortimer pushed a commit to olimortimer/Ignited-Datatables that referenced this issue Feb 24, 2015
@olimortimer
Copy link
Contributor Author

Fixed in pull request #85

@n1crack
Copy link
Member

n1crack commented Mar 1, 2015

I think this is a better solution :

At line 475 you can use:
$custom_val['content'] = preg_replace("/" . '$(' . ($key + 1) . "(?!\d))/i", $replace_string, $custom_val['content']);

instead of
$custom_val['content'] = str_ireplace('$' . ($key + 1), $replace_string, $custom_val['content']);

cryogenix added a commit that referenced this issue Feb 1, 2016
Fixes issue #84 - add_column greater than 9
chland added a commit to chland/Ignited-Datatables that referenced this issue Oct 13, 2017
This basically just adds some fixes for various issues:

IgnitedDatatables#84

IgnitedDatatables#78

IgnitedDatatables#66
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants