Age | Commit message (Collapse) | Author |
|
- cbi.js: make sure to treat single bytes as signed char when
handling end cases
- template_lmo.c: make sure to treat single bytes as signed
char when handling end cases, avoids hash miscalculations
on ARM
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Introduce a new luci.template.parser.get_translations() function which will
iterate all loaded translation entries and pass the to the given callback
function.
This is useful to expose the loaded translations in other formats, e.g. for
wrapping them into JSON feeds.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: David Yang <mmyangfl@gmail.com>
|
|
This reverts commit ad7dc4a4928e77ae142d0fe040f9e9e64b530e82.
Since we're using liblucihttp now, that library is the appropriate place to
add such decoding helper functions.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
The C implementations of urlencode and urldecode are considerably faster
than their current Lua counterparts.
On an AMD Geode system, the C variant is up to ten times faster when
decoding strings and up to four times faster when encoding them.
The functions are also designed to only allocate new strings when any
actual changes are required, otherwise they reuse the existing input
strings, reducing the overal memory usage somewhat.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Otherwize the distrevision may be displayed twice if it contains some special matching patterns.(For example I am using "git-$hash" in my own OpenWrt branch.)
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
|
|
The version string displayed in the footer and the overview page contains
both LuCI and Openwrt versions. But due to differences in the contents
of /etc/openwrt_release the exact Openwrt revision r..... may be missing:
* In trunk that revision is included in the DISTRIB_DESCRIPTION field that
is displayed in Luci as the Openwrt version.
* In release branches, that field contains the release number like 15.05.
Revision number is always present in DISTRIB_REVISION field, so add the
revision from that field in case the revision is not already present
in the string.
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
|
|
Adjust luci.mk and luci-base to find out correctly if Luci is built
from master or from a branch. Display that value in the footer and
the overview page.
* Evaluate the git branch in luci.mk and pass that to LuCI submodules
as a make variable. Use branch name, ignore tags.
* Deprecate svn detection in luci-base's mkversion.sh that generates
version.lua. Simply use the value passed by make.
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
|
|
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
|
|
Previously the template engine did not interpolate translation macros if no
translation catalogue could be loaded due to a missing i18n directory.
Change the offending code to return the original string in any error case.
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
|
|
* Rename subdirectories to their repective OpenWrt package names
* Make each LuCI module its own standalone package
* Deploy a shared luci.mk which is used by each module Makefile
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
|