From: Elan Ruusamäe Date: Tue, 4 Aug 2009 08:07:49 +0000 (+0000) Subject: - add plural.patch X-Git-Tag: auto/th/dokuwiki-plugin-data-20090810-2~4 X-Git-Url: http://git.pld-linux.org/?p=packages%2Fdokuwiki-plugin-data.git;a=commitdiff_plain;h=a898bf058f308445766e17aa4ac04204b8d05117 - add plural.patch Changed files: dokuwiki-plugin-data.spec -> 1.6 plural.patch -> 1.1 --- diff --git a/dokuwiki-plugin-data.spec b/dokuwiki-plugin-data.spec index 63393b1..ea838f0 100644 --- a/dokuwiki-plugin-data.spec +++ b/dokuwiki-plugin-data.spec @@ -9,6 +9,7 @@ Source0: http://dev.splitbrain.org/download/snapshots/data-plugin-latest.tgz # Source0-md5: 6a3ee212496a60a343b62246e8002957 URL: http://wiki.splitbrain.org/plugin:data Patch0: interwiki.patch +Patch1: plural.patch BuildRequires: rpmbuild(macros) >= 1.520 Requires: dokuwiki >= 20090214b-5 Requires: php(sqlite) @@ -31,6 +32,7 @@ different to the repository plugin. %prep %setup -q -n %{plugin} %patch0 -p1 +%patch1 -p1 # cleanup backups after patching find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f diff --git a/plural.patch b/plural.patch new file mode 100644 index 0000000..f3c4e37 --- /dev/null +++ b/plural.patch @@ -0,0 +1,18 @@ +--- data/helper.php 2009-08-04 11:06:52.614221159 +0300 ++++ tmp/helper.php 2009-08-04 11:06:34.000000000 +0300 +@@ -148,10 +148,13 @@ + * @returns array with key, type, ismulti, title + */ + function _column($col){ +- if(strtolower(substr($col,-1)) == 's'){ ++ if (strtolower(substr($col,-2)) == 'es') { ++ $col = substr($col,0,-2); ++ $multi = true; ++ } elseif (strtolower(substr($col,-1)) == 's') { + $col = substr($col,0,-1); + $multi = true; +- }else{ ++ } else { + $multi = false; + } + list($key,$type) = explode('_',$col,2);