summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorHannu Nyman <hannu.nyman@iki.fi>2015-09-02 08:50:58 +0300
committerHannu Nyman <hannu.nyman@iki.fi>2015-09-02 08:50:58 +0300
commitb96d223642ae93c9ae1679a0a0fb9ab368060e39 (patch)
tree72e27a2e4f6ec8065bc97611fdf84fb3e2ec46c3
parentdaeb2016d6b89d431f9e2ddb51384131c86ab6b6 (diff)
parentca75918ff3a9069d9e31fd0a0742ad5be1089309 (diff)
Merge pull request #463 from hnyman/max-len-version
Luci opkg/packages: Limit version string display to 26 chars
-rw-r--r--modules/luci-base/luasrc/model/ipkg.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/luci-base/luasrc/model/ipkg.lua b/modules/luci-base/luasrc/model/ipkg.lua
index 2e26bd7a16..41633c43d7 100644
--- a/modules/luci-base/luasrc/model/ipkg.lua
+++ b/modules/luci-base/luasrc/model/ipkg.lua
@@ -139,6 +139,10 @@ local function _list(action, pat, cb)
desc = ""
end
+ if #version > 26 then
+ version = version:sub(1,21) .. ".." .. version:sub(-3,-1)
+ end
+
cb(name, version, desc)
name = nil