strip profile name in case it exceeds db storage size (at 255 mark)
authorDomas Mituzas <midom@users.mediawiki.org>
Wed, 1 Sep 2004 12:48:09 +0000 (12:48 +0000)
committerDomas Mituzas <midom@users.mediawiki.org>
Wed, 1 Sep 2004 12:48:09 +0000 (12:48 +0000)
includes/Profiling.php

index 9b3277a..5c5f3de 100755 (executable)
@@ -170,7 +170,7 @@ class Profiler
                $dbw =& wfGetDB( DB_MASTER );
                $profiling = $dbw->tableName( 'profiling' );
 
-               $name = $dbw->strencode( $name );
+               $name = substr($dbw->strencode( $name ),0,255);
                $sql = "UPDATE $profiling ".
                        "SET pf_count=pf_count+{$eventCount}, ".
                        "pf_time=pf_time + {$timeSum} ".