Pass number of current/max styles to error message.
Patch by wyntarvox.
diffs (24 lines):
diff -r 0e2ad8ec3049 -r bb91dbeb7d9f htdocs/customize/advanced/styles.bml
--- a/htdocs/customize/advanced/styles.bml Mon Mar 07 15:21:06 2011 +0800
+++ b/htdocs/customize/advanced/styles.bml Mon Mar 07 15:25:32 2011 +0800
@@ -284,7 +284,7 @@ _c?>
if (($POST{'action:create'} && $POST{'stylename'}) && !$noactions) {
return "<b>$ML{'Error'}</b> $ML{'error.invalidform'}" unless
LJ::check_form_auth();
- return $err->($ML{'.error.maxstyles'})
+ return $err->( BML::ml( '.error.maxstyles2', { 'numstyles' =>
scalar( keys %$ustyle ), 'maxstyles' => $u->count_s2stylesmax } ) )
if scalar(keys %$ustyle) >= $u->count_s2stylesmax;
my $styleid = LJ::S2::create_style($u, $POST{'stylename'});
diff -r 0e2ad8ec3049 -r bb91dbeb7d9f htdocs/customize/advanced/styles.bml.text
--- a/htdocs/customize/advanced/styles.bml.text Mon Mar 07 15:21:06 2011 +0800
+++ b/htdocs/customize/advanced/styles.bml.text Mon Mar 07 15:25:32 2011 +0800
@@ -35,7 +35,7 @@
.error.layernotpublic=Layer not public: [[layer]]
-.error.maxstyles=You have reached your maximum number of styles.
+.error.maxstyles2=You have reached your maximum number of styles. You have
[[numstyles]] current styles of [[maxstyles]] maximum styles.
.error.notloggedin=You must be logged in to view your styles.
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog