contributions/jcssmanager/install/updates/0003_num_sources_existing.php
Go to the documentation of this file.00001 <?php 00002 /** 00003 * Update sources counter for existing 00004 */ 00005 function jcssmanager_update_3() { 00006 $ret = new Status(); 00007 00008 Load::models('jcsscompressedfiles'); 00009 $dao = new DAOJcsscompressedfiles(); 00010 $dao->find(); 00011 while($dao->fetch()) { 00012 $d = clone($dao); 00013 $d->num_sources = count($d->sources); 00014 $ret->merge($d->update()); 00015 } 00016 return $ret; 00017 }