# HG changeset patch # User Peter Gervai # Date 1708180458 -3600 # Node ID ff125aa259db61cf5800d39a1a5c37dc7ef77b0c # Parent aa3e6379dc3d51de304319188796788db8395361 Clip note to the DB field size (varchar64). Added more exclusions: - wikisources (requested) - azwikimedia (suggested) - gurwiki (broken SUL) - gomwiktionary (broken SUL) diff -r aa3e6379dc3d -r ff125aa259db delinquent_files/shared.inc --- a/delinquent_files/shared.inc Sat Feb 17 15:30:43 2024 +0100 +++ b/delinquent_files/shared.inc Sat Feb 17 15:34:18 2024 +0100 @@ -1,9 +1,7 @@ +#$Id$ +# runQuery ( $this->last_db , $sql ) ; while($o = $result->fetch_object()) $ret = true ; } catch (Exception $e) { - echo 'Caught exception: ', $e->getMessage(), "\n"; + echo 'Caught exception: ', $e->getMessage(), "\n"; } return $ret ; } @@ -113,6 +102,8 @@ $sql = "UPDATE event SET done=" . ($value*1) ; if ( isset ( $meta ) ) { if ( !is_array ( $meta ) ) $meta = array ( 'note' => $meta ) ; + # clip note to varchar(64) + if( isset($meta['note']) ) $meta['note'] = substr($meta['note'], 0, 63); foreach ( $meta AS $k => $v ) { $sql .= ",$k='" . $this->getDBsafe($v) . "'" ; }