Fixed : lang function was missing collections.class.php
Added : New phrases
This commit is contained in:
parent
798362ba1a
commit
3d6273c95f
2 changed files with 43 additions and 21 deletions
22
sql/newPhrases.txt
Normal file
22
sql/newPhrases.txt
Normal file
|
@ -0,0 +1,22 @@
|
|||
INSERT INTO `cb_phrases` (`lang_iso`, `varname`, `text`) VALUES
|
||||
('en', 'cat_all', 'All'),
|
||||
('en', 'photos', 'Photos'),
|
||||
('en', 'photo', 'photo'),
|
||||
('en', 'object_does_not_exists', '%s does not exist.'),
|
||||
('en', 'object_exists_collection', '%s already exist in collection.'),
|
||||
('en', 'item_added_in_collection', '%s successfully added in collection.'),
|
||||
('en', 'collect_added_msg', 'Collection is created successfully.'),
|
||||
('en', 'cant_perform_action_collect', 'You can not perform such actions on this collection.'),
|
||||
('en', 'collection_deleted', 'Collection deleted successfully.'),
|
||||
('en', 'collection_not_exists', 'Collection does not exist.'),
|
||||
('en', 'collect_items_deleted', 'Collection items deleted successfully.'),
|
||||
('en', 'object_not_in_collect', '%s does not exist in this collection'),
|
||||
('en', 'collect_item_removed', '%s is removed from collection.'),
|
||||
('en', 'cant_edit_collection', 'You can not edit this collection'),
|
||||
('en', 'collection_updated', 'Collection updated.'),
|
||||
('en', 'collection_activated', 'Collection activated.'),
|
||||
('en', 'collection_deactivated', 'Collection deactivated.'),
|
||||
('en', 'collection_featured', 'Collection featured.'),
|
||||
('en', 'collection_unfeatured', 'Collection unfeatured.'),
|
||||
('en', 'upload_right_guide_photo', '<strong>Important: Do not upload any photo hat can be construed as porn, copyrighted material, harassment, or spam.</strong>
|
||||
<p>By continuing "Your Upload", you are representing that these photos does not violate Our website's <a id="terms-of-use-link" href="%s">Terms of Use</a> and that you own all copyrights of these photos or have authorization to upload it.</p>'),
|
|
@ -820,18 +820,18 @@ class Collections extends CBCategory
|
|||
if($this->collection_exists($cid))
|
||||
{
|
||||
if(!userid())
|
||||
e("you_not_logged_in");
|
||||
e(lang("you_not_logged_in"));
|
||||
elseif(!$this->object_exists($objID))
|
||||
e("object_does_exists");
|
||||
e(sprintf(lang("object_does_not_exists"),$this->objName));
|
||||
elseif($this->object_in_collection($objID,$cid))
|
||||
e("object_exists_collection");
|
||||
e(sprintf(lang("object_exists_collection"),$this->objName));
|
||||
else
|
||||
{
|
||||
$flds = array("collection_id","object_id","type","userid","date_added");
|
||||
$vls = array($cid,$objID,$this->objType,userid(),NOW());
|
||||
$db->insert(tbl($this->items),$flds,$vls);
|
||||
$db->update(tbl($this->section_tbl),array("total_objects"),array("|f|total_objects+1")," collection_id = $cid");
|
||||
e("item_added_in_collection","m");
|
||||
e(sprintf(lang("item_added_in_collection"),$this->objName),"m");
|
||||
}
|
||||
} else {
|
||||
e(lang("collect_not_exist"));
|
||||
|
@ -905,9 +905,9 @@ class Collections extends CBCategory
|
|||
global $db;
|
||||
$collection = $this->get_collection($cid);
|
||||
if(empty($collection))
|
||||
e("collection_not_exists");
|
||||
e(lang("collection_not_exists"));
|
||||
elseif($collection['userid'] != userid() && !has_access('admin_access',true))
|
||||
e("cant_perform_action_collect");
|
||||
e(lang("cant_perform_action_collect"));
|
||||
else
|
||||
{
|
||||
$del_funcs = $this->collection_delete_functions;
|
||||
|
@ -923,7 +923,7 @@ class Collections extends CBCategory
|
|||
$db->delete(tbl($this->items),array("collection_id"),array($cid));
|
||||
$this->delete_thumbs($cid);
|
||||
$db->delete(tbl($this->section_tbl),array("collection_id"),array($cid));
|
||||
e("collection_deleted","m");
|
||||
e(lang("collection_deleted"),"m");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -935,13 +935,13 @@ class Collections extends CBCategory
|
|||
global $db;
|
||||
$collection = $this->get_collection($id);
|
||||
if(!$collection)
|
||||
e("collection_not_exists");
|
||||
e(lang("collection_not_exists"));
|
||||
elseif($collection['userid'] != userid() && !has_access('admin_access',true))
|
||||
e("cant_perform_action_collect");
|
||||
e(lang("cant_perform_action_collect"));
|
||||
else {
|
||||
$db->delete(tbl($this->items),array("collection_id"),array($cid));
|
||||
$db->update(tbl($this->section_tbl),array("total_objects"),array($this->count_items($cid))," collection_id = $cid");
|
||||
e("collect_items_deleted","m");
|
||||
e(lang("collect_items_deleted"),"m");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -955,16 +955,16 @@ class Collections extends CBCategory
|
|||
if($this->collection_exists($cid))
|
||||
{
|
||||
if(!userid())
|
||||
e("you_not_logged_in");
|
||||
e(lang("you_not_logged_in"));
|
||||
elseif(!$this->object_in_collection($id,$cid))
|
||||
e(sprintf(lang("object_not_in_collect"),$this->objName));
|
||||
elseif(!$this->is_collection_owner($cid) && !has_access('admin_access',true))
|
||||
e("cant_perform_action_collect");
|
||||
e(lang("cant_perform_action_collect"));
|
||||
else
|
||||
{
|
||||
$db->execute("DELETE FROM ".tbl($this->items)." WHERE object_id = $id AND collection_id = $cid");
|
||||
$db->update(tbl($this->section_tbl),array("total_objects"),array("|f|total_objects-1")," collection_id = $cid");
|
||||
e("collect_item_removed","m");
|
||||
e(sprintf(lang("collect_item_removed"),$this->objName),"m");
|
||||
}
|
||||
} else {
|
||||
e(lang('collect_not_exists'));
|
||||
|
@ -1118,15 +1118,15 @@ class Collections extends CBCategory
|
|||
if(!error())
|
||||
{
|
||||
if(!userid())
|
||||
e("you_not_logged_in");
|
||||
e(lang("you_not_logged_in"));
|
||||
elseif(!$this->collection_exists($cid))
|
||||
e("collect_not_exist");
|
||||
e(lang("collect_not_exist"));
|
||||
elseif(!$this->is_collection_owner($cid,userid()) && !has_access('admin_access',TRUE))
|
||||
e("cant_edit_collection");
|
||||
e(lang("cant_edit_collection"));
|
||||
else
|
||||
{
|
||||
$db->update(tbl($this->section_tbl),$query_field,$query_val," collection_id = $cid");
|
||||
e("collection_updated","m");
|
||||
e(lang("collection_updated"),"m");
|
||||
|
||||
if(!empty($array['collection_thumb']['tmp_name']))
|
||||
$this->upload_thumb($cid,$array['collection_thumb']);
|
||||
|
@ -1429,7 +1429,7 @@ class Collections extends CBCategory
|
|||
case "ac":
|
||||
{
|
||||
$db->update(tbl($this->section_tbl),array("active"),array("yes")," collection_id = $cid");
|
||||
e("collection_activated","m");
|
||||
e(lang("collection_activated"),"m");
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -1438,7 +1438,7 @@ class Collections extends CBCategory
|
|||
case "dac":
|
||||
{
|
||||
$db->update(tbl($this->section_tbl),array("active"),array("no")," collection_id = $cid");
|
||||
e("collection_deactivated","m");
|
||||
e(lang("collection_deactivated"),"m");
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -1447,7 +1447,7 @@ class Collections extends CBCategory
|
|||
case "mcf":
|
||||
{
|
||||
$db->update(tbl($this->section_tbl),array("featured"),array("yes")," collection_id = $cid");
|
||||
e("collection_featured","m");
|
||||
e(lang("collection_featured"),"m");
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -1456,7 +1456,7 @@ class Collections extends CBCategory
|
|||
case "mcuf":
|
||||
{
|
||||
$db->update(tbl($this->section_tbl),array("featured"),array("no")," collection_id = $cid");
|
||||
e("collection_unfeatured","m");
|
||||
e(lang("collection_unfeatured"),"m");
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue