/**
  * 25 Create request_urls and export any photos (from pre 2.5 installs)
  */
 public function actionConvertProductSEO()
 {
     //First, run our request_url creation if needed
     Product::convertSEO(-1);
     Category::ConvertSEO();
     $matches = Yii::app()->db->createCommand('SELECT count(*) FROM ' . Product::model()->tableName() . ' WHERE request_url IS NULL AND title is not null')->queryScalar();
     if ($matches > 0) {
         return array('result' => "success", 'makeline' => 25, 'tag' => 'Creating SEO-friendly URLs ' . $matches . ' remaining', 'total' => 50);
     } else {
         //Getting ready for photo convert, drop any orphaned images with blobs
         _dbx("delete a from xlsws_images as a left join xlsws_product as b on a.id=b.image_id where image_path is null and a.id=a.parent and b.id is null;");
         return array('result' => "success", 'makeline' => 26, 'tag' => 'Installing Amazon categories (group 1 of 14)', 'total' => 50);
     }
 }