Exemplo n.º 1
0
 static function upgrade_advman(&$data)
 {
     $version = Advman_Upgrade::_get_version($data);
     Advman_Upgrade::_backup($data, $version);
     $versions = array('3.4', '3.4.2', '3.4.3', '3.4.7', '3.4.9', '3.4.12', '3.4.14', '3.4.15', '3.4.20', '3.4.25', '3.4.29', '3.5.1', '3.5.2');
     foreach ($versions as $v) {
         if (version_compare($version, $v, '<')) {
             $func = 'advman_' . str_replace('.', '_', $v);
             Advman_Upgrade::$func($data);
         }
     }
     $data['settings']['version'] = ADVMAN_VERSION;
 }
Exemplo n.º 2
0
 function upgrade_adsensem(&$data)
 {
     $version = Advman_Upgrade::_get_version($data);
     Advman_Upgrade::adsensem_upgrade_ad_classes($data);
     Advman_Upgrade::adsensem_upgrade_ad_ids($data);
     Advman_Upgrade::adsensem_upgrade_network_classes($data);
     Advman_Upgrade::adsensem_upgrade_ad_settings($data);
     Advman_Upgrade::adsensem_upgrade_network_settings($data);
     Advman_Upgrade::adsensem_upgrade_settings($data);
     $notice = __('<strong>Advertising Manager</strong> has been upgraded from your <strong>Adsense Manager</strong> settings.', 'advman');
     //		$question = __('Enable <a>auto optimisation</a>? (RECOMMENDED)', 'advman');
     //		$question = str_replace('<a>', '<a href="http://code.openx.org/wiki/advertising-manager/Auto_Optimization" target="_new">', $question);
     Advman_Admin::add_notice('optimise', $notice, 'ok');
     // Set the new version
     $data['settings']['version'] = '3.3.19';
     return Advman_Upgrade::upgrade_advman($data);
 }