diff options
author | nickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-10-05 20:16:40 +0000 |
---|---|---|
committer | nickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-10-05 20:16:40 +0000 |
commit | ff54fa54bcfc8d39d92b5e42f0111fed5cd16a12 (patch) | |
tree | 14c99fc2e47ee051952cb8bd3e594bde4c0312f9 /mod/oauth_lib/vendors/oauth/library/store/mysql/install.php | |
parent | 9577651544d2a912f6eb4b13120948c68a7949fc (diff) | |
download | elgg-ff54fa54bcfc8d39d92b5e42f0111fed5cd16a12.tar.gz elgg-ff54fa54bcfc8d39d92b5e42f0111fed5cd16a12.tar.bz2 |
Changing the name of the oAuth plugin to reflect it's library service status.
Refs #2532
git-svn-id: http://code.elgg.org/elgg/trunk@7015 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/oauth_lib/vendors/oauth/library/store/mysql/install.php')
-rw-r--r-- | mod/oauth_lib/vendors/oauth/library/store/mysql/install.php | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/mod/oauth_lib/vendors/oauth/library/store/mysql/install.php b/mod/oauth_lib/vendors/oauth/library/store/mysql/install.php new file mode 100644 index 000000000..0015da5e3 --- /dev/null +++ b/mod/oauth_lib/vendors/oauth/library/store/mysql/install.php @@ -0,0 +1,32 @@ +<?php + +/** + * Installs all tables in the mysql.sql file, using the default mysql connection + */ + +/* Change and uncomment this when you need to: */ + +/* +mysql_connect('localhost', 'root'); +if (mysql_errno()) +{ + die(' Error '.mysql_errno().': '.mysql_error()); +} +mysql_select_db('test'); +*/ + +$sql = file_get_contents(dirname(__FILE__) . '/mysql.sql'); +$ps = explode('#--SPLIT--', $sql); + +foreach ($ps as $p) +{ + $p = preg_replace('/^\s*#.*$/m', '', $p); + + mysql_query($p); + if (mysql_errno()) + { + die(' Error '.mysql_errno().': '.mysql_error()); + } +} + +?>
\ No newline at end of file |