diff --git a/includes/db_update.php b/includes/db_update.php index c7d2df396..fd9468265 100644 --- a/includes/db_update.php +++ b/includes/db_update.php @@ -9,7 +9,7 @@ /**/ // What *should* the database version be? - define('WebDBSchemaVer', 3); + define('WebDBSchemaVer', 4); // What version does the database think it is? $db_vers = intval(setting('WebDBSchemaVer')); @@ -26,6 +26,7 @@ // Older database that needs to be upgraded if ($db_vers < WebDBSchemaVer) { switch ($db_vers) { + // No version, no database case 0: $db->query('DROP TABLE IF EXISTS mythweb_sessions'); @@ -36,10 +37,12 @@ INDEX (modified) )'); setting('WebDBSchemaVer', null, ++$db_vers, false); + // Moving settings into the database case 1: setting('WebPrefer_Channum', null, 1, false); setting('WebDBSchemaVer', null, ++$db_vers, false); + // Add default width for recording details if they have not been set yet case 2: $width = intval(setting('WebFLV_w')); @@ -49,8 +52,16 @@ setting('WebFLV_w', null, 160, false); } setting('WebDBSchemaVer', null, ++$db_vers, false); + + case 3: + setting('recommend_enabled', null, false); + setting('recommend_server', null, 'http://myth-recommendations.aws.af.cm/'); + setting('recommend_key', null, 'REQUIRED'); + + setting('WebDBSchemaVer', null, ++$db_vers, false); + // All other numbers should run their changes sequentially - #case 3: + #case N: # # do something to upgrade the database here # $db_vers++; } diff --git a/modules/mythweb/init.php b/modules/mythweb/init.php index 7efda5587..91555c07c 100644 --- a/modules/mythweb/init.php +++ b/modules/mythweb/init.php @@ -14,6 +14,7 @@ 'choices' => array('session' => t('My Session'), 'defaults' => t('MythWeb Defaults'), 'flvplayer' => t('Video Playback'), + 'recommend' => t('Recommend Videos'), ), 'default' => 'session', ); diff --git a/modules/mythweb/set_recommend.php b/modules/mythweb/set_recommend.php new file mode 100644 index 000000000..0ea7d7cd2 --- /dev/null +++ b/modules/mythweb/set_recommend.php @@ -0,0 +1,20 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
: + > +
: + +
: + +
+ +