diff options
author | icewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-03-09 17:46:01 +0000 |
---|---|---|
committer | icewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-03-09 17:46:01 +0000 |
commit | eab5982c2308683cbf026e80240cbde89eca3bf8 (patch) | |
tree | f3f987094978822f1f0e0dad4fa1c077d99a2364 /index.php | |
parent | 8ae05ec65234f9d24fbc8f7eddca06e9b4cb1a8a (diff) | |
download | elgg-eab5982c2308683cbf026e80240cbde89eca3bf8.tar.gz elgg-eab5982c2308683cbf026e80240cbde89eca3bf8.tar.bz2 |
Marcus Povey <marcus@dushka.co.uk>
* Commented out my testing
git-svn-id: https://code.elgg.org/elgg/trunk@126 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 103 |
1 files changed, 54 insertions, 49 deletions
@@ -28,61 +28,66 @@ }
+ + $obj = new stdClass;
+ $obj->id = 3; + + +/* + + // Testing /////// + if ($_SESSION['id']==-1) $_SESSION['id'] = 1; + + // Create / load a site + $site = get_site(1); +error_log("GETTIGN SITE ".$_SESSION['id']. " " . print_r($site, true)); + + if (empty($site)) + { + $site = new ElggSite(); + + $site->title = "Test title"; + $site->description = "Test description"; + $site->url = "http://dushka/~icewing/Workingdirectory/elggnew/"; + $site->owner_id = 1; + $site->access_id = 0; + + error_log("LOADED NEW SITE: Saving" . print_r($site,true)); + + $site->save(); + } + else + { + $site = new ElggSite($site); + + $site->title = "Test title " . time(); + $site->save(); + + error_log("UPDATING SITE " . print_r($site, true)); + } + + + + // annotate site + $site->annotate("Test","TestValue"); + + // add meta data + $site->setMetadata("Metaname", "Value"); + + + + // change site metadata + $site->setMetadata("Metaname", "Value2"); + + error_log("SITE RETRIEVE : " . print_r(get_objects_from_metadatas(0, "", "", "Value2"), true)); - // Testing ///////
- if ($_SESSION['id']==-1) $_SESSION['id'] = 1;
-
- // Create / load a site
- $site = get_site(1);
-error_log("GETTIGN SITE " . print_r($site, true));
-
- if (empty($site))
- {
- $site = new ElggSite();
-
- $site->title = "Test title";
- $site->description = "Test description";
- $site->url = "http://dushka/~icewing/Workingdirectory/elggnew/";
- $site->owner_id = 1;
- $site->access_id = 0;
-
- error_log("LOADED NEW SITE: Saving" . print_r($site,true));
-
- $site->save();
- }
- else
- {
- $site = new ElggSite($site);
-
- $site->title = "Test title " . time();
- $site->save();
-
- error_log("UPDATING SITE " . print_r($site, true));
- }
-
-
-
- // annotate site
- $site->annotate("Test","TestValue");
-
- // add meta data
- $site->setMetadata("Metaname", "Value");
-
-
-
-
- // change site metadata
- $site->setMetadata("Metaname", "Value2");
-
-
-
// get site annotations
error_log("SITE Annotations : " . print_r($site->getAnnotations("Test"), true));
-
+ // get site metadata
error_log("SITE Metadata : " . print_r($site->getMetadata("Metaname"), true));
-
+ */
?>
\ No newline at end of file |