plus

11

--- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScriptParser.java
+++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScriptParser.java
@@ -587,6 +587,10 @@ private GraphTargetItem traits(String scriptName, boolean scriptTraits, List<Ass
                             throw new AVM2ParseException("Only one static keyword allowed", lexer.yyline());
                         }
                         isStatic = true;
+                    } else if(s.type == SymbolType.NAMESPACE) {
+                        break;
+                    } else if(s.type == SymbolType.NATIVE) {
+                        throw new AVM2ParseException("Cannot compile native code", lexer.yyline());
                     } else if (s.group == SymbolGroup.IDENTIFIER) {
                         customAccess = s.value.toString();
                         namespace = -2;
plus

5

--- a/tests/Benchmarks_test.cpp
+++ b/tests/Benchmarks_test.cpp
@@ -81,15 +81,11 @@ TEST_CASE( "Choreograph Timeline Basic Performance" ) {
   }
 
   {
-    REQUIRE( choreograph_timeline.empty() == false );
-
     auto begin = timer::now();
     choreograph_timeline.step( dt );
 
     auto end = timer::now();
     printTiming( "Step to remove disconnected Motions", end - begin );
-
-    REQUIRE( choreograph_timeline.empty() == true );
   }
 
   {
plus

26

--- a/test/index_test.js
+++ b/test/index_test.js
@@ -197,9 +197,6 @@ describe("Mitm", function() {
     })
 
     describe("when bypassed", function() {
-      // Reset outer scope's Mitm initialization.
-      beforeEach(function() { this.mitm.disable() })
-
       beforeEach(function() { this.sinon = Sinon.sandbox.create() })
       afterEach(function() { this.mitm.disable() })
       afterEach(function() { this.sinon.restore() })
@@ -215,6 +212,7 @@ describe("Mitm", function() {
       })
 
       it("must call original Net.connect", function() {
+        this.mitm.disable()
         var connect = this.sinon.spy(Net, "connect")
         this.mitm = intercept()
         this.mitm.on("connect", function(client) { client.bypass() })
@@ -261,14 +259,12 @@ describe("Mitm", function() {
     })
 
     describe("when bypassed", function() {
-      // Reset outer scope's Mitm initialization.
-      beforeEach(function() { this.mitm.disable() })
-
       beforeEach(function() { this.sinon = Sinon.sandbox.create() })
       afterEach(function() { this.mitm.disable() })
       afterEach(function() { this.sinon.restore() })
 
       it("must call original Tls.connect", function() {
+        this.mitm.disable()
         var connect = this.sinon.spy(Tls, "connect")
         this.mitm = intercept()
         this.mitm.on("connect", function(client) { client.bypass() })
plus

3

index 0000000..36d7e48
--- /dev/null
+++ b/src/util.c
@@ -0,0 +1,26 @@
+#include "util.h"
+
+bool rect_intersect(SDL_Rect* a, SDL_Rect* b)
+{
+    if (b->x > (a->x + a->w))
+    {
+        return false;
+    }
+
+    if (b->y > (a->y + a->h))
+    {
+        return false;
+    }
+
+    if ((b->x + b->w) < a->x)
+    {
+        return false;
+    }
+
+    if ((b->y + b->h) < a->y)
+    {
+        return false;
+    }
+
+    return true;
+}
plus

22

--- a/BetterBatteryStats/src/com/asksven/betterbatterystats/adapters/StatsAdapter.java
+++ b/BetterBatteryStats/src/com/asksven/betterbatterystats/adapters/StatsAdapter.java
@@ -278,7 +278,7 @@ public View getView(int position, View convertView, ViewGroup viewGroup)
         	buttonBar.setValues(entry.getValues(), m_maxValue);        	
         }
         ImageView iconView = (ImageView) convertView.findViewById(R.id.icon);
-        
+        LinearLayout iconLayout = (LinearLayout) convertView.findViewById(R.id.LayoutIcon);
         /////////////////////////////////////////
 		// we do some stuff here to handle settings about font size and thumbnail size
 		String iconDim = sharedPrefs.getString("thumbnail_size", "56");
@@ -293,11 +293,11 @@ public View getView(int position, View convertView, ViewGroup viewGroup)
 		////////////////////////////////////////////////////////////////////////////////////
                 
         // add on click listener for the icon only if KB is enabled
-        if (bShowKb)
-        {
-	        // set a click listener for the list
-	        iconKb.setOnClickListener(new OnIconClickListener(position));
-        }
+//        if (bShowKb)
+//        {
+//	        // set a click listener for the list
+//	        iconKb.setOnClickListener(new OnIconClickListener(position));
+//        }
 
         // show / hide fqn text
         if ((entry instanceof Process) || (entry instanceof Alarm) || (entry instanceof NativeKernelWakelock) || (entry instanceof State) || (entry instanceof Misc))
@@ -309,7 +309,7 @@ public View getView(int position, View convertView, ViewGroup viewGroup)
         	myFqnLayout.setVisibility(View.VISIBLE);
         }
 
-        // show / hide package icons
+        // show / hide package icons (we show / hide the whole layout as it contains a margin that must be hidded as well
         if ((entry instanceof NativeKernelWakelock) || (entry instanceof State) || (entry instanceof Misc))
         {
 
plus

4

--- a/roles/mediawiki/files/localsettings/LocalSettings.php.j2
+++ b/roles/mediawiki/files/localsettings/LocalSettings.php.j2
@@ -245,11 +245,12 @@ $wgConf->settings = array(
 	'wgCentralAuthAutoLoginWikis' => array(
 		'default' => array(
 			'chemtalk.org' => 'chemtalkwiki',
+			'degu.wiki' => 'deguwiki',
 			'rationalwiki.ssu.lt' => 'rationalwiki',
 			'spiral.wiki' => 'spiralwiki',
 			'wiki.revi.pe.kr' => 'reviwiki',
 			'wikiconstitucio.org' => 'wikiconstituciowiki',
-			'degu.wiki' => 'deguwiki',
+			'wikimirsm.mateis.nl' => 'wikimirsmwiki',
 		),
 	),
 	'wgCentralAuthAutoMigrate' => array(
@@ -1252,6 +1253,7 @@ $wgConf->settings = array(
 		'reviwiki' => 'http://wiki.revi.pe.kr',
 		'spiralwiki' => '//spiral.wiki',
 		'wikiconstituciowiki' => 'http://wikiconstitucio.org',
+		'wikimirsmwiki' => 'wikimirsm.mateis.nl',
 	),
 	'wgShowHostnames' => array(
 		'default' => true, // Show which server the request was serviced by
@@ -1364,7 +1366,8 @@ $wgConf->settings = array(
 			'wikiconstitucio\.org',
 			'wiki\.revi\.pe\.kr',
 			'nazis\.exposed',
-			'wikiconstitucio\.org'
+			'wikiconstitucio\.org',
+			'wikimirsm\.mateis\.nl',
 		),
 	),
 	// /UrlShortener
plus

140

--- a/src/javascripts/test/unit/Main/component/service/config/FieldSpec.js
+++ b/src/javascripts/test/unit/Main/component/service/config/FieldSpec.js
@@ -10,6 +10,24 @@ define(function (require) {
 
     describe("Service: Field config", function () {
 
+        describe('label', function() {
+            it('should return the camelCased name by default', function () {
+                var field;
+                field = new Field('myField');
+                expect(field.label()).toEqual('MyField');
+                field = new Field('my_field_1');
+                expect(field.label()).toEqual('MyField1');
+                field = new Field('my-field-2');
+                expect(field.label()).toEqual('MyField2');
+            });
+
+            it('should allow to set a custom label', function () {
+                var field = new Field('myField').label('foobar');
+                expect(field.label()).toEqual('foobar');
+            });
+
+        });
+
         describe('type', function () {
             it('should set type string.', function () {
                 var field = new Field();
@@ -18,18 +36,12 @@ define(function (require) {
                 expect(field.type()).toBe('string');
             });
 
-            it('should set a random string as name when not set.', function () {
+            it('should have a name even when not set.', function () {
                 var field = new Field();
 
                 expect(field.name()).not.toBe(null);
             });
 
-            it('should camelCase the name as the label by default.', function () {
-                var field = new Field('myField');
-
-                expect(field.label()).toEqual('MyField');
-            });
-
             it('should accept string for template value.', function () {
                 var field = new Field('myField')
                     .type('template')
plus

5

--- a/lib/libc/net/base64.c
+++ b/lib/libc/net/base64.c
@@ -199,6 +199,7 @@ b64_pton(src, target, targsize)
 	size_t targsize;
 {
 	int tarindex, state, ch;
+	u_char nextbyte;
 	char *pos;
 
 	state = 0;
@@ -226,22 +227,28 @@ b64_pton(src, target, targsize)
 			break;
 		case 1:
 			if (target) {
-				if ((size_t)tarindex + 1 >= targsize)
+				if ((size_t)tarindex >= targsize)
 					return (-1);
 				target[tarindex]   |=  (pos - Base64) >> 4;
-				target[tarindex+1]  = ((pos - Base64) & 0x0f)
-							<< 4 ;
+				nextbyte = ((pos - Base64) & 0x0f) << 4;
+				if (tarindex + 1 < targsize)
+					target[tarindex + 1] = nextbyte;
+				else if (nextbyte)
+					return (-1);
 			}
 			tarindex++;
 			state = 2;
 			break;
 		case 2:
 			if (target) {
-				if ((size_t)tarindex + 1 >= targsize)
+				if ((size_t)tarindex >= targsize)
 					return (-1);
 				target[tarindex]   |=  (pos - Base64) >> 2;
-				target[tarindex+1]  = ((pos - Base64) & 0x03)
-							<< 6;
+				nextbyte = ((pos - Base64) & 0x03) << 6;
+				if (tarindex + 1 < targsize)
+					target[tarindex + 1] = nextbyte;
+				else if (nextbyte)
+					return (-1);
 			}
 			tarindex++;
 			state = 3;
@@ -299,7 +306,8 @@ b64_pton(src, target, targsize)
 			 * zeros.  If we don't check them, they become a
 			 * subliminal channel.
 			 */
-			if (target && target[tarindex] != 0)
+			if (target && tarindex < targsize &&
+				target[tarindex] != 0)
 				return (-1);
 		}
 	} else {
plus

7

--- a/editortools/brush.py
+++ b/editortools/brush.py
@@ -113,20 +113,19 @@ def _perform():
                     if not self.level.containsChunk(*cPos):
                         continue
                     chunk = self.level.getChunk(*cPos)
+                    print self.points
                     for i, point in enumerate(self.points):
-                        print 'b'
                         brushBox = self.tool.getDirtyBox(point, self.tool.getBrushSize())
                         brushBoxThisChunk, slices = chunk.getChunkSlicesForBox(brushBox)
-                        if brushBoxThisChunk.volume == 0: return
                         f = self.brushMode.applyToChunkSlices(self, chunk, slices, brushBox, brushBoxThisChunk)
+                        if brushBoxThisChunk.volume == 0: f = None
+                        if f == False: return
                         if hasattr(f, "__iter__"):
                             for progress in f:
                                 yield progress
                         else:
                             yield j * len(self.points) + i, len(self.points) * self._dirtyBox.chunkCount, _("Applying {0} brush...").format(self.brushMode.__class__.__name__)
-                        print 'a'
                     chunk.chunkChanged()
-
         if len(self.points) > 10:
             showProgress("Performing brush...", _perform(), cancel=True)
         else:
@@ -203,11 +202,14 @@ def createField(self, key, value): #Creates a field matching the input type
                                  recentBlocks = self.tool.recentBlocks[key],
                                  allowWildcards = True
                                  )
+        elif type == 'str':
+            object = Label(value)
         return object
     
     def brushModeChanged(self):
         self.tool.selectedBrushMode = self.brushModeButton.selectedChoice
-        self.tool.brushMode = self.tool.brushModes[selectedBrushMode]
+        self.tool.brushMode = self.tool.brushModes[self.tool.selectedBrushMode]
+        self.tool.showPanel()
     
     def createPresetRow(self): #Creates the brush preset row, called by BrushPanel when creating the panel
         """
@@ -230,8 +232,6 @@ def createPresetRow(self): #Creates the brush preset row, called by BrushPanel w
         widget.shrink_wrap()
         widget.anchor = "whtr"
         return widget
-
-        
         
         
 class BrushToolOptions(ToolOptions):
@@ -263,13 +263,12 @@ class BrushTool(CloneTool):
     settings = {
     'chooseBlockImmediately':False,
     'updateBrushOffset':False,
-    'brushAlpha':1.0,      
+    'brushAlpha':1.0,
     }
     brushModes = {}
     recentBlocks = {}
     previewDirty = False
     cameraDistance = EditorTool.cameraDistance
-    
 
     def __init__(self, *args):
         """
@@ -364,7 +363,7 @@ def setupBrushModes(self):
                         if not hasattr(self.options, key):
                             if type(r[key]) == tuple:
                                 self.options[key] = r[key][0]
-                            else:
+                            elif type(r[key]) != str:
                                 self.options[key] = r[key]
             if not hasattr(self.options, 'Minimum Spacing'):
                 self.options['Minimum Spacing'] = 1
@@ -712,6 +711,8 @@ def drawTerrainReticle(self):
         Draws the white reticle where the cursor is pointing.
         Called by leveleditor.render
         """
+        if not hasattr(self, 'brushMode'):
+            return
         if self.options[getattr(self.brushMode, 'mainBlock', 'Block')] != self.renderedBlock:
             self.setupPreview()
             self.renderedBlock = self.options[getattr(self.brushMode, 'mainBlock', 'Block')]
plus

3

--- a/src/leaflet-panel-layers.js
+++ b/src/leaflet-panel-layers.js
@@ -21,24 +21,24 @@ L.Control.PanelLayers = L.Control.Layers.extend({
 		for (i in baseLayers)
 			if(baseLayers[i].layers) 
 				for(n in baseLayers[i].layers)
-					this._addLayer(baseLayers[i].layers[n], n, false, i);
+					this._addLayer(baseLayers[i].layers[n], false, baseLayers[i].name);
 			else
-				this._addLayer(baseLayers[i], i, false);
+				this._addLayer(baseLayers[i], false);
 
 		for (i in overlays)
 			if(overlays[i].layers) 
 				for(n in overlays[i].layers)
-					this._addLayer(overlays[i].layers[n], n, true, i);
+					this._addLayer(overlays[i].layers[n], true, overlays[i].name);
 			else			
-				this._addLayer(overlays[i], i, true);
+				this._addLayer(overlays[i], true);
 	},
 
-	_addLayer: function (layer, name, overlay, group) {
+	_addLayer: function (layer, overlay, group) {
 		var id = L.stamp(layer.layer);
 
 		this._layers[id] = {
 			layer: layer.layer,
-			name: name,
+			name: layer.name,
 			overlay: overlay,
 			group: group
 		};
plus

63

--- a/OsmAnd/src/net/osmand/plus/osmo/OsMoGroups.java
+++ b/OsmAnd/src/net/osmand/plus/osmo/OsMoGroups.java
@@ -26,6 +26,7 @@
 public class OsMoGroups implements OsMoReactor, OsmoTrackerListener {
 	
 	private static final String GROUP_NAME = "name";
+	private static final String ACTIVE = "active";
 	private static final String GROUP_ID = "group_id";
 	private static final String EXPIRE_TIME = "expireTime";
 	private static final String DESCRIPTION = "description";
@@ -250,14 +251,14 @@ public boolean acceptCommand(String command, String gid, String data, JSONObject
 				JSONArray arr = new JSONArray(data);
 				int arrLength = arr.length();
 				if (arrLength > 0) {
-					Map<String, OsMoGroup> resivedGroups = new HashMap<String, OsMoGroupsStorage.OsMoGroup>();
+					Map<String, OsMoGroup> receivedGroups = new HashMap<String, OsMoGroupsStorage.OsMoGroup>();
 					for (int i = 0; i < arrLength; i++) {
 						JSONObject o = arr.getJSONObject(i);
 						OsMoGroup parsedGroup = parseGroup(o);
-						resivedGroups.put(parsedGroup.getGroupId(), parsedGroup);
+						receivedGroups.put(parsedGroup.getGroupId(), parsedGroup);
 					}
 					
-					storage.mergeGroups(resivedGroups);
+					storage.mergeGroups(receivedGroups);
 					storage.save();
 				}
 				processed = true;
@@ -360,7 +361,8 @@ public boolean acceptCommand(String command, String gid, String data, JSONObject
 
 	private OsMoGroup parseGroup(JSONObject obj) throws JSONException {
 		OsMoGroup groupe = new OsMoGroup();
-		groupe.enabled = true;
+		groupe.enabled = !(obj.has(ACTIVE) && ("0".equals(obj.getString(ACTIVE)) || 
+				"false".equals(obj.getString(ACTIVE))));
 		groupe.name = obj.optString(GROUP_NAME);
 		groupe.groupId = obj.getString(GROUP_ID);
 		groupe.description = obj.optString(DESCRIPTION);
plus

63

--- a/OsmAnd/src/net/osmand/plus/osmo/OsMoGroups.java
+++ b/OsmAnd/src/net/osmand/plus/osmo/OsMoGroups.java
@@ -26,6 +26,7 @@
 public class OsMoGroups implements OsMoReactor, OsmoTrackerListener {
 	
 	private static final String GROUP_NAME = "name";
+	private static final String ACTIVE = "active";
 	private static final String GROUP_ID = "group_id";
 	private static final String EXPIRE_TIME = "expireTime";
 	private static final String DESCRIPTION = "description";
@@ -250,14 +251,14 @@ public boolean acceptCommand(String command, String gid, String data, JSONObject
 				JSONArray arr = new JSONArray(data);
 				int arrLength = arr.length();
 				if (arrLength > 0) {
-					Map<String, OsMoGroup> resivedGroups = new HashMap<String, OsMoGroupsStorage.OsMoGroup>();
+					Map<String, OsMoGroup> receivedGroups = new HashMap<String, OsMoGroupsStorage.OsMoGroup>();
 					for (int i = 0; i < arrLength; i++) {
 						JSONObject o = arr.getJSONObject(i);
 						OsMoGroup parsedGroup = parseGroup(o);
-						resivedGroups.put(parsedGroup.getGroupId(), parsedGroup);
+						receivedGroups.put(parsedGroup.getGroupId(), parsedGroup);
 					}
 					
-					storage.mergeGroups(resivedGroups);
+					storage.mergeGroups(receivedGroups);
 					storage.save();
 				}
 				processed = true;
@@ -360,7 +361,8 @@ public boolean acceptCommand(String command, String gid, String data, JSONObject
 
 	private OsMoGroup parseGroup(JSONObject obj) throws JSONException {
 		OsMoGroup groupe = new OsMoGroup();
-		groupe.enabled = true;
+		groupe.enabled = !(obj.has(ACTIVE) && ("0".equals(obj.getString(ACTIVE)) || 
+				"false".equals(obj.getString(ACTIVE))));
 		groupe.name = obj.optString(GROUP_NAME);
 		groupe.groupId = obj.getString(GROUP_ID);
 		groupe.description = obj.optString(DESCRIPTION);
plus

10

--- a/processor/src/main/java/org/mapstruct/ap/MappingProcessor.java
+++ b/processor/src/main/java/org/mapstruct/ap/MappingProcessor.java
@@ -93,9 +93,9 @@
      */
     private static final boolean ANNOTATIONS_CLAIMED_EXCLUSIVELY = false;
 
-    protected static final String SUPPRESS_GENERATOR_TIMESTAMP = "suppressGeneratorTimestamp";
-    protected static final String UNMAPPED_TARGET_POLICY = "unmappedTargetPolicy";
-    protected static final String DEFAULT_COMPONENT_MODEL = "defaultComponentModel";
+    protected static final String SUPPRESS_GENERATOR_TIMESTAMP = "mapstruct.suppressGeneratorTimestamp";
+    protected static final String UNMAPPED_TARGET_POLICY = "mapstruct.unmappedTargetPolicy";
+    protected static final String DEFAULT_COMPONENT_MODEL = "mapstruct.defaultComponentModel";
 
     private Options options;
 
plus

9

--- a/Support/bin/texmate.py
+++ b/Support/bin/texmate.py
@@ -41,7 +41,7 @@
                      normpath, realpath)
 from pickle import load, dump
 from pipes import quote as shellquote
-from re import compile, match, sub
+from re import compile, match, search, sub
 from subprocess import call, check_output, Popen, PIPE, STDOUT
 from sys import exit, stdout
 from textwrap import dedent
@@ -1261,10 +1261,13 @@ def file_exists(filename):
               "synctex but you have included pdfsync. You can safely remove " +
               "\usepackage{pdfsync}</p>")
 
-    if filename.find('"') >= 0:
-        print('''<p class="error">The filename: {} contains double quotes!
-                 Please remove them.<strong></strong></p>
-              '''.format(filename))
+    problematic_characters = search('[$"]', filename)
+    if problematic_characters:
+        print('''<p class="error"><strong>
+                 The filename {0} contains a problematic character: {1}<br>
+                 Please remove all occurrences of {1} in the filename.
+                 </strong></p>
+              '''.format(filename, problematic_characters.group(0)))
     # Run the command passed on the command line or modified by preferences
     elif command == 'latexmk':
         engine_options = construct_engine_options(typesetting_directives,
plus

64

--- a/driver/toxic.c
+++ b/driver/toxic.c
@@ -120,6 +120,8 @@ char toxic_probe_tbl[] = {
 //	"mutex_lock "
 //	"mutex_unlock "
 	"native_get_debugreg "
+	"native_* " // 3.13 kernels - lots more of these  - just blank the lot out
+			// we can do better than this, but this should be "safe"
 	"on_each_cpu " 		// Needed by dtrace_xcall
 	"oops_exit "
 	"oops_may_print "
@@ -152,11 +154,22 @@ char toxic_probe_tbl[] = {
 int 
 is_toxic_func(unsigned long a, const char *name)
 {	char	*cp;
+	char	*cp1;
 	int	len = strlen((char *) name);
 
 	for (cp = toxic_probe_tbl; *cp; ) {
-		if (strncmp(cp, (char *) name, len) == 0 &&
-		    cp[len] == ' ')
+		int	len0;
+		/***********************************************/
+		/*   Allow for simple wildcards.	       */
+		/***********************************************/
+		for (cp1 = cp; *cp1 != ' ' && *cp1 != '*'; cp1++)
+			;
+		len0 = cp1 - cp;
+		if (*cp1 == '*') {
+			if (len0 <= len && strncmp(cp, (char *) name, len0) == 0)
+			    	return 1;
+			}
+		else if (len0 == len && strncmp(cp, (char *) name, len0) == 0)
 		    	return 1;
 		while (*cp && *cp != ' ')
 			cp++;
plus

3

--- a/TrelloNet/Cards/Internal/CardsRemoveLabelRequest.cs
+++ b/TrelloNet/Cards/Internal/CardsRemoveLabelRequest.cs
@@ -7,6 +7,8 @@ internal class CardsRemoveLabelRequest : CardsRequest
 		public CardsRemoveLabelRequest(ICardId card, Color color)
 			: base(card, "labels/{color}", Method.DELETE)
 		{
+			Guard.NotNull(color, "color");
+
 			AddParameter("color", color.ColorName, ParameterType.UrlSegment);
 		}
 	}
plus

129

--- a/flask_admin/tests/sqlamodel/test_basic.py
+++ b/flask_admin/tests/sqlamodel/test_basic.py
@@ -6,6 +6,7 @@
 from flask.ext.admin._compat import as_unicode
 from flask.ext.admin._compat import iteritems
 from flask.ext.admin.contrib.sqla import ModelView
+from flask.ext.babelex import Babel
 
 from . import setup
 
@@ -934,8 +935,34 @@ def test_extra_field_order():
     pos2 = data.find('Test1')
     ok_(pos2 > pos1)
 
-
-# TODO: Babel tests
+def test_modelview_localization():
+    def test_locale(locale):
+        app, db, admin = setup()
+        
+        app.config['BABEL_DEFAULT_LOCALE'] = locale
+        babel = Babel(app)
+        
+        Model1, _ = create_models(db)
+        
+        view = CustomModelView(
+            Model1, db.session,
+            column_filters=['test1', 'bool_field', 'date_field', 'datetime_field', 'time_field']
+        )
+        
+        admin.add_view(view)
+        
+        client = app.test_client()
+        
+        rv = client.get('/admin/model1/')
+        eq_(rv.status_code, 200)
+        
+        rv = client.get('/admin/model1/new/')
+        eq_(rv.status_code, 200)
+    
+    locales = ['en', 'cs', 'de', 'es', 'fa', 'fr', 'pt', 'ru', 'zh_CN', 'zh_TW']
+    for locale in locales:
+        test_locale(locale)
+    
 def test_custom_form_base():
     app, db, admin = setup()
 
plus

129

--- a/flask_admin/contrib/fileadmin.py
+++ b/flask_admin/contrib/fileadmin.py
@@ -4,6 +4,7 @@
 import re
 import shutil
 
+from datetime import datetime
 from operator import itemgetter
 from werkzeug import secure_filename
 
@@ -353,6 +354,8 @@ def _normalize_path(self, path):
     def is_action_allowed(self, name):
         if name == 'delete' and not self.can_delete:
             return False
+        elif name == 'edit' and len(self.editable_extensions) == 0:
+            return False
 
         return True
 
@@ -459,7 +462,7 @@ def index(self, path=None):
             rel_path = op.join(path, f)
 
             if self.is_accessible_path(rel_path):
-                items.append((f, rel_path, op.isdir(fp), op.getsize(fp)))
+                items.append((f, rel_path, op.isdir(fp), op.getsize(fp), op.getmtime(fp)))
 
         # Sort by name
         items.sort(key=itemgetter(0))
@@ -467,6 +470,9 @@ def index(self, path=None):
         # Sort by type
         items.sort(key=itemgetter(2), reverse=True)
 
+        # Sort by modified date
+        items.sort(key=lambda values: (values[0], values[1], values[2], values[3], datetime.fromtimestamp(values[4])), reverse=True)
+
         # Generate breadcrumbs
         accumulator = []
         breadcrumbs = []
plus

45

--- a/usr/src/uts/common/os/compress.c
+++ b/usr/src/uts/common/os/compress.c
@@ -24,8 +24,6 @@
  * All rights reserved.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 /*
  * NOTE: this file is compiled into the kernel, cprboot, and savecore.
  * Therefore it must compile in kernel, boot, and userland source context;
@@ -118,6 +116,7 @@
  */
 
 #include <sys/types.h>
+#include <sys/param.h>
 
 #define	MATCH_BITS	6
 #define	MATCH_MIN	3
@@ -130,7 +129,7 @@ compress(void *s_start, void *d_start, size_t s_len)
 {
 	uchar_t *src = s_start;
 	uchar_t *dst = d_start;
-	uchar_t *cpy, *copymap;
+	uchar_t *cpy, *copymap = NULL;
 	int copymask = 1 << (NBBY - 1);
 	int mlen, offset;
 	uint16_t *hp;
@@ -181,7 +180,7 @@ decompress(void *s_start, void *d_start, size_t s_len, size_t d_len)
 	uchar_t *dst = d_start;
 	uchar_t *s_end = (uchar_t *)s_start + s_len;
 	uchar_t *d_end = (uchar_t *)d_start + d_len;
-	uchar_t *cpy, copymap;
+	uchar_t *cpy, copymap = '\0';
 	int copymask = 1 << (NBBY - 1);
 
 	if (s_len >= d_len) {
plus

4

--- a/Uebung4/Sequence.cpp
+++ b/Uebung4/Sequence.cpp
@@ -34,11 +34,7 @@ std::ostream& operator<<(std::ostream& ostr, const Sequence& seq)
     return ostr;
 }
 
-// note: after a sequence, there is always a terminating space character.
-// even if the sequence has a length of zero.
-// that means first, we have to check if current read position is a space char,
-// and if so, remove it.
-// bottom line: this function stops AFTER taking the whitespace from the stream.
+
 std::istream& operator>>(std::istream& istr, Sequence& seq)
 {
     if(!istr.good()) // only read if stream is readable (this may not be set if we reached the end,
@@ -65,9 +61,7 @@ std::istream& operator>>(std::istream& istr, Sequence& seq)
         return istr;
     }
 
-    // extration should per definition cause seq to be overwritten,
-    // which is not the case if the stream contained no readable data/empty sequence,
-    // so we have to do it manually here.
+
     seq.clear();
 
     return istr;