Skip to content

Commit

Permalink
Merge pull request #1 from elinw/davidsbranch
Browse files Browse the repository at this point in the history
Further UCM Work
  • Loading branch information
David Hurley committed Apr 3, 2013
2 parents ff4cf7b + ca3c0a8 commit 61118c1
Show file tree
Hide file tree
Showing 105 changed files with 3,407 additions and 1,731 deletions.
86 changes: 86 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
Joomla! CMS
====================

What is this?
---------------------
* This is a Joomla! installation/upgrade package to version 3.0.x
* Joomla! [Official site](http://www.joomla.org)
* Joomla! 3.0 [version history](http://docs.joomla.org/Joomla_3.0_version_history)
* Detailed changes in the [Changelog](http://joomlacode.org/gf/project/joomla/scmsvn/?action=browse&path=/development/trunk/administrator/&view=log)

What is Joomla?
---------------------
* Joomla! is a **Content Management System** (CMS) which enables you to build Web sites and powerful online applications.
* It's a **free and OpenSource software**, distributed under the GNU General Public License version 2 or later
* This is a simple and powerful web server application and it requires a server with PHP and MySQL to run it.
More [details here](http://www.joomla.org/about-joomla.html)

Is Joomla! for you?
---------------------
* Joomla! is [the right solution for any content web project](http://docs.joomla.org/Joomla_Is_it_for_me%3F)
* See [Features](http://www.joomla.org/core-features.html)
* Try out our [online demo](http://demo.joomla.org)

How to find a Joomla! translation?
---------------------
* Repository of accredited [language packs](http://community.joomla.org/translations.html)
* Directory of [non-accredited language packs](http://extensions.joomla.org/extensions/languages/translations-for-joomla) (see above for accredited)

Learn Joomla!
---------------------
* Read [Getting Started with Joomla](http://docs.joomla.org/Getting_Started_with_Joomla!) to find out the basics
* Before installing, read the [beginners guide](http://docs.joomla.org/Beginners)

What are the limits of Joomla?
---------------------
* Joomla sites can be extended in functionalities with Extensions that you can create (or download) to suite your needs.
* There are lots of ready made extensions that you can download and install.
* See the [Joomla! Extensions Directory (JED)](http://extensions.joomla.org)

Is it easy to change the layout display?
---------------------
* The layout is controlled by templates that you can edit.
* There are lots of ready made templates that you can download.

Ready to install Joomla?
---------------------
* See [minimum requirements](http://www.joomla.org/technical-requirements.html)
* How do you [install Joomla!](http://docs.joomla.org/Installing_Joomla!) ?
* Start your Joomla! experience [building your site with a local test server](http://docs.joomla.org/Tutorial:Joomla_Local_install).
When ready it can be moved to an on-line hosting account of your choice.

Updates are free!
---------------------
* Always use the [latest version](http://www.joomla.org/download.html)

Where can you get support and help?
---------------------
* [Frequently Asked Questions](http://docs.joomla.org/Category:FAQ) (FAQ)
* Find the [information you need](http://docs.joomla.org/Start_here)
* Find [help and other users](http://www.joomla.org/about-joomla/create-and-share.html)
* Post questions at [our forums](http://forum.joomla.org)
* [Joomla Resources Directory](http://resources.joomla.org/tos.html) (JRD):

Do you already have a Joomla site that's not built with Joomla 3.0.x ?
---------------------
* What's [new in Joomla 3.0.x](http://www.joomla.org/3)
* What are the [main differences from 2.5 to 3.0](http://docs.joomla.org/Differences_from_Joomla_2.5_to_Joomla_3.0)?
* How to [migrate from 2.5.x to 3.0.x](http://docs.joomla.org/Migrating_from_Joomla_2.5_to_Joomla_3.0)?
* What are the [main differences from 1.5 to 2.5](http://docs.joomla.org/Differences_from_Joomla_1.5_to_Joomla_2.5)?
* How to [migrate from 1.5.x to 3.0.x](http://docs.joomla.org/Migrating_from_Joomla_1.5_to_Joomla_3.0)?
* [Convert an existing Web site to Joomla](http://docs.joomla.org/How_to_Convert_an_existing_Web_site_to_a_Joomla!_Web_site)

Do you want to improve Joomla?
---------------------
* How do you [request a feature](http://docs.joomla.org/How_do_you_request_a_feature%3F)?
* How do you [report a bug](http://docs.joomla.org/Filing_bugs_and_issues)?
* Get Involved: Joomla! is a community developed software. [Join the community](http://www.joomla.org)
* Documentation for [Developers](http://docs.joomla.org/Developers)
* Documentation for [Web designers](http://docs.joomla.org/Web_designers)

Copyright:
---------------------
* Copyright (C) 2005 - 2013 Open Source Matters. All rights reserved.
* [Credits](http://docs.joomla.org/Joomla_3.0_Credits)
* Distributed under the GNU General Public License version 2 or later
* See [Licenses details](http://docs.joomla.org/Joomla_Licenses)
3 changes: 3 additions & 0 deletions administrator/components/com_admin/script.php
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,9 @@ public function deleteUnexistingFiles()
'/libraries/joomla/installer/index.html',
'/libraries/joomla/installer/librarymanifest.php',
'/libraries/joomla/installer/packagemanifest.php',
'/media/system/css/mooRainbow.css',
'/media/system/js/mooRainbow-uncompressed.js',
'/media/system/js/mooRainbow.js',
);

// TODO There is an issue while deleting folders using the ftp mode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,6 @@
<?php endforeach; ?>
</tbody>
</table>
<?php echo $this->pagination->getListFooter(); ?>
<?php //Load the batch processing form. ?>
<?php echo $this->loadTemplate('batch'); ?>

Expand Down
9 changes: 5 additions & 4 deletions administrator/components/com_categories/models/categories.php
Original file line number Diff line number Diff line change
Expand Up @@ -240,10 +240,11 @@ protected function getListQuery()
if (is_numeric($tagId))
{
$query->where($db->quoteName('tagmap.tag_id') . ' = ' . (int) $tagId);
$query->join('LEFT', $db->quoteName('#__contentitem_tag_map', 'tagmap')
. ' ON ' . $db->quoteName('tagmap.content_item_id') . ' = ' . $db->quoteName('a.id')
. ' AND ' . $db->quoteName('tagmap.type_alias') . ' = ' . $db->quote($extension . '.category'))
;
$query->join(
'LEFT',
$db->quoteName('#__contentitem_tag_map', 'tagmap') . ' ON ' . $db->quoteName('tagmap.content_item_id') . ' = ' . $db->quoteName('a.id')
. ' AND ' . $db->quoteName('tagmap.type_alias') . ' = ' . $db->quote($extension . '.category')
);
}

// Add the list ordering clause
Expand Down
5 changes: 3 additions & 2 deletions administrator/components/com_categories/models/category.php
Original file line number Diff line number Diff line change
Expand Up @@ -449,8 +449,9 @@ public function save($data)
if ($input->get('task') == 'save2copy')
{
list($title, $alias) = $this->generateNewTitle($data['parent_id'], $data['alias'], $data['title']);
$data['title'] = $title;
$data['alias'] = $alias;
$data['title'] = $title;
$data['alias'] = $alias;
$data['published'] = 0;
}

// Bind the data.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,6 @@
description="JFIELD_ACCESS_DESC"
class="span12 small"/>

<field name="tags" type="tag"
label="JTAG" description="JTAG_DESC"
class="inputbox" multiple="true"
>
</field>

<field
name="metadesc"
type="textarea"
Expand Down Expand Up @@ -240,6 +234,12 @@
description="JFIELD_METADATA_AUTHOR_DESC"
size="30"/>

<field name="tags" type="tag"
label="JTAG" description="JTAG_DESC"
class="inputbox" multiple="true"
>
</field>

<field name="robots"
type="list"
label="JFIELD_METADATA_ROBOTS_LABEL"
Expand Down
18 changes: 2 additions & 16 deletions administrator/components/com_contact/controllers/contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,22 +117,8 @@ protected function postSaveHook(JModelLegacy $model, $validData = array())
{
$task = $this->getTask();
$item = $model->getItem();
if (isset($item->params) && is_array($item->params))
{
$registry = new JRegistry;
$registry->loadArray($item->params);
$item->params = (string) $registry;
}

if (isset($item->metadata) && is_array($item->metadata))
{
$registry = new JRegistry;
$registry->loadArray($item->metadata);
$item->metadata = (string) $registry;
}
$id = $item->id;

if (empty($validData['tags']) && !empty($item->tags))
/* if (empty($validData['tags']) && !empty($item->tags))
{
$oldTags = new JTags;
$oldTags->unTagItem($id, 'com_contact.contact');
Expand All @@ -145,6 +131,6 @@ protected function postSaveHook(JModelLegacy $model, $validData = array())
$isNew = $item->id == 0 ? 1 : 0;
$tagsHelper = new JTags;
$tagsHelper->tagItem($id, 'com_contact.contact', $isNew, $item, $tags, null);
}
}*/
}
}
5 changes: 3 additions & 2 deletions administrator/components/com_contact/models/contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -478,8 +478,9 @@ public function save($data)
if ($app->input->get('task') == 'save2copy')
{
list($name, $alias) = $this->generateNewTitle($data['catid'], $data['alias'], $data['name']);
$data['name'] = $name;
$data['alias'] = $alias;
$data['name'] = $name;
$data['alias'] = $alias;
$data['published'] = 0;
}

if (parent::save($data))
Expand Down
10 changes: 6 additions & 4 deletions administrator/components/com_contact/models/contacts.php
Original file line number Diff line number Diff line change
Expand Up @@ -257,10 +257,12 @@ protected function getListQuery()
$tagId = $this->getState('filter.tag');
if (is_numeric($tagId))
{
$query->where($db->quoteName('tagmap.tag_id') . ' = ' . (int) $tagId);
$query->join('LEFT', $db->quoteName('#__contentitem_tag_map', 'tagmap')
. ' ON ' . $db->quoteName('tagmap.content_item_id') . ' = ' . $db->quoteName('a.id')
. ' AND ' . $db->quoteName('tagmap.type_alias') . ' = ' . $db->quote('com_contact.contact'));
$query->where($db->quoteName('tagmap.tag_id') . ' = ' . (int) $tagId);
$query->join(
'LEFT',
$db->quoteName('#__contentitem_tag_map', 'tagmap') . ' ON ' . $db->quoteName('tagmap.content_item_id') . ' = ' . $db->quoteName('a.id')
. ' AND ' . $db->quoteName('tagmap.type_alias') . ' = ' . $db->quote('com_contact.contact')
);
}

// Add the list ordering clause.
Expand Down
13 changes: 7 additions & 6 deletions administrator/components/com_contact/models/forms/contact.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,6 @@
required="true"
/>

<field name="tags" type="tag"
label="JTAG" description="JTAG_DESC"
class="inputbox" multiple="true"
>
</field>

<field name="access"
type="accesslevel"
label="JFIELD_ACCESS_LABEL"
Expand Down Expand Up @@ -715,6 +709,13 @@
label="JFIELD_METADATA_RIGHTS_LABEL"
description="JFIELD_METADATA_RIGHTS_DESC"
size="20" />
<field name="tags" type="tag"
label="JTAG" description="JTAG_DESC"
class="inputbox" multiple="true"
>
</field>


</fieldset>
</fields>
<field name="hits"
Expand Down
33 changes: 32 additions & 1 deletion administrator/components/com_contact/tables/contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public function store($updateNulls = false)
}
else
{
// New newsfeed. A feed created and created_by field can be set by the user,
// New contact. A contact created and created_by field can be set by the user,
// so we don't touch either of these if they are set.
if (!(int) $this->created)
{
Expand Down Expand Up @@ -115,6 +115,37 @@ public function store($updateNulls = false)
$this->xreference = '';
}

$metadata = json_decode($this->metadata);
$tags = (array) $metadata->tags;

// Store the tag data if the article data was saved and run related methods.
if (empty($tags) == false)
{
$fields = $this->getFields();
$data = array();
$fields = $this->getFields();

foreach ($fields as $field)
{
$columnName = $field->Field;
$value = $this->$columnName;
$data[$columnName] = $value;
}

$typeAlias = 'com_contact.contact';
$type = new JUcmType($typeAlias);

$ucm = new JUcmBase($this, $typeAlias);
$ucm->save($data, $type, false);
$ccId = $ucm->getPrimaryKey('core_content_id', $typeAlias, $this->id);

$id = $data['id'];
$isNew = $id == 0 ? 1 : 0;
$tagsHelper = new JTags;

$tagsHelper->tagItem($id, $typeAlias, $isNew, $ccId, $tags);
}

// Verify that the alias is unique
$table = JTable::getInstance('Contact', 'ContactTable');
if ($table->load(array('alias' => $this->alias, 'catid' => $this->catid)) && ($table->id != $this->id || $this->id == 0))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,10 +248,10 @@
</div>
<div class="control-group">
<div class="control-label">
<?php echo $this->form->getLabel('tags'); ?>
<?php // echo $this->form->getLabel('tags'); ?>
</div>
<div class="controls">
<?php echo $this->form->getInput('tags'); ?>
<?php // echo $this->form->getInput('tags'); ?>
</div>
</div>

Expand Down
Loading

0 comments on commit 61118c1

Please sign in to comment.