| daniel added a comment. |
The MediaInfoContent class can just override the isValid() method, call $this->getMediaInfo()->getDescriptions(), and return false of that is not empty. This will prevent any MediaInfo to be stored if it has any descriptions set.
Other code that can provide a helpful message to the user should also do this check. isValid() is really the fail-safe.
TASK DETAIL
EMAIL PREFERENCES
To: Jdforrester-WMF, daniel
Cc: daniel, Jdforrester-WMF, Ramsey-WMF, Aklapper, Bugreporter, Nandana, JKSTNK, Lahi, PDrouin-WMF, Gq86, E1presidente, Cparle, Anooprao, SandraF_WMF, GoranSMilovanovic, QZanden, Tramullas, Acer, V4switch, LawExplorer, Silverfish, _jensen, Susannaanas, Wong128hk, Jane023, Wikidata-bugs, Base, matthiasmullie, aude, Ricordisamoa, Wesalius, Lydia_Pintscher, Fabrice_Florin, Raymond, Steinsplitter, Matanya, Mbch331
Cc: daniel, Jdforrester-WMF, Ramsey-WMF, Aklapper, Bugreporter, Nandana, JKSTNK, Lahi, PDrouin-WMF, Gq86, E1presidente, Cparle, Anooprao, SandraF_WMF, GoranSMilovanovic, QZanden, Tramullas, Acer, V4switch, LawExplorer, Silverfish, _jensen, Susannaanas, Wong128hk, Jane023, Wikidata-bugs, Base, matthiasmullie, aude, Ricordisamoa, Wesalius, Lydia_Pintscher, Fabrice_Florin, Raymond, Steinsplitter, Matanya, Mbch331
_______________________________________________ Wikidata-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs
